public class ProcessorResource extends ApplicationResource
| Modifier and Type | Field and Description |
|---|---|
private WebClusterManager |
clusterManager |
private String |
groupId |
private static org.slf4j.Logger |
logger |
private static List<Long> |
POSSIBLE_RUN_DURATIONS |
private NiFiProperties |
properties |
private NiFiServiceFacade |
serviceFacade |
private javax.servlet.ServletContext |
servletContext |
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 |
|---|
ProcessorResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createProcessor(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String name,
String type,
DoubleParameter x,
DoubleParameter y)
Creates a new processor.
|
javax.ws.rs.core.Response |
createProcessor(javax.servlet.http.HttpServletRequest httpServletRequest,
ProcessorEntity processorEntity)
Creates a new processor.
|
javax.ws.rs.core.Response |
deleteProcessor(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String id)
Removes the specified processor.
|
javax.ws.rs.core.Response |
getProcessor(ClientIdParameter clientId,
String id)
Retrieves the specified processor.
|
javax.ws.rs.core.Response |
getProcessors(ClientIdParameter clientId)
Retrieves all the processors in this NiFi.
|
javax.ws.rs.core.Response |
getProcessorStatusHistory(ClientIdParameter clientId,
String id)
Retrieves the specified processor status history.
|
private ProcessorDTO |
populateRemainingProcessorContent(ProcessorDTO processor)
Populate the uri's for the specified processor and its relationships.
|
Set<ProcessorDTO> |
populateRemainingProcessorsContent(Set<ProcessorDTO> processors)
Populate the uri's for the specified processors and their relationships.
|
void |
setClusterManager(WebClusterManager clusterManager) |
void |
setGroupId(String groupId) |
void |
setProperties(NiFiProperties properties) |
void |
setServiceFacade(NiFiServiceFacade serviceFacade) |
javax.ws.rs.core.Response |
updateProcessor(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String id,
DoubleParameter x,
DoubleParameter y,
String name,
IntegerParameter concurrentlySchedulableTaskCount,
String schedulingPeriod,
String penaltyDuration,
String yieldDuration,
LongParameter runDurationMillis,
String bulletinLevel,
String schedulingStrategy,
String comments,
List<String> markedForDeletion,
String state,
javax.ws.rs.core.MultivaluedMap<String,String> formParams)
Updates the specified processor with the specified values.
|
javax.ws.rs.core.Response |
updateProcessor(javax.servlet.http.HttpServletRequest httpServletRequest,
String id,
ProcessorEntity processorEntity)
Updates the specified processor with the specified values.
|
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
@Context private javax.servlet.ServletContext servletContext
public Set<ProcessorDTO> populateRemainingProcessorsContent(Set<ProcessorDTO> processors)
processors - private ProcessorDTO populateRemainingProcessorContent(ProcessorDTO processor)
processor - @PreAuthorize(value="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response getProcessors(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 createProcessor(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String name,
String type,
DoubleParameter x,
DoubleParameter y)
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.name - The name of the new processor.type - The type of the new processor. This type should refer to one
of the types in the GET /controller/processor-types response.x - The x coordinate for this funnels position.y - The y coordinate for this funnels position.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response createProcessor(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
ProcessorEntity processorEntity)
httpServletRequest - processorEntity - A processorEntity.@PreAuthorize(value="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response getProcessor(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 processor to retrieve.@PreAuthorize(value="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response getProcessorStatusHistory(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 processor history to retrieve.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response updateProcessor(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String id,
DoubleParameter x,
DoubleParameter y,
String name,
IntegerParameter concurrentlySchedulableTaskCount,
String schedulingPeriod,
String penaltyDuration,
String yieldDuration,
LongParameter runDurationMillis,
String bulletinLevel,
String schedulingStrategy,
String comments,
List<String> markedForDeletion,
String state,
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 processor to update.x - The x coordinate for this processors position.y - The y coordinate for this processors position.name - The name of the processor.concurrentlySchedulableTaskCount - The number of
concurrentlySchedulableTasksschedulingPeriod - The scheduling periodschedulingStrategy - The scheduling strategypenaltyDuration - The penalty durationyieldDuration - The yield durationrunDurationMillis - The run duration in millisecondsbulletinLevel - The bulletin levelcomments - Any comments about this processor.markedForDeletion - Array of property names whose value should be
removed.state - The processors state.formParams - Additionally, the processor properties and styles are
specified in the form parameters. Because the property names and styles
differ from processor to processor they are specified in a map-like
fashion:
@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response updateProcessor(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
String id,
ProcessorEntity processorEntity)
httpServletRequest - id - The id of the processor to update.processorEntity - A processorEntity.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response deleteProcessor(@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 processor 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.