public class ConnectionResource 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 |
|---|
ConnectionResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createConnection(javax.servlet.http.HttpServletRequest httpServletRequest,
ConnectionEntity connectionEntity)
Creates a new connection.
|
javax.ws.rs.core.Response |
createConnection(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String name,
String sourceId,
String sourceGroupId,
ConnectableTypeParameter sourceType,
Set<String> relationships,
List<String> bends,
String flowFileExpiration,
LongParameter backPressureObjectThreshold,
String backPressureDataSizeThreshold,
List<String> prioritizers,
String destinationId,
String destinationGroupId,
ConnectableTypeParameter destinationType,
javax.ws.rs.core.MultivaluedMap<String,String> formParams)
Creates a connection.
|
javax.ws.rs.core.Response |
deleteRelationshipTarget(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String id)
Removes the specified connection.
|
javax.ws.rs.core.Response |
getConnection(ClientIdParameter clientId,
String id)
Retrieves the specified connection.
|
javax.ws.rs.core.Response |
getConnections(ClientIdParameter clientId)
Gets all the connections.
|
javax.ws.rs.core.Response |
getConnectionStatusHistory(ClientIdParameter clientId,
String id)
Retrieves the specified connection status history.
|
private ConnectionDTO |
populateRemainingConnectionContent(ConnectionDTO connection)
Populate the uri's for the specified processor and its relationships.
|
Set<ConnectionDTO> |
populateRemainingConnectionsContent(Set<ConnectionDTO> connections)
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 |
updateConnection(javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String connectionId,
String name,
Set<String> relationships,
List<String> bends,
IntegerParameter labelIndex,
LongParameter zIndex,
String flowFileExpiration,
LongParameter backPressureObjectThreshold,
String backPressureDataSizeThreshold,
List<String> prioritizers,
String destinationId,
String destinationGroupId,
ConnectableTypeParameter destinationType,
javax.ws.rs.core.MultivaluedMap<String,String> formParams)
Updates the specified relationship target.
|
javax.ws.rs.core.Response |
updateConnection(javax.servlet.http.HttpServletRequest httpServletRequest,
String id,
ConnectionEntity connectionEntity)
Updates the specified connection.
|
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<ConnectionDTO> populateRemainingConnectionsContent(Set<ConnectionDTO> connections)
connections - private ConnectionDTO populateRemainingConnectionContent(ConnectionDTO connection)
connection - @PreAuthorize(value="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response getConnections(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="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response getConnection(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 connection.@PreAuthorize(value="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response getConnectionStatusHistory(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 connection to retrieve.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response createConnection(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String name,
String sourceId,
String sourceGroupId,
ConnectableTypeParameter sourceType,
Set<String> relationships,
List<String> bends,
String flowFileExpiration,
LongParameter backPressureObjectThreshold,
String backPressureDataSizeThreshold,
List<String> prioritizers,
String destinationId,
String destinationGroupId,
ConnectableTypeParameter destinationType,
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.name - The name of the connection.sourceId - The id of the source connectable.sourceGroupId - The parent group id for the source.sourceType - The type of the source connectable.bends - Array of bend points in string form ["x,y", "x,y", "x,y"]relationships - Array of relationships.flowFileExpiration - The flow file expiration in minutesbackPressureObjectThreshold - The object count for when to apply
back pressure.backPressureDataSizeThreshold - The object size for when to apply
back pressure.prioritizers - Array of prioritizer types. These types should refer
to one of the types in the GET /controller/prioritizers response. If this
parameter is not specified no change will be made. If this parameter
appears with no value (empty string), it will be treated as an empty
array.destinationId - The id of the destination connectable.destinationGroupId - The parent group id for the destination.destinationType - The type of the destination connectable.formParams - @PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response createConnection(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
ConnectionEntity connectionEntity)
httpServletRequest - connectionEntity - A connectionEntity.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response updateConnection(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
LongParameter version,
ClientIdParameter clientId,
String connectionId,
String name,
Set<String> relationships,
List<String> bends,
IntegerParameter labelIndex,
LongParameter zIndex,
String flowFileExpiration,
LongParameter backPressureObjectThreshold,
String backPressureDataSizeThreshold,
List<String> prioritizers,
String destinationId,
String destinationGroupId,
ConnectableTypeParameter destinationType,
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.connectionId - The id of the source processor.name - The name of the connection.relationships - Array of relationships.bends - Array of bend points in string form ["x,y", "x,y", "x,y"]labelIndex - The control point index for the connection labelzIndex - The zIndex for this connectionflowFileExpiration - The flow file expiration in minutesbackPressureObjectThreshold - The object count for when to apply
back pressure.backPressureDataSizeThreshold - The object size for when to apply
back pressure.prioritizers - Array of prioritizer types. These types should refer
to one of the types in the GET /controller/prioritizers response. If this
parameter is not specified no change will be made. If this parameter
appears with no value (empty string), it will be treated as an empty
array.destinationId - The id of the destination connectable.destinationGroupId - The group id of the destination.destinationType - The type of the destination type.formParams - @PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response updateConnection(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
String id,
ConnectionEntity connectionEntity)
httpServletRequest - id - The id of the connection.connectionEntity - A connectionEntity.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response deleteRelationshipTarget(@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 connection.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.