public class LabelResource extends ApplicationResource
| Modifier and Type | Field and Description |
|---|---|
private WebClusterManager |
clusterManager |
private String |
groupId |
private static org.slf4j.Logger |
logger |
private NiFiProperties |
properties |
private NiFiServiceFacade |
serviceFacade |
CLIENT_ID, CLUSTER_CONTEXT_HTTP_HEADER, PROXIED_ENTITIES_CHAIN_HTTP_HEADER, PROXIED_ENTITY_USER_DETAILS_HTTP_HEADER, PROXY_CONTEXT_PATH_HTTP_HEADER, PROXY_HOST_HTTP_HEADER, PROXY_PORT_HTTP_HEADER, PROXY_SCHEME_HTTP_HEADER, VERSION| Constructor and Description |
|---|
LabelResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createLabel(javax.servlet.http.HttpServletRequest httpServletRequest,
LabelEntity labelEntity)
Creates a new Label.
|
javax.ws.rs.core.Response |
createLabel(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
DoubleParameter x,
DoubleParameter y,
DoubleParameter width,
DoubleParameter height,
String label)
Creates a new label.
|
javax.ws.rs.core.Response |
getLabel(ClientIdParameter clientId,
String id)
Retrieves the specified label.
|
javax.ws.rs.core.Response |
getLabels(ClientIdParameter clientId)
Retrieves all the of labels in this NiFi.
|
private LabelDTO |
populateRemainingLabelContent(LabelDTO label)
Populates the uri for the specified label.
|
Set<LabelDTO> |
populateRemainingLabelsContent(Set<LabelDTO> labels)
Populates the uri for the specified labels.
|
javax.ws.rs.core.Response |
removeLabel(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String id)
Removes the specified label.
|
void |
setClusterManager(WebClusterManager clusterManager) |
void |
setGroupId(String groupId) |
void |
setProperties(NiFiProperties properties) |
void |
setServiceFacade(NiFiServiceFacade serviceFacade) |
javax.ws.rs.core.Response |
updateLabel(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String id,
String label,
DoubleParameter x,
DoubleParameter y,
DoubleParameter width,
DoubleParameter height,
javax.ws.rs.core.MultivaluedMap<String,String> formParams)
Updates the specified label.
|
javax.ws.rs.core.Response |
updateLabel(javax.servlet.http.HttpServletRequest httpServletRequest,
String id,
LabelEntity labelEntity)
Updates the specified label.
|
clusterContext, generateContinueResponse, generateCreatedResponse, generateOkResponse, generateOkResponse, generateResourceUri, getAbsolutePath, getClusterContextFromRequest, getHeaders, getHeaders, getRequestParameters, getRequestParameters, noCache, updateClientIdprivate static final org.slf4j.Logger logger
private NiFiServiceFacade serviceFacade
private WebClusterManager clusterManager
private NiFiProperties properties
private String groupId
public Set<LabelDTO> populateRemainingLabelsContent(Set<LabelDTO> labels)
labels - private LabelDTO populateRemainingLabelContent(LabelDTO label)
@PreAuthorize(value="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response getLabels(ClientIdParameter clientId)
clientId - Optional client id. If the client id is not specified, a
new one will be generated. This value (whether specified or generated) is
included in the response.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response createLabel(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
DoubleParameter x,
DoubleParameter y,
DoubleParameter width,
DoubleParameter height,
String label)
httpServletRequest - version - The revision is used to verify the client is working with
the latest version of the flow.clientId - Optional client id. If the client id is not specified, a
new one will be generated. This value (whether specified or generated) is
included in the response.x - The x coordinate for this funnels position.y - The y coordinate for this funnels position.width - The width of the label.height - The height of the label.label - The label's value.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response createLabel(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
LabelEntity labelEntity)
httpServletRequest - labelEntity - A labelEntity.@PreAuthorize(value="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response getLabel(ClientIdParameter clientId, String id)
clientId - Optional client id. If the client id is not specified, a
new one will be generated. This value (whether specified or generated) is
included in the response.id - The id of the label to retrieve@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response updateLabel(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String id,
String label,
DoubleParameter x,
DoubleParameter y,
DoubleParameter width,
DoubleParameter height,
javax.ws.rs.core.MultivaluedMap<String,String> formParams)
httpServletRequest - version - The revision is used to verify the client is working with
the latest version of the flow.clientId - Optional client id. If the client id is not specified, a
new one will be generated. This value (whether specified or generated) is
included in the response.id - The id of the label to update.x - The x coordinate for this funnels position.y - The y coordinate for this funnels position.width - The width of the label.height - The height of the label.label - The label's value.formParams - Additionally, the label styles are specified in the
form parameters. They are specified in a map-like fashion:
@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response updateLabel(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
String id,
LabelEntity labelEntity)
httpServletRequest - id - The id of the label to update.labelEntity - A labelEntity.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response removeLabel(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String id)
httpServletRequest - version - The revision is used to verify the client is working with
the latest version of the flow.clientId - Optional client id. If the client id is not specified, a
new one will be generated. This value (whether specified or generated) is
included in the response.id - The id of the label to remove.public void setServiceFacade(NiFiServiceFacade serviceFacade)
public void setGroupId(String groupId)
public void setClusterManager(WebClusterManager clusterManager)
public void setProperties(NiFiProperties properties)
Copyright © 2015 Apache NiFi (incubating). All rights reserved.