Class GovernanceEngineClient

java.lang.Object
org.odpi.openmetadata.frameworks.governanceaction.client.OpenGovernanceClient
org.odpi.openmetadata.frameworkservices.gaf.client.OpenGovernanceClientBase
org.odpi.openmetadata.accessservices.governanceengine.client.GovernanceEngineClient
All Implemented Interfaces:
org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface, org.odpi.openmetadata.frameworks.governanceaction.client.GovernanceCompletionInterface, org.odpi.openmetadata.frameworks.governanceaction.client.SpecialGovernanceActionInterface

public class GovernanceEngineClient extends org.odpi.openmetadata.frameworkservices.gaf.client.OpenGovernanceClientBase implements org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
GovernanceEngineClient sits in the governance context of a governance action service when it is running in the engine host OMAG server. It is however shared by all the governance action services running in an engine service so that we only need one connector to the topic listener for the watchdog governance services.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GovernanceEngineClient(String serverName, String serverPlatformURLRoot)
    Create a new client with no authentication embedded in the HTTP request.
    GovernanceEngineClient(String serverName, String serverPlatformURLRoot, String serverUserId, String serverPassword)
    Create a new client that passes userId and password in each HTTP request.
    GovernanceEngineClient(String serverName, String serverPlatformURLRoot, GovernanceEngineRESTClient restClient, int maxPageSize)
    Create a new client that passes userId and password in each HTTP request.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    claimGovernanceAction(String userId, String governanceActionGUID)
    Request that execution of a governance action is allocated to the caller.
    List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement>
    findGovernanceActions(String userId, String searchString, int startFrom, int pageSize)
    Retrieve the list of governance action type metadata elements that contain the search string.
    List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement>
    getActiveClaimedGovernanceActions(String userId, String governanceEngineGUID, int startFrom, int pageSize)
    Retrieve the governance actions that are still in process and that have been claimed by this caller's userId.
    List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement>
    getActiveGovernanceActions(String userId, int startFrom, int pageSize)
    Retrieve the governance actions that are still in process.
    org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement
    getGovernanceAction(String userId, String governanceActionGUID)
    Request the status of an executing governance action request.
    List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement>
    getGovernanceActions(String userId, int startFrom, int pageSize)
    Retrieve the governance actions known to the server.
    List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement>
    getGovernanceActionsByName(String userId, String name, int startFrom, int pageSize)
    Retrieve the list of governance action type metadata elements with a matching qualified or display name.
    void
    updateGovernanceActionStatus(String userId, String governanceActionGUID, org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionStatus governanceActionStatus)
    Update the status of the governance action - providing the caller is permitted.

    Methods inherited from class org.odpi.openmetadata.frameworkservices.gaf.client.OpenGovernanceClientBase

    disconnectListener, initiateGovernanceAction, initiateGovernanceActionProcess, linkConsolidatedDuplicate, linkElementsAsPeerDuplicates, recordCompletionStatus, registerListener, setListenerManager, updateActionTargetStatus

    Methods inherited from class org.odpi.openmetadata.frameworks.governanceaction.client.OpenGovernanceClient

    toString

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface

    recordCompletionStatus, updateActionTargetStatus
  • Constructor Details

    • GovernanceEngineClient

      public GovernanceEngineClient(String serverName, String serverPlatformURLRoot) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • GovernanceEngineClient

      public GovernanceEngineClient(String serverName, String serverPlatformURLRoot, String serverUserId, String serverPassword) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      serverUserId - caller's userId embedded in all HTTP requests
      serverPassword - caller's password embedded in all HTTP requests
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • GovernanceEngineClient

      public GovernanceEngineClient(String serverName, String serverPlatformURLRoot, GovernanceEngineRESTClient restClient, int maxPageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      restClient - pre-initialized REST client
      maxPageSize - pre-initialized parameter limit
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - there is a problem with the information about the remote OMAS
  • Method Details

    • updateGovernanceActionStatus

      public void updateGovernanceActionStatus(String userId, String governanceActionGUID, org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionStatus governanceActionStatus) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Update the status of the governance action - providing the caller is permitted.
      Specified by:
      updateGovernanceActionStatus in interface org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
      Parameters:
      userId - identifier of calling user
      governanceActionGUID - identifier of the governance action request
      governanceActionStatus - new status enum
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - user not authorized to issue this request.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem detected by the metadata store.
    • getGovernanceAction

      public org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement getGovernanceAction(String userId, String governanceActionGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Request the status of an executing governance action request.
      Specified by:
      getGovernanceAction in interface org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
      Parameters:
      userId - identifier of calling user
      governanceActionGUID - identifier of the governance action request.
      Returns:
      status enum
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - user not authorized to issue this request.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem detected by the metadata store.
    • claimGovernanceAction

      public void claimGovernanceAction(String userId, String governanceActionGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Request that execution of a governance action is allocated to the caller.
      Specified by:
      claimGovernanceAction in interface org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
      Parameters:
      userId - identifier of calling user
      governanceActionGUID - identifier of the governance action request.
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - user not authorized to issue this request.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem detected by the metadata store.
    • getGovernanceActions

      public List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement> getGovernanceActions(String userId, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Retrieve the governance actions known to the server.
      Specified by:
      getGovernanceActions in interface org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
      Parameters:
      userId - userId of caller
      startFrom - starting from element
      pageSize - maximum elements to return
      Returns:
      list of governance action elements
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - user not authorized to issue this request.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem detected by the metadata store.
    • getActiveGovernanceActions

      public List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement> getActiveGovernanceActions(String userId, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Retrieve the governance actions that are still in process.
      Specified by:
      getActiveGovernanceActions in interface org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
      Parameters:
      userId - userId of caller
      startFrom - starting from element
      pageSize - maximum elements to return
      Returns:
      list of governance action elements
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - user not authorized to issue this request.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem detected by the metadata store.
    • getActiveClaimedGovernanceActions

      public List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement> getActiveClaimedGovernanceActions(String userId, String governanceEngineGUID, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Retrieve the governance actions that are still in process and that have been claimed by this caller's userId. This call is used when the caller restarts.
      Specified by:
      getActiveClaimedGovernanceActions in interface org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
      Parameters:
      userId - userId of caller
      governanceEngineGUID - unique identifier of governance engine
      startFrom - starting from element
      pageSize - maximum elements to return
      Returns:
      list of governance action elements
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is null or invalid.
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - user not authorized to issue this request.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there was a problem detected by the metadata store.
    • findGovernanceActions

      public List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement> findGovernanceActions(String userId, String searchString, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Retrieve the list of governance action type metadata elements that contain the search string. The search string is treated as a regular expression.
      Specified by:
      findGovernanceActions in interface org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
      Parameters:
      userId - calling user
      searchString - string to find in the properties
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem reported in the open metadata server(s)
    • getGovernanceActionsByName

      public List<org.odpi.openmetadata.accessservices.governanceengine.metadataelements.GovernanceActionElement> getGovernanceActionsByName(String userId, String name, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Retrieve the list of governance action type metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Specified by:
      getGovernanceActionsByName in interface org.odpi.openmetadata.accessservices.governanceengine.api.GovernanceProcessingInterface
      Parameters:
      userId - calling user
      name - name to search for
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - one of the parameters is invalid
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the user is not authorized to issue this request
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem reported in the open metadata server(s)