java.lang.Object
org.odpi.openmetadata.governanceservers.enginehostservices.enginemap.GovernanceEngineMap

public class GovernanceEngineMap extends Object
GovernanceEngineMap provides a thread safe mapping of governance engine names to governance engine handlers. This class allows the governance engine handler to be added after the engine host has started processing requests. It is not possible to create the governance handler until the governance engine definition has been retrieved from the metadata access server. So, unless the engine definition is linked explicitly to an engine service, the type of the governance engine handler is unknown. Retrieval of a governance engine definition may be triggered by an event, or by a refresh sweep of the metadata. Therefore, it is possible that two threads are responding to the creation of a new governance engine definition. Hence, the synchronized methods
  • Constructor Details

    • GovernanceEngineMap

      public GovernanceEngineMap(String localServerName, String localServerUserId, String localServerPassword, GovernanceConfigurationClient configurationClient, GovernanceContextClient engineActionClient, AuditLog auditLog, int maxPageSize)
      Create a client-side object for calling a survey action engine.
      Parameters:
      localServerName - the name of the engine host server where the survey action engine is running
      localServerUserId - user id for the engine host server to use
      localServerPassword - optional password for the engine host server to use
      configurationClient - client to retrieve the configuration
      engineActionClient - client used by the engine host services to control the execution of engine action requests
      auditLog - logging destination
      maxPageSize - maximum number of results that can be returned in a single request
  • Method Details

    • getGovernanceEngineHandler

      public GovernanceEngineHandler getGovernanceEngineHandler(String governanceEngineGUID, String governanceEngineName)
      Retrieve, or create the governance handler for a governance engine.
      Parameters:
      governanceEngineGUID - unique identifier of the governance engine definition in open metadata
      governanceEngineName - unique name of the governance engine definition in open metadata
      Returns:
      governance engine handler
    • getGovernanceEngineHandler

      public GovernanceEngineHandler getGovernanceEngineHandler(String governanceEngineName)
      Return the governance engine handler for a specific governance engine name if known. If the handler does not yet exist, null is returned
      Parameters:
      governanceEngineName - name to lookup
      Returns:
      handler or null
    • getGovernanceEngineHandlers

      public List<GovernanceEngineHandler> getGovernanceEngineHandlers()
      Return the list of active governance engine handlers.
      Returns:
      list of governance engine handlers or an empty list
    • getGovernanceEngineNames

      public List<String> getGovernanceEngineNames()
      Return the list of the configured engines.
      Returns:
      list of engine names
    • getGovernanceEngineNames

      public List<String> getGovernanceEngineNames(String serviceURLMarker)
      Return the list of the configured engines for a particular engine service.
      Parameters:
      serviceURLMarker - marker that determines which engine service is calling.
      Returns:
      list of engine names
    • setGovernanceEngineProperties

      public void setGovernanceEngineProperties(List<EngineConfig> engineConfigs, String partnerServerName, String partnerURLRoot)
      Set up a placeholder entry in the governance handler map for a governance engine.
      Parameters:
      engineConfigs - list of engine descriptions
      partnerServerName - name of the server where the engine definition is located
      partnerURLRoot - url of the platform where the server is located
    • setGovernanceEngineProperties

      public void setGovernanceEngineProperties(EngineConfig engineConfig, String partnerServerName, String partnerURLRoot)
      Set up a placeholder entry in the governance handler map for a governance engine.
      Parameters:
      engineConfig - description of the engine
      partnerServerName - name of the server where the engine definition is located
      partnerURLRoot - url of the platform where the server is located