Class StewardshipAction
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
org.odpi.openmetadata.frameworks.opengovernance.connectorcontext.StewardshipAction
StewardshipAction defines methods that are used to request help for a situation that the caller can not handle.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
asOfTimeDefault, auditLog, connectorGUID, connectorUserId, egeriaRelease, externalSourceGUID, externalSourceIsHome, externalSourceName, forDuplicateProcessing, forLineage, governanceZonesFilterDefault, limitResultsByStatusDefault, localServerName, localServiceName, maxPageSize, parentContext, propertyHelper, sequencingOrderDefault, sequencingPropertyDefault, useCurrentEffectiveTime -
Constructor Summary
ConstructorsConstructorDescriptionStewardshipAction(ConnectorContextBase parentContext, String localServerName, String localServiceName, String connectorUserId, String connectorGUID, String externalSourceGUID, String externalSourceName, OpenGovernanceClient openGovernanceClient, AuditLog auditLog, int maxPageSize) Constructor for the connector context client. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelEngineAction(String engineActionGUID) Request that execution of an engine action is stopped.getActiveEngineActions(int startFrom, int pageSize) Retrieve the engine actions that are still in process.initiateEngineAction(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, List<String> receivedGuards, Date startTime, String governanceEngineName, String requestType, Map<String, String> requestParameters, String processName, String requestSourceName, String originatorServiceName, String originatorEngineName) Create an engine action in the metadata store which will trigger the governance service associated with the supplied request type.initiateGovernanceActionProcess(String processQualifiedName, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) Using the named governance action process as a template, initiate a chain of engine actions.initiateGovernanceActionType(String governanceActionTypeQualifiedName, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) Using the named governance action type as a template, initiate an engine action.Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
getAdditionalProperties, getConnectorGUID, getDeleteOptions, getDisplayName, getEffectiveTime, getEgeriaRelease, getGetOptions, getMaxPagingSize, getMetadataSourceOptions, getNewElementProperties, getQualifiedName, getQueryOptions, getQueryOptions, getQueryOptions, getQueryOptions, getSearchOptions, getSearchOptions, getSearchOptions, getUpdateOptions, isForDuplicateProcessing, isForLineage, isUseCurrentEffectiveTime, publishElement, setAsOfTimeDefault, setEffectiveTimeDefault, setExternalSource, setExternalSourceIsHome, setForDuplicateProcessing, setForLineage, setGovernanceZonesFilterDefault, setLimitResultsByStatusDefault, setSequencingOrderDefault, setUseCurrentEffectiveTime, withdrawElement
-
Constructor Details
-
StewardshipAction
public StewardshipAction(ConnectorContextBase parentContext, String localServerName, String localServiceName, String connectorUserId, String connectorGUID, String externalSourceGUID, String externalSourceName, OpenGovernanceClient openGovernanceClient, AuditLog auditLog, int maxPageSize) Constructor for the connector context client.- Parameters:
parentContext- connector's contextlocalServerName- local server where this client is running - used for error handlinglocalServiceName- local service that his connector is hosted by - used for error handlingconnectorUserId- the userId to use with all requests for open metadataconnectorGUID- the unique identifier that represents this connector in open metadataexternalSourceGUID- unique identifier of the software server capability for the source of metadataexternalSourceName- unique name of the software server capability for the source of metadataopenGovernanceClient- client to access governance functionsauditLog- logging destinationmaxPageSize- max elements that can be returned on a query
-
-
Method Details
-
initiateEngineAction
public String initiateEngineAction(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, List<String> receivedGuards, Date startTime, String governanceEngineName, String requestType, Map<String, String> requestParameters, String processName, String requestSourceName, String originatorServiceName, String originatorEngineName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate an engine action in the metadata store which will trigger the governance service associated with the supplied request type. The engine action remains to act as a record of the actions taken for auditing.- Parameters:
qualifiedName- unique identifier to give this engine actiondomainIdentifier- governance domain associated with this action (0=ALL)displayName- display name for this actiondescription- description for this actionactionSourceGUIDs- request source elements for the resulting engine actionactionCauseGUIDs- request cause elements for the resulting engine actionactionTargets- list of action target names to GUIDs for the resulting engine actionreceivedGuards- list of guards to initiate the engine actionstartTime- future start time or null for "as soon as possible"governanceEngineName- name of the governance engine that should execute the requestrequestType- governance request type from the callerrequestParameters- properties to pass to the governance serviceprocessName- name of the process that this action is a part ofrequestSourceName- source of the requestoriginatorServiceName- unique name of the requesting governance service (if initiated by a governance engine).originatorEngineName- optional unique name of the requesting governance engine (if initiated by a governance engine).- Returns:
- unique identifier of the engine action
- Throws:
InvalidParameterException- null qualified nameUserNotAuthorizedException- the caller is not authorized to create an engine actionPropertyServerException- a problem with the metadata store
-
initiateGovernanceActionType
public String initiateGovernanceActionType(String governanceActionTypeQualifiedName, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionUsing the named governance action type as a template, initiate an engine action.- Parameters:
governanceActionTypeQualifiedName- unique name of the governance action type to useactionSourceGUIDs- request source elements for the resulting engine actionactionCauseGUIDs- request cause elements for the resulting engine actionactionTargets- list of action target names to GUIDs for the resulting engine actionstartTime- future start time or null for "as soon as possible".requestParameters- request properties to be passed to the engine actionoriginatorServiceName- unique name of the requesting governance service (if initiated by a governance engine).originatorEngineName- optional unique name of the governance engine (if initiated by a governance engine).- Returns:
- unique identifier of the engine action
- Throws:
InvalidParameterException- null or unrecognized qualified name of the typeUserNotAuthorizedException- the caller is not authorized to create an engine actionPropertyServerException- a problem with the metadata store
-
initiateGovernanceActionProcess
public String initiateGovernanceActionProcess(String processQualifiedName, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionUsing the named governance action process as a template, initiate a chain of engine actions.- Parameters:
processQualifiedName- unique name of the governance action process to useactionSourceGUIDs- request source elements for the resulting engine actionactionCauseGUIDs- request cause elements for the resulting engine actionactionTargets- list of action target names to GUIDs for the resulting engine actionstartTime- future start time or null for "as soon as possible".requestParameters- request properties to be passed to the first engine actionoriginatorServiceName- unique name of the requesting governance service (if initiated by a governance engine).originatorEngineName- optional unique name of the governance engine (if initiated by a governance engine).- Returns:
- unique identifier of the governance action process instance
- Throws:
InvalidParameterException- null or unrecognized qualified name of the processUserNotAuthorizedException- the caller is not authorized to create a governance action processPropertyServerException- a problem with the metadata store
-
cancelEngineAction
public void cancelEngineAction(String engineActionGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Request that execution of an engine action is stopped.- Parameters:
engineActionGUID- identifier of the engine action request.- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- there was a problem detected by the metadata store.
-
getActiveEngineActions
public List<EngineActionElement> getActiveEngineActions(int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the engine actions that are still in process.- Parameters:
startFrom- starting from elementpageSize- maximum elements to return- Returns:
- list of engine action elements
- Throws:
InvalidParameterException- one of the parameters is null or invalid.UserNotAuthorizedException- user not authorized to issue this request.PropertyServerException- there was a problem detected by the metadata store.
-