Class JerseyFlowClient
java.lang.Object
org.apache.nifi.toolkit.client.impl.AbstractJerseyClient
org.apache.nifi.toolkit.client.impl.JerseyFlowClient
- All Implemented Interfaces:
FlowClient
Jersey implementation of FlowClient.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.nifi.toolkit.client.impl.AbstractJerseyClient
AbstractJerseyClient.NiFiAction<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final jakarta.ws.rs.client.WebTarget(package private) static final String -
Constructor Summary
ConstructorsConstructorDescriptionJerseyFlowClient(jakarta.ws.rs.client.WebTarget baseTarget) JerseyFlowClient(jakarta.ws.rs.client.WebTarget baseTarget, RequestConfig requestConfig) -
Method Summary
Modifier and TypeMethodDescriptionactivateControllerServices(ActivateControllerServicesEntity activateControllerServicesEntity) Enable or disable controller services in the given process group.getConnectionStatus(String connectionId, boolean nodewise) Retrieves the status for the connection with the given IDRetrieves the controller services for the reporting tasks.getControllerServices(String groupId) Retrieves the controller services for the given group.Retrieves the available controller service types.getFlowRegistryBranches(String registryClientId) Returns the list of branches for the specified registry client IDgetFlowRegistryBuckets(String registryClientId, String branch) Returns the list of buckets in a given branch for the specified registry client IDgetFlowRegistryFlows(String registryClientId, String branch, String bucket) Returns the list of flows in a given branch and bucket for the specified registry client IDRetrieves the parameter providers.Retrieves the process group with the given id.getProcessGroupStatus(String groupId, boolean recursive) Retrieves the status for the process group with the given IDRetrieves the available processor types.Retrieves the reporting tasks.org.apache.nifi.flow.VersionedReportingTaskSnapshotRetrieves the snapshot of all reporting tasks and their respective controller services.org.apache.nifi.flow.VersionedReportingTaskSnapshotgetReportingTaskSnapshot(String reportingTaskId) Retrieves the snapshot of the given reporting task and it's respective controller services.Retrieves the available reporting task types.getSuggestedProcessGroupCoordinates(String parentId) Suggest a location for the new process group on a canvas, within a given process group.getVersions(String registryId, String bucketId, String flowId) Gets the possible versions for the given flow in the given bucket in the given registry.getVersions(String registryId, String bucketId, String flowId, String branch) Gets the possible versions for the given flow in the given bucket/branch in the given registry.scheduleProcessGroupComponents(String processGroupId, ScheduleComponentsEntity scheduleComponentsEntity) Schedules the components of a process group.Methods inherited from class org.apache.nifi.toolkit.client.impl.AbstractJerseyClient
executeAction, getContentDispositionFilename, getIOExceptionCause, getRequestBuilder, getRequestConfig
-
Field Details
-
ROOT
- See Also:
-
flowTarget
private final jakarta.ws.rs.client.WebTarget flowTarget
-
-
Constructor Details
-
JerseyFlowClient
public JerseyFlowClient(jakarta.ws.rs.client.WebTarget baseTarget) -
JerseyFlowClient
-
-
Method Details
-
getCurrentUser
- Specified by:
getCurrentUserin interfaceFlowClient- Returns:
- the entity representing the current user accessing the NiFi instance
- Throws:
NiFiClientExceptionIOException
-
getRootGroupId
- Specified by:
getRootGroupIdin interfaceFlowClient- Returns:
- the id of the root process group
- Throws:
NiFiClientExceptionIOException
-
getProcessGroup
Description copied from interface:FlowClientRetrieves the process group with the given id. Passing in "root" as the id will retrieve the root group.- Specified by:
getProcessGroupin interfaceFlowClient- Parameters:
id- the id of the process group to retrieve- Returns:
- the process group entity
- Throws:
NiFiClientExceptionIOException
-
getSuggestedProcessGroupCoordinates
public ProcessGroupBox getSuggestedProcessGroupCoordinates(String parentId) throws NiFiClientException, IOException Description copied from interface:FlowClientSuggest a location for the new process group on a canvas, within a given process group. Will locate to the right and then bottom and offset for the size of the PG box.- Specified by:
getSuggestedProcessGroupCoordinatesin interfaceFlowClient- Parameters:
parentId- the id of the parent process group where the new process group will be located- Returns:
- the process group box where a new process group can be placed
- Throws:
NiFiClientExceptionIOException
-
scheduleProcessGroupComponents
public ScheduleComponentsEntity scheduleProcessGroupComponents(String processGroupId, ScheduleComponentsEntity scheduleComponentsEntity) throws NiFiClientException, IOException Description copied from interface:FlowClientSchedules the components of a process group.- Specified by:
scheduleProcessGroupComponentsin interfaceFlowClient- Parameters:
processGroupId- the id of a process groupscheduleComponentsEntity- the scheduled state to update to- Returns:
- the entity representing the scheduled state
- Throws:
NiFiClientExceptionIOException
-
getVersions
public VersionedFlowSnapshotMetadataSetEntity getVersions(String registryId, String bucketId, String flowId) throws NiFiClientException, IOException Description copied from interface:FlowClientGets the possible versions for the given flow in the given bucket in the given registry.- Specified by:
getVersionsin interfaceFlowClient- Parameters:
registryId- the id of the registry clientbucketId- the bucket idflowId- the flow id- Returns:
- the set of snapshot metadata entities
- Throws:
NiFiClientExceptionIOException
-
getVersions
public VersionedFlowSnapshotMetadataSetEntity getVersions(String registryId, String bucketId, String flowId, String branch) throws NiFiClientException, IOException Description copied from interface:FlowClientGets the possible versions for the given flow in the given bucket/branch in the given registry.- Specified by:
getVersionsin interfaceFlowClient- Parameters:
registryId- the id of the registry clientbucketId- the bucket idflowId- the flow idbranch- the branch name- Returns:
- the set of snapshot metadata entities
- Throws:
NiFiClientExceptionIOException
-
getControllerServices
public ControllerServicesEntity getControllerServices(String groupId) throws NiFiClientException, IOException Description copied from interface:FlowClientRetrieves the controller services for the given group.- Specified by:
getControllerServicesin interfaceFlowClient- Parameters:
groupId- the process group id- Returns:
- the controller services entity
- Throws:
NiFiClientExceptionIOException
-
activateControllerServices
public ActivateControllerServicesEntity activateControllerServices(ActivateControllerServicesEntity activateControllerServicesEntity) throws NiFiClientException, IOException Description copied from interface:FlowClientEnable or disable controller services in the given process group.- Specified by:
activateControllerServicesin interfaceFlowClient- Parameters:
activateControllerServicesEntity- the entity indicating the process group to enable/disable services for- Returns:
- the activate response
- Throws:
NiFiClientExceptionIOException
-
getClusterSummary
- Specified by:
getClusterSummaryin interfaceFlowClient- Returns:
- cluster summary response
- Throws:
NiFiClientExceptionIOException
-
getControllerServices
Description copied from interface:FlowClientRetrieves the controller services for the reporting tasks.- Specified by:
getControllerServicesin interfaceFlowClient- Returns:
- the controller services entity
- Throws:
NiFiClientExceptionIOException
-
getReportingTasks
Description copied from interface:FlowClientRetrieves the reporting tasks.- Specified by:
getReportingTasksin interfaceFlowClient- Returns:
- the reporting tasks entity
- Throws:
NiFiClientExceptionIOException
-
getReportingTaskSnapshot
public org.apache.nifi.flow.VersionedReportingTaskSnapshot getReportingTaskSnapshot() throws NiFiClientException, IOExceptionDescription copied from interface:FlowClientRetrieves the snapshot of all reporting tasks and their respective controller services.- Specified by:
getReportingTaskSnapshotin interfaceFlowClient- Returns:
- the snapshot
- Throws:
NiFiClientExceptionIOException
-
getReportingTaskSnapshot
public org.apache.nifi.flow.VersionedReportingTaskSnapshot getReportingTaskSnapshot(String reportingTaskId) throws NiFiClientException, IOException Description copied from interface:FlowClientRetrieves the snapshot of the given reporting task and it's respective controller services.- Specified by:
getReportingTaskSnapshotin interfaceFlowClient- Returns:
- the snapshot
- Throws:
NiFiClientExceptionIOException
-
getParamProviders
Description copied from interface:FlowClientRetrieves the parameter providers.- Specified by:
getParamProvidersin interfaceFlowClient- Returns:
- the parameter providers entity
- Throws:
NiFiClientExceptionIOException
-
getConnectionStatus
public ConnectionStatusEntity getConnectionStatus(String connectionId, boolean nodewise) throws NiFiClientException, IOException Description copied from interface:FlowClientRetrieves the status for the connection with the given ID- Specified by:
getConnectionStatusin interfaceFlowClient- Parameters:
connectionId- the id of the connectionnodewise- whether or not node-wise information should be returned- Returns:
- the status for the connection
- Throws:
NiFiClientExceptionIOException
-
getProcessGroupStatus
public ProcessGroupStatusEntity getProcessGroupStatus(String groupId, boolean recursive) throws NiFiClientException, IOException Description copied from interface:FlowClientRetrieves the status for the process group with the given ID- Specified by:
getProcessGroupStatusin interfaceFlowClient- Parameters:
groupId- the id of the process grouprecursive- whether or not to recurse into sub groups- Returns:
- the status for the process group
- Throws:
NiFiClientExceptionIOException
-
getProcessorTypes
Description copied from interface:FlowClientRetrieves the available processor types.- Specified by:
getProcessorTypesin interfaceFlowClient- Returns:
- the processor types
- Throws:
NiFiClientExceptionIOException
-
getControllerServiceTypes
public ControllerServiceTypesEntity getControllerServiceTypes() throws NiFiClientException, IOExceptionDescription copied from interface:FlowClientRetrieves the available controller service types.- Specified by:
getControllerServiceTypesin interfaceFlowClient- Returns:
- the controller service types
- Throws:
NiFiClientExceptionIOException
-
getReportingTaskTypes
Description copied from interface:FlowClientRetrieves the available reporting task types.- Specified by:
getReportingTaskTypesin interfaceFlowClient- Returns:
- the reporting task types
- Throws:
NiFiClientExceptionIOException
-
getFlowRegistryBranches
public FlowRegistryBranchesEntity getFlowRegistryBranches(String registryClientId) throws NiFiClientException, IOException Description copied from interface:FlowClientReturns the list of branches for the specified registry client ID- Specified by:
getFlowRegistryBranchesin interfaceFlowClient- Parameters:
registryClientId- Registry Client ID- Returns:
- list of branches
- Throws:
NiFiClientExceptionIOException
-
getFlowRegistryBuckets
public FlowRegistryBucketsEntity getFlowRegistryBuckets(String registryClientId, String branch) throws NiFiClientException, IOException Description copied from interface:FlowClientReturns the list of buckets in a given branch for the specified registry client ID- Specified by:
getFlowRegistryBucketsin interfaceFlowClient- Parameters:
registryClientId- Registry Client IDbranch- Name of the branch- Returns:
- list of buckets
- Throws:
NiFiClientExceptionIOException
-
getFlowRegistryFlows
public VersionedFlowsEntity getFlowRegistryFlows(String registryClientId, String branch, String bucket) throws NiFiClientException, IOException Description copied from interface:FlowClientReturns the list of flows in a given branch and bucket for the specified registry client ID- Specified by:
getFlowRegistryFlowsin interfaceFlowClient- Parameters:
registryClientId- Registry Client IDbranch- Name of the branchbucket- ID of the bucket- Returns:
- list of flows
- Throws:
NiFiClientExceptionIOException
-