java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
org.odpi.openmetadata.frameworks.opengovernance.connectorcontext.StewardshipAction

public class StewardshipAction extends ConnectorContextClientBase
StewardshipAction defines methods that are used to request help for a situation that the caller can not handle.
  • 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 context
      localServerName - local server where this client is running - used for error handling
      localServiceName - local service that his connector is hosted by - used for error handling
      connectorUserId - the userId to use with all requests for open metadata
      connectorGUID - the unique identifier that represents this connector in open metadata
      externalSourceGUID - unique identifier of the software server capability for the source of metadata
      externalSourceName - unique name of the software server capability for the source of metadata
      openGovernanceClient - client to access governance functions
      auditLog - logging destination
      maxPageSize - 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, PropertyServerException
      Create 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 action
      domainIdentifier - governance domain associated with this action (0=ALL)
      displayName - display name for this action
      description - description for this action
      actionSourceGUIDs - request source elements for the resulting engine action
      actionCauseGUIDs - request cause elements for the resulting engine action
      actionTargets - list of action target names to GUIDs for the resulting engine action
      receivedGuards - list of guards to initiate the engine action
      startTime - future start time or null for "as soon as possible"
      governanceEngineName - name of the governance engine that should execute the request
      requestType - governance request type from the caller
      requestParameters - properties to pass to the governance service
      processName - name of the process that this action is a part of
      requestSourceName - source of the request
      originatorServiceName - 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 name
      UserNotAuthorizedException - the caller is not authorized to create an engine action
      PropertyServerException - 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, PropertyServerException
      Using the named governance action type as a template, initiate an engine action.
      Parameters:
      governanceActionTypeQualifiedName - unique name of the governance action type to use
      actionSourceGUIDs - request source elements for the resulting engine action
      actionCauseGUIDs - request cause elements for the resulting engine action
      actionTargets - list of action target names to GUIDs for the resulting engine action
      startTime - future start time or null for "as soon as possible".
      requestParameters - request properties to be passed to the engine action
      originatorServiceName - 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 type
      UserNotAuthorizedException - the caller is not authorized to create an engine action
      PropertyServerException - 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, PropertyServerException
      Using the named governance action process as a template, initiate a chain of engine actions.
      Parameters:
      processQualifiedName - unique name of the governance action process to use
      actionSourceGUIDs - request source elements for the resulting engine action
      actionCauseGUIDs - request cause elements for the resulting engine action
      actionTargets - list of action target names to GUIDs for the resulting engine action
      startTime - future start time or null for "as soon as possible".
      requestParameters - request properties to be passed to the first engine action
      originatorServiceName - 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 process
      UserNotAuthorizedException - the caller is not authorized to create a governance action process
      PropertyServerException - 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 element
      pageSize - 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.