Class GovernanceEngineConfigurationHandler

java.lang.Object
org.odpi.openmetadata.frameworkservices.gaf.handlers.GovernanceEngineConfigurationHandler

public class GovernanceEngineConfigurationHandler extends Object
GovernanceConfigurationHandler provides the open metadata server side implementation of GovernanceConfigurationServer which is part of the Open Governance Framework (ODF).
  • Constructor Details

    • GovernanceEngineConfigurationHandler

      public GovernanceEngineConfigurationHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog)
      Construct the governance engine configuration handler caching the objects needed to operate within a single server instance.
      Parameters:
      serviceName - name of this service
      serverName - name of the local server
      invalidParameterHandler - handler for managing parameter errors
      repositoryHandler - manages calls to the repository services
      repositoryHelper - provides utilities for manipulating the repository services objects
      localServerUserId - userId for this server
      securityVerifier - open metadata security services verifier
      supportedZones - list of zones that the access service is allowed to serve B instances from.
      defaultZones - list of zones that the access service should set in all new B instances.
      publishZones - list of zones that the access service sets up in published B instances.
      auditLog - logging destination
  • Method Details

    • createGovernanceEngine

      public String createGovernanceEngine(String userId, String typeName, String qualifiedName, String displayName, String description, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a new governance engine definition.
      Parameters:
      userId - identifier of calling user
      typeName - type of governance engine to create
      qualifiedName - unique name for the governance engine.
      displayName - display name for messages and user interfaces.
      description - description of the types of governance services that will be associated with this governance engine.
      serviceSupportedZones - supported zones for calling service
      Returns:
      unique identifier (guid) of the governance engine definition. This is for use on other requests.
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem storing the governance engine definition.
    • getGovernanceEngineByGUID

      public GovernanceEngineElement getGovernanceEngineByGUID(String userId, String guid, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return the properties from a governance engine definition. The governance engine definition is completely contained in a single entity that can be retrieved from the repository services and converted to a bean.
      Parameters:
      userId - identifier of calling user
      guid - unique identifier (guid) of the governance engine definition.
      serviceSupportedZones - supported zones for calling service
      Returns:
      properties from the governance engine definition.
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance engine definition.
    • getGovernanceEngineByName

      public GovernanceEngineElement getGovernanceEngineByName(String userId, String name, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return the properties from a governance engine definition. The governance engine definition is completely contained in a single entity that can be retrieved from the repository services and converted to a bean.
      Parameters:
      userId - identifier of calling user
      name - qualified name or display name (if unique).
      serviceSupportedZones - supported zones for calling service
      Returns:
      properties from the governance engine definition.
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance engine definition.
    • getAllGovernanceEngines

      public List<GovernanceEngineElement> getAllGovernanceEngines(String userId, int startingFrom, int maximumResults, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return the list of governance engine definitions that are stored.
      Parameters:
      userId - identifier of calling user
      startingFrom - initial position in the stored list.
      maximumResults - maximum number of definitions to return on this call.
      serviceSupportedZones - supported zones for calling service
      Returns:
      list of governance engine definitions.
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance engine definitions.
    • updateGovernanceEngine

      public void updateGovernanceEngine(String userId, String guid, String qualifiedName, String displayName, String description, String typeDescription, String version, String patchLevel, String source, Map<String,String> additionalProperties, Map<String,Object> extendedProperties, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the properties of an existing governance engine definition. Use the current value to keep a property value the same, or use the new value. Null means remove the property from the definition.
      Parameters:
      userId - identifier of calling user
      guid - unique identifier of the governance engine - used to locate the definition.
      qualifiedName - new value for unique name of governance engine.
      displayName - new value for the display name.
      description - new description for the governance engine.
      typeDescription - new description of the type ofg governance engine.
      version - new version number for the governance engine implementation.
      patchLevel - new patch level for the governance engine implementation.
      source - new source description for the implementation of the governance engine.
      additionalProperties - additional properties for the governance engine.
      extendedProperties - properties to populate the subtype of the governance engine.
      serviceSupportedZones - supported zones for calling service
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem storing the governance engine definition.
    • deleteGovernanceEngine

      public void deleteGovernanceEngine(String userId, String guid, String qualifiedName, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the properties of the governance engine. Both the guid and the qualified name is supplied to validate that the correct governance engine is being deleted.
      Parameters:
      userId - identifier of calling user
      guid - unique identifier of the governance engine - used to locate the definition.
      qualifiedName - unique name for the governance engine.
      serviceSupportedZones - supported zones for calling service
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance engine definition.
    • createGovernanceService

      public String createGovernanceService(String userId, String typeName, String qualifiedName, String name, String versionIdentifier, String description, String deployedImplementationType, Connection connection, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a governance service definition. The same governance service can be associated with multiple governance engines.
      Parameters:
      userId - identifier of calling user
      typeName - type of governance service
      qualifiedName - unique name for the governance service.
      name - display name for the governance service.
      description - description of the analysis provided by the governance service.
      connection - connection to instantiate the governance service implementation.
      serviceSupportedZones - supported zones for calling service
      Returns:
      unique identifier of the governance service.
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem storing the governance service definition.
    • getGovernanceServiceByGUID

      public GovernanceServiceElement getGovernanceServiceByGUID(String userId, String guid, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return the properties from a governance service definition.
      Parameters:
      userId - identifier of calling user
      guid - unique identifier (guid) of the governance service definition.
      serviceSupportedZones - supported zones for calling service
      Returns:
      properties of the governance service.
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance service definition.
    • getGovernanceServiceByName

      public GovernanceServiceElement getGovernanceServiceByName(String userId, String name, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return the properties from a governance service definition.
      Parameters:
      userId - identifier of calling user
      name - qualified name or display name (if unique).
      serviceSupportedZones - supported zones for calling service
      Returns:
      properties from the governance engine definition.
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance engine definition.
    • getAllGovernanceServices

      public List<GovernanceServiceElement> getAllGovernanceServices(String userId, int startingFrom, int maximumResults, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return the list of governance services definitions that are stored.
      Parameters:
      userId - identifier of calling user
      startingFrom - initial position in the stored list.
      maximumResults - maximum number of definitions to return on this call.
      serviceSupportedZones - supported zones for calling service
      Returns:
      list of governance service definitions.
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance service definitions.
    • getGovernanceServiceRegistrations

      public List<String> getGovernanceServiceRegistrations(String userId, String governanceServiceGUID, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Return the list of governance engines that a specific governance service is registered with.
      Parameters:
      userId - identifier of calling user
      governanceServiceGUID - governance service to search for.
      serviceSupportedZones - supported zones for calling service
      Returns:
      list of governance engine unique identifiers (guids)
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance service and/or governance engine definitions.
    • updateGovernanceService

      public void updateGovernanceService(String userId, String guid, String qualifiedName, String name, String versionIdentifier, String description, String deployedImplementationType, Connection connection, Map<String,String> additionalProperties, Map<String,Object> extendedProperties, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the properties of an existing governance service definition. Use the current value to keep a property value the same, or use the new value. Null means remove the property from the definition.
      Parameters:
      userId - identifier of calling user
      guid - unique identifier of the governance service - used to locate the definition.
      qualifiedName - new value for unique name of governance service.
      name - new value for the display name
      versionIdentifier - version name
      description - new value for the description
      deployedImplementationType - technology type
      connection - connection used to create an instance of this governance service.
      additionalProperties - additional properties for the governance engine.
      extendedProperties - properties to populate the subtype of the governance service.
      serviceSupportedZones - supported zones for calling service
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem storing the governance service definition.
    • deleteGovernanceService

      public void deleteGovernanceService(String userId, String guid, String qualifiedName, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the properties of the governance service. Both the guid and the qualified name is supplied to validate that the correct governance service is being deleted. The governance service is also unregistered from its governance engines.
      Parameters:
      userId - identifier of calling user
      guid - unique identifier of the governance service - used to locate the definition.
      qualifiedName - unique name for the governance service.
      serviceSupportedZones - supported zones for calling service
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance service definition.
    • registerGovernanceServiceWithEngine

      public void registerGovernanceServiceWithEngine(String userId, String governanceEngineGUID, String governanceServiceGUID, String governanceRequestType, String serviceRequestType, Map<String,String> defaultAnalysisParameters, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Register a governance service with a specific governance engine. Both the governance service and the governance engine already exist, so it is just a question of creating a relationship between them.
      Parameters:
      userId - identifier of calling user
      governanceEngineGUID - unique identifier of the governance engine.
      governanceServiceGUID - unique identifier of the governance service.
      governanceRequestType - list of governance request types that this governance service is able to process.
      serviceRequestType - request type supported by the service
      defaultAnalysisParameters - list of analysis parameters that are passed to the governance service (via the governance context). These values can be overridden on the actual governance request.
      serviceSupportedZones - supported zones for calling service
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance service and/or governance engine definitions.
    • getRegisteredGovernanceService

      public RegisteredGovernanceServiceElement getRegisteredGovernanceService(String userId, String governanceEngineGUID, String governanceServiceGUID, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve a specific governance service registrations with a particular governance engine.
      Parameters:
      userId - identifier of calling user
      governanceEngineGUID - unique identifier of the governance engine.
      governanceServiceGUID - unique identifier of the registered governance service.
      serviceSupportedZones - supported zones for calling service
      Returns:
      details of the governance service and the asset types it is registered for.
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance service and/or governance engine definitions.
    • getRegisteredGovernanceServices

      public List<RegisteredGovernanceServiceElement> getRegisteredGovernanceServices(String userId, String governanceEngineGUID, int startingFrom, int maximumResults, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the identifiers of the registered governance services with a governance engine.
      Parameters:
      userId - identifier of calling user
      governanceEngineGUID - unique identifier of the governance engine.
      startingFrom - initial position in the stored list.
      maximumResults - maximum number of definitions to return on this call.
      serviceSupportedZones - supported zones for calling service
      Returns:
      list of unique identifiers
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance service and/or governance engine definitions.
    • unregisterGovernanceServiceRequestFromEngine

      public void unregisterGovernanceServiceRequestFromEngine(String userId, String requestType, String governanceEngineGUID, String governanceServiceGUID, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove a request type for a governance service from the governance engine.
      Parameters:
      userId - identifier of calling user
      requestType - calling request
      governanceEngineGUID - unique identifier of the governance engine.
      governanceServiceGUID - unique identifier of the governance service.
      serviceSupportedZones - supported zones for calling service
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance service and/or governance engine definitions.
    • unregisterGovernanceServiceFromEngine

      public void unregisterGovernanceServiceFromEngine(String userId, String governanceEngineGUID, String governanceServiceGUID, List<String> serviceSupportedZones) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Unregister all request types for a governance service from the governance engine.
      Parameters:
      userId - identifier of calling user
      governanceEngineGUID - unique identifier of the governance engine.
      governanceServiceGUID - unique identifier of the governance service.
      serviceSupportedZones - supported zones for calling service
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - problem retrieving the governance service and/or governance engine definitions.