Class GovernanceArchiveHelper

java.lang.Object
org.odpi.openmetadata.samples.archiveutilities.SimpleCatalogArchiveHelper
org.odpi.openmetadata.samples.archiveutilities.GovernanceArchiveHelper
Direct Known Subclasses:
CocoArchiveHelper

public class GovernanceArchiveHelper extends SimpleCatalogArchiveHelper
GovernanceArchiveHelper creates elements for governance. This includes governance program definitions, governance engine definitions and governance action process definitions.
  • Constructor Details

    • GovernanceArchiveHelper

      public GovernanceArchiveHelper(OpenMetadataArchiveBuilder archiveBuilder, String archiveGUID, String archiveRootName, String originatorName, Date creationDate, long versionNumber, String versionName)
      Typical constructor passes parameters used to build the open metadata archive's property header.
      Parameters:
      archiveBuilder - builder where content is cached
      archiveGUID - unique identifier for this open metadata archive.
      archiveRootName - non-spaced root name of the open metadata GUID map.
      originatorName - name of the originator (person or organization) of the archive.
      creationDate - data that this archive was created.
      versionNumber - version number of the archive.
      versionName - version name for the archive.
    • GovernanceArchiveHelper

      public GovernanceArchiveHelper(OpenMetadataArchiveBuilder archiveBuilder, String archiveGUID, String archiveName, String archiveRootName, String originatorName, Date creationDate, long versionNumber, String versionName)
      Typical constructor passes parameters used to build the open metadata archive's property header.
      Parameters:
      archiveBuilder - builder where content is cached
      archiveGUID - unique identifier for this open metadata archive.
      archiveName - name of the open metadata archive metadata collection.
      archiveRootName - non-spaced root name of the open metadata GUID map.
      originatorName - name of the originator (person or organization) of the archive.
      creationDate - data that this archive was created.
      versionNumber - version number of the archive.
      versionName - version name for the archive.
    • GovernanceArchiveHelper

      public GovernanceArchiveHelper(OpenMetadataArchiveBuilder archiveBuilder, String archiveGUID, String archiveRootName, String originatorName, Date creationDate, long versionNumber, String versionName, String guidMapFileName)
      Constructor passes parameters used to build the open metadata archive's property header. This version is used for multiple dependant archives, and they need to share the guid map.
      Parameters:
      archiveBuilder - builder where content is cached
      archiveGUID - unique identifier for this open metadata archive.
      archiveRootName - non-spaced root name of the open metadata archive elements.
      originatorName - name of the originator (person or organization) of the archive.
      creationDate - data that this archive was created.
      versionNumber - version number of the archive.
      versionName - version name for the archive.
      guidMapFileName - name of the guid map file.
  • Method Details

    • addIntegrationConnector

      public String addIntegrationConnector(String connectorProviderName, Map<String,Object> configurationProperties, String qualifiedName, String displayName, String description, String endpointAddress, Map<String,String> additionalProperties)
      Create an integration connector entity.
      Parameters:
      connectorProviderName - name of the connector provider for the integration connector
      configurationProperties - configuration properties for the integration connector (goes in the connection)
      qualifiedName - unique name for the integration connector
      displayName - display name for the integration connector
      description - description about the integration connector
      additionalProperties - any other properties
      Returns:
      id for the integration connector
    • addCatalogTargetRelationship

      public void addCatalogTargetRelationship(String integrationConnectorGUID, String targetElementGUID, String catalogTargetName, String connectionName, Map<String,Object> configurationProperties, Map<String,String> templates, String metadataSourceQualifiedName)
      Create a catalog target relationship.
      Parameters:
      integrationConnectorGUID - the integration connector
      targetElementGUID - the target they should work with
      catalogTargetName - name for the target
      connectionName - name for the connection
      configurationProperties - any configuration properties
      templates - specific templates to use
      metadataSourceQualifiedName - metadata source qualified name for the cataloguing
    • addIntegrationGroup

      public String addIntegrationGroup(String qualifiedName, String displayName, String description, String capabilityVersion, String patchLevel, String source, Map<String,String> additionalProperties, Map<String,Object> extendedProperties)
      Create a software capability entity for an integration group.
      Parameters:
      qualifiedName - unique name for the group
      displayName - display name for the group
      description - description about the group
      capabilityVersion - version
      patchLevel - patch level
      source - source
      additionalProperties - any other properties
      extendedProperties - properties for subtype
      Returns:
      id for the capability
    • addRegisteredIntegrationConnector

      public void addRegisteredIntegrationConnector(String integrationGroupGUID, String connectorName, String connectorUserId, String metadataSourceQualifiedName, long refreshTimeInterval, String integrationConnectorGUID)
      Create the relationship between a governance engine and one of its supported governance services.
      Parameters:
      integrationGroupGUID - unique identifier of the integration group
      connectorName - name of the connector used in messages and REST calls
      connectorUserId - userId for the connector to use (overrides the server's userId)
      metadataSourceQualifiedName - unique name of the metadata collection for anything catalogued by this connector
      refreshTimeInterval - how long (in minutes) between each refresh of the connector
      integrationConnectorGUID - unique identifier of the integration connector
    • addGovernanceService

      public String addGovernanceService(String typeName, String deployedImplementationType, String connectorProviderName, Map<String,Object> configurationProperties, String qualifiedName, String displayName, String description, Map<String,String> additionalProperties)
      Create a governance service entity.
      Parameters:
      typeName - name of governance service subtype to use - default is GovernanceService
      deployedImplementationType - deployed implementation type
      connectorProviderName - name of the connector provider for the governance service
      configurationProperties - configuration properties for the governance service (goes in the connection)
      qualifiedName - unique name for the governance service
      displayName - display name for the governance service
      description - description about the governance service
      additionalProperties - any other properties
      Returns:
      id for the governance service
    • addReplacementAttributes

      public void addReplacementAttributes(String parentGUID, String parentTypeName, String parentDomainName, List<ReplacementAttributeType> replacementAttributeTypes)
      Add reference data for catalog templates.
      Parameters:
      parentGUID - unique identifier of template
      parentTypeName - type of template
      parentDomainName - domain of template
      replacementAttributeTypes - list of reference values
    • addPlaceholderProperties

      public void addPlaceholderProperties(String parentGUID, String parentTypeName, String parentDomainName, List<PlaceholderPropertyType> placeholderPropertyTypes)
      Add reference data for catalog templates.
      Parameters:
      parentGUID - unique identifier of template
      parentTypeName - type of template
      parentDomainName - domain of template
      placeholderPropertyTypes - list of reference values
    • addSupportedTemplateTypes

      public void addSupportedTemplateTypes(String parentGUID, String parentTypeName, String parentDomainName, List<TemplateType> templateTypes)
      Add reference data for catalog templates.
      Parameters:
      parentGUID - unique identifier of template
      parentTypeName - type of template
      parentDomainName - domain of template
      templateTypes - list of reference values
    • addSupportedConfigurationProperties

      public void addSupportedConfigurationProperties(String parentGUID, String parentTypeName, String parentDomainName, List<ConfigurationPropertyType> configurationPropertyTypes)
      Add reference data for connectors.
      Parameters:
      parentGUID - unique identifier of governance service/action
      parentTypeName - type of parent
      parentDomainName - domain of template
      configurationPropertyTypes - list of reference values
    • addSupportedRequestTypes

      public void addSupportedRequestTypes(String parentGUID, String parentTypeName, String parentDomainName, List<RequestTypeType> supportedRequestTypes)
      Add reference data for governance services and actions.
      Parameters:
      parentGUID - unique identifier of governance service/action
      parentTypeName - type of parent
      parentDomainName - domain of template
      supportedRequestTypes - list of reference values
    • addSupportedRequestParameters

      public void addSupportedRequestParameters(String parentGUID, String parentTypeName, String parentDomainName, List<RequestParameterType> supportedRequestParameters)
      Add reference data for governance services and actions.
      Parameters:
      parentGUID - unique identifier of governance service/action
      parentTypeName - type of parent
      parentDomainName - domain of template
      supportedRequestParameters - list of reference values
    • addSupportedActionTargets

      public void addSupportedActionTargets(String parentGUID, String parentTypeName, String parentDomainName, List<ActionTargetType> actionTargetTypes)
      Add reference data for governance services and actions.
      Parameters:
      parentGUID - unique identifier of governance service/action
      parentTypeName - type of parent
      parentDomainName - domain of template
      actionTargetTypes - list of reference values
    • addSupportedAnalysisSteps

      public void addSupportedAnalysisSteps(String parentGUID, String parentTypeName, String parentDomainName, List<AnalysisStepType> analysisStepTypes)
      Add reference data for governance services and actions.
      Parameters:
      parentGUID - unique identifier of governance service/action
      parentTypeName - type of parent
      parentDomainName - domain of template
      analysisStepTypes - list of reference values
    • addProducedAnnotationTypes

      public void addProducedAnnotationTypes(String parentGUID, String parentTypeName, String parentDomainName, List<AnnotationTypeType> annotationTypeTypes)
      Add reference data for governance services and actions.
      Parameters:
      parentGUID - unique identifier of governance service/action
      parentTypeName - type of parent
      parentDomainName - domain of template
      annotationTypeTypes - list of reference values
    • addProducedRequestParameters

      public void addProducedRequestParameters(String parentGUID, String parentTypeName, String parentDomainName, List<RequestParameterType> producedRequestParameters)
      Add reference data for governance services and actions.
      Parameters:
      parentGUID - unique identifier of governance service/action
      parentTypeName - type of parent
      parentDomainName - domain of template
      producedRequestParameters - list of reference values
    • addProducedActionTargets

      public void addProducedActionTargets(String parentGUID, String parentTypeName, String parentDomainName, List<ActionTargetType> actionTargetTypes)
      Add reference data for governance services and actions.
      Parameters:
      parentGUID - unique identifier of governance service/action
      parentTypeName - type of parent
      parentDomainName - domain of template
      actionTargetTypes - list of reference values
    • addProducedGuards

      public void addProducedGuards(String parentGUID, String parentTypeName, String parentDomainName, List<GuardType> guardTypes)
      Add reference data for governance services and actions.
      Parameters:
      parentGUID - unique identifier of governance service/action
      parentTypeName - type of parent
      parentDomainName - domain of template
      guardTypes - list of reference values
    • addGovernanceEngine

      public String addGovernanceEngine(String typeName, String qualifiedName, String displayName, String description, String capabilityType, String capabilityVersion, String patchLevel, String source, Map<String,String> additionalProperties, Map<String,Object> extendedProperties)
      Create a software capability entity for a governance engine.
      Parameters:
      typeName - name of software capability subtype to use - default is SoftwareCapability
      qualifiedName - unique name for the capability
      displayName - display name for the capability
      description - description about the capability
      capabilityType - type
      capabilityVersion - version
      patchLevel - patch level
      source - source
      additionalProperties - any other properties
      extendedProperties - properties for subtype
      Returns:
      id for the capability
    • addSupportedGovernanceService

      public void addSupportedGovernanceService(String engineGUID, String requestType, String serviceRequestType, Map<String,String> requestParameters, String serviceGUID)
      Create the relationship between a governance engine and one of its supported governance services.
      Parameters:
      engineGUID - unique identifier of the asset
      requestType - governance request type to use when calling the governance engine
      serviceRequestType - request type to use when calling the service (if null, governance request type is used)
      requestParameters - default request parameters to pass to the service when called with this request type
      serviceGUID - unique identifier of the service
    • addGovernanceActionProcess

      public String addGovernanceActionProcess(String typeName, String qualifiedName, String name, String versionIdentifier, String description, String formula, int domainIdentifier, Map<String,String> additionalProperties, Map<String,Object> extendedProperties, List<Classification> classifications)
      Create a governance action process.
      Parameters:
      typeName - name of process subtype to use - default is GovernanceActionProcess
      qualifiedName - unique name for the capability
      name - display name for the capability
      versionIdentifier - identifier of the version for the process implementation
      description - description about the capability
      formula - logic for the process
      domainIdentifier - which governance domain - 0=all
      additionalProperties - any other properties
      extendedProperties - properties for subtype
      classifications - list of classifications (if any)
      Returns:
      id for the new entity
    • addGovernanceActionType

      public String addGovernanceActionType(String typeName, String anchorGUID, String anchorTypeName, String anchorDomainName, String qualifiedName, String displayName, String description, int domainIdentifier, List<RequestParameterType> supportedRequestParameters, List<ActionTargetType> supportedActionTargets, List<AnalysisStepType> supportedAnalysisSteps, List<AnnotationTypeType> supportedAnnotationTypes, List<RequestParameterType> producedRequestParameters, List<ActionTargetType> producedActionTargets, List<GuardType> producedGuards, int waitTime, Map<String,String> additionalProperties, Map<String,Object> extendedProperties, List<Classification> classifications)
      Create a governance action type.
      Parameters:
      typeName - name of subtype to use - default is GovernanceActionType
      anchorGUID - unique identifier of the anchor
      anchorTypeName - type name of the anchor
      anchorDomainName - type name of the anchor's domain
      qualifiedName - unique name for the capability
      displayName - display name for the capability
      description - description about the capability
      domainIdentifier - which governance domain - 0=all
      supportedRequestParameters - request parameters to use when triggering this governance action
      supportedActionTargets - action targets to use when triggering this governance action
      supportedAnalysisSteps - analysis steps supported by this governance action (survey action)
      supportedAnnotationTypes - annotation types supported by this governance action (survey action)
      producedRequestParameters - request parameters produced by this governance action
      producedActionTargets - action targets produced by this governance action
      producedGuards - guards expected from the implementation
      waitTime - minutes to wait before starting governance action
      additionalProperties - any other properties
      extendedProperties - properties for subtype
      classifications - list of classifications (if any)
      Returns:
      id for the new entity
    • addGovernanceActionProcessStep

      public String addGovernanceActionProcessStep(String typeName, String anchorGUID, String anchorTypeName, String anchorDomainName, String qualifiedName, String displayName, String description, int domainIdentifier, List<RequestParameterType> supportedRequestParameters, List<ActionTargetType> supportedActionTargets, List<AnalysisStepType> supportedAnalysisSteps, List<AnnotationTypeType> supportedAnnotationTypes, List<RequestParameterType> producedRequestParameters, List<ActionTargetType> producedActionTargets, List<GuardType> producedGuards, int waitTime, boolean ignoreMultipleTriggers, Map<String,String> additionalProperties, Map<String,Object> extendedProperties, List<Classification> classifications)
      Create a governance action process step.
      Parameters:
      typeName - name of subtype to use - default is GovernanceActionProcessStep
      anchorGUID - unique identifier of the anchor
      anchorTypeName - type name of the anchor
      anchorDomainName - type name of the anchor's domain
      qualifiedName - unique name for the capability
      displayName - display name for the capability
      description - description about the capability
      domainIdentifier - which governance domain - 0=all
      supportedRequestParameters - request parameters to use when triggering this governance action
      supportedActionTargets - action targets to use when triggering this governance action
      supportedAnalysisSteps - analysis steps supported by this governance action (survey action)
      supportedAnnotationTypes - annotation types supported by this governance action (survey action)
      producedRequestParameters - request parameters produced by this governance action
      producedActionTargets - action targets produced by this governance action
      producedGuards - guards expected from the implementation
      waitTime - minutes to wait before starting governance action
      ignoreMultipleTriggers - only run this once even if the same guard occurs multiple times while it is waiting
      additionalProperties - any other properties
      extendedProperties - properties for subtype
      classifications - list of classifications (if any)
      Returns:
      id for the new entity
    • addGovernanceActionProcessFlow

      public void addGovernanceActionProcessFlow(String governanceActionProcessGUID, String guard, Map<String,String> requestParameters, String governanceActionProcessStepGUID)
      Create the relationship between a governance action process and the first governance action type to execute.
      Parameters:
      governanceActionProcessGUID - unique identifier of the governance action process
      guard - initial guard for the first step in the process
      requestParameters - predefined request parameters
      governanceActionProcessStepGUID - unique identifier of the implementing governance engine
    • addNextGovernanceActionProcessStep

      public void addNextGovernanceActionProcessStep(String governanceActionProcessStepGUID, String guard, boolean mandatoryGuard, String nextGovernanceActionTypeGUID)
      Create the relationship between a governance action type and one of the next governance action type to execute in a process.
      Parameters:
      governanceActionProcessStepGUID - unique identifier of the governance action type
      guard - guard required to run this next action
      mandatoryGuard - guard must occur before the next step can run
      nextGovernanceActionTypeGUID - unique identifier of the implementing governance engine
    • addGovernanceActionExecutor

      public void addGovernanceActionExecutor(String governanceActionGUID, String requestType, Map<String,String> requestParameters, List<String> requestParameterFilter, Map<String,String> requestParameterMap, List<String> actionTargetFilter, Map<String,String> actionTargetMap, String governanceEngineGUID)
      Create the relationship between a governance action type/process step and the governance engine that supplies its implementation.
      Parameters:
      governanceActionGUID - unique identifier of the governance action type/process step
      requestType - governance request type to use when calling the engine
      requestParameters - default request parameters to pass to the service when called with this request type
      requestParameterFilter - list the names of the request parameters to remove from the supplied requestParameters
      requestParameterMap - provide a translation map between the supplied name of the requestParameters and the names supported by the implementation of the governance service
      actionTargetFilter - list the names of the action targets to remove from the supplied action targets
      actionTargetMap - provide a translation map between the supplied name of an action target and the name supported by the implementation of the governance service
      governanceEngineGUID - unique identifier of the implementing governance engine
    • addTargetForActionType

      public void addTargetForActionType(String governanceActionTypeGUID, NewActionTarget actionTarget)
      Create the relationship between a governance action type and a pre-defined action target.
      Parameters:
      governanceActionTypeGUID - unique identifier of the governance action type/process step
      actionTarget - details of the action target
    • addTargetForActionProcess

      public void addTargetForActionProcess(String governanceActionProcessGUID, NewActionTarget actionTarget)
      Create the relationship between a governance action process and a pre-defined action target.
      Parameters:
      governanceActionProcessGUID - unique identifier of the governance action type/process step
      actionTarget - details of the action target
    • addApprovedPurpose

      public void addApprovedPurpose(String referenceableGUID, String dataProcessingPurposeGUID)
      Create the relationship between a referenceable and a data processing purpose.
      Parameters:
      referenceableGUID - unique identifier of the element that is approved
      dataProcessingPurposeGUID - unique identifier of the