Class GovernanceZoneHandler<B>


  • public class GovernanceZoneHandler<B>
    extends OpenMetadataAPIGenericHandler<B>
    GovernanceZoneHandler provides the exchange of metadata about governance zones between the repository and the OMAS. There is no support for effectivity dating because just too difficult to manage the zone look up for Assets. They are also supposed to be long lived.
    • Constructor Detail

      • GovernanceZoneHandler

        public GovernanceZoneHandler​(OpenMetadataAPIGenericConverter<B> converter,
                                     Class<B> beanClass,
                                     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 zone handler with information needed to work with B objects.
        Parameters:
        converter - specific converter for this bean class
        beanClass - name of bean class that is represented by the generic class B
        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 - destination for audit log events.
    • Method Detail

      • createGovernanceZone

        public String createGovernanceZone​(String userId,
                                           String externalSourceGUID,
                                           String externalSourceName,
                                           String qualifiedName,
                                           String displayName,
                                           String description,
                                           String criteria,
                                           String scope,
                                           int domainIdentifier,
                                           Map<String,​String> additionalProperties,
                                           String suppliedTypeName,
                                           Map<String,​Object> extendedProperties,
                                           String methodName)
                                    throws InvalidParameterException,
                                           UserNotAuthorizedException,
                                           PropertyServerException
        Create a definition of a governance zone. The qualified name of these governance zones can be added to the supportedZones and defaultZones properties of an OMAS to control which assets are processed and how they are set up. In addition the qualified names of zones can be added to Asset definitions to indicate which zone(s) they belong to.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        qualifiedName - unique name for the zone - used in other configuration
        displayName - short display name for the zone
        description - description of the governance zone
        criteria - the criteria for inclusion in a governance zone
        scope - scope of the organization that this some applies to
        domainIdentifier - the identifier of the governance domain where the zone is managed
        additionalProperties - additional properties for a governance zone
        suppliedTypeName - type name of the zone definition (null for GovernanceZone)
        extendedProperties - properties for a governance zone subtype
        methodName - calling method
        Returns:
        unique identifier of the new zone
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • updateGovernanceZone

        public void updateGovernanceZone​(String userId,
                                         String externalSourceGUID,
                                         String externalSourceName,
                                         String zoneGUID,
                                         String zoneGUIDParameterName,
                                         String qualifiedName,
                                         String displayName,
                                         String description,
                                         String criteria,
                                         String scope,
                                         int domainIdentifier,
                                         Map<String,​String> additionalProperties,
                                         String suppliedTypeName,
                                         Map<String,​Object> extendedProperties,
                                         boolean isMergeUpdate,
                                         String methodName)
                                  throws InvalidParameterException,
                                         UserNotAuthorizedException,
                                         PropertyServerException
        Create a definition of a governance zone. The qualified name of these governance zones can be added to the supportedZones and defaultZones properties of an OMAS to control which assets are processed and how they are set up. In addition the qualified names of zones can be added to Asset definitions to indicate which zone(s) they belong to.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        zoneGUID - unique identifier for the zone to change
        zoneGUIDParameterName - parameter supplying the zoneGUID
        qualifiedName - unique name for the zone - used in other configuration
        displayName - short display name for the zone
        description - description of the governance zone
        criteria - the criteria for inclusion in a governance zone
        scope - scope of the organization that this some applies to
        domainIdentifier - the identifier of the governance domain where the zone is managed
        additionalProperties - additional properties for a governance zone
        suppliedTypeName - type name of the zone definition (null for GovernanceZone)
        extendedProperties - properties for a governance zone subtype
        isMergeUpdate - should supplied properties be merged with or replace existing properties
        methodName - calling method
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • getGovernanceZonesByDomain

        public List<B> getGovernanceZonesByDomain​(String userId,
                                                  int domainIdentifier,
                                                  int startFrom,
                                                  int pageSize,
                                                  String methodName)
                                           throws InvalidParameterException,
                                                  UserNotAuthorizedException,
                                                  PropertyServerException
        Return information about the defined governance zones for a specific domain.
        Parameters:
        userId - calling user
        domainIdentifier - identifier of domain - 0 is for all domains
        startFrom - position in the list (used when there are so many reports that paging is needed
        pageSize - maximum number of elements to return an this call
        methodName - calling method
        Returns:
        properties of the governance zone
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem