public class SnippetResource extends ApplicationResource
| Modifier and Type | Field and Description |
|---|---|
private WebClusterManager |
clusterManager |
private static String |
LINKED |
private static org.slf4j.Logger |
logger |
private NiFiProperties |
properties |
private com.sun.jersey.api.core.ResourceContext |
resourceContext |
private NiFiServiceFacade |
serviceFacade |
private static String |
VERBOSE |
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 |
|---|
SnippetResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createSnippet(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String parentGroupId,
Boolean linked,
List<String> processorIds,
List<String> processGroupIds,
List<String> remoteProcessGroupIds,
List<String> inputPortIds,
List<String> outputPortIds,
List<String> connectionIds,
List<String> labelIds,
List<String> funnelIds)
Creates a new snippet based on the specified contents.
|
javax.ws.rs.core.Response |
createSnippet(javax.servlet.http.HttpServletRequest httpServletRequest,
SnippetEntity snippetEntity)
Creates a snippet based off the specified configuration.
|
private ConnectionResource |
getConnectionResource(String groupId)
Get the connection sub-resource within the specified group.
|
private FunnelResource |
getFunnelResource(String groupId)
Locates the funnel sub-resource within the specified group.
|
private InputPortResource |
getInputPortResource(String groupId)
Get the input ports sub-resource within the specified group.
|
private LabelResource |
getLabelResource(String groupId)
Locates the label sub-resource within the specified group.
|
private OutputPortResource |
getOutputPortResource(String groupId)
Get the output ports sub-resource within the specified group.
|
private ProcessGroupResource |
getProcessGroupResource(String groupId)
Locates the process group sub-resource within the specified group.
|
private ProcessorResource |
getProcessorResource(String groupId)
Get the processor resource within the specified group.
|
private RemoteProcessGroupResource |
getRemoteProcessGroupResource(String groupId)
Locates the remote process group sub-resource within the specified group.
|
javax.ws.rs.core.Response |
getSnippet(ClientIdParameter clientId,
Boolean verbose,
String id)
Retrieves the specified snippet.
|
private SnippetDTO |
populateRemainingSnippetContent(SnippetDTO snippet)
Populates the uri for the specified snippet.
|
javax.ws.rs.core.Response |
removeSnippet(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String id)
Removes the specified snippet.
|
void |
setClusterManager(WebClusterManager clusterManager) |
void |
setProperties(NiFiProperties properties) |
void |
setServiceFacade(NiFiServiceFacade serviceFacade) |
javax.ws.rs.core.Response |
updateSnippet(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
Boolean verbose,
String id,
String parentGroupId,
Boolean linked)
Updates the specified snippet.
|
javax.ws.rs.core.Response |
updateSnippet(javax.servlet.http.HttpServletRequest httpServletRequest,
String id,
SnippetEntity snippetEntity)
Updates the specified snippet.
|
clusterContext, generateContinueResponse, generateCreatedResponse, generateOkResponse, generateOkResponse, generateResourceUri, getAbsolutePath, getClusterContextFromRequest, getHeaders, getHeaders, getRequestParameters, getRequestParameters, noCache, updateClientIdprivate static final org.slf4j.Logger logger
private static final String LINKED
private static final String VERBOSE
@Context private com.sun.jersey.api.core.ResourceContext resourceContext
private NiFiServiceFacade serviceFacade
private WebClusterManager clusterManager
private NiFiProperties properties
private ProcessorResource getProcessorResource(String groupId)
private ConnectionResource getConnectionResource(String groupId)
private InputPortResource getInputPortResource(String groupId)
private OutputPortResource getOutputPortResource(String groupId)
private LabelResource getLabelResource(String groupId)
private FunnelResource getFunnelResource(String groupId)
private RemoteProcessGroupResource getRemoteProcessGroupResource(String groupId)
private ProcessGroupResource getProcessGroupResource(String groupId)
groupId - private SnippetDTO populateRemainingSnippetContent(SnippetDTO snippet)
@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response createSnippet(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String parentGroupId,
Boolean linked,
List<String> processorIds,
List<String> processGroupIds,
List<String> remoteProcessGroupIds,
List<String> inputPortIds,
List<String> outputPortIds,
List<String> connectionIds,
List<String> labelIds,
List<String> funnelIds)
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.parentGroupId - The id of the process group the components in this
snippet belong to.linked - Whether or not this snippet is linked to the underlying
data flow. If a linked snippet is deleted, the components that comprise
the snippet are also deleted.processorIds - The ids of any processors in this snippet.processGroupIds - The ids of any process groups in this snippet.remoteProcessGroupIds - The ids of any remote process groups in this
snippet.inputPortIds - The ids of any input ports in this snippet.outputPortIds - The ids of any output ports in this snippet.connectionIds - The ids of any connections in this snippet.labelIds - The ids of any labels in this snippet.funnelIds - The ids of any funnels in this snippet.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response createSnippet(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
SnippetEntity snippetEntity)
httpServletRequest - snippetEntity - A snippetEntity@PreAuthorize(value="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response getSnippet(ClientIdParameter clientId, Boolean verbose, 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.verbose - Whether or not to include the contents of the snippet in
the response.id - The id of the snippet to retrieve.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response updateSnippet(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
Boolean verbose,
String id,
String parentGroupId,
Boolean linked)
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.verbose - Whether or not to include the contents of the snippet in
the response.id - The id of the snippet to update.parentGroupId - The id of the process group to move the contents of
this snippet to.linked - Whether or not this snippet is linked to the underlying
data flow. If a linked snippet is deleted, the components that comprise
the snippet are also deleted.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response updateSnippet(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
String id,
SnippetEntity snippetEntity)
httpServletRequest - id - The id of the snippet.snippetEntity - A snippetEntity@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response removeSnippet(@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 snippet to remove.public void setServiceFacade(NiFiServiceFacade serviceFacade)
public void setClusterManager(WebClusterManager clusterManager)
public void setProperties(NiFiProperties properties)
Copyright © 2015 Apache NiFi (incubating). All rights reserved.