Class GovernanceActionTypeHandler<B>


  • public class GovernanceActionTypeHandler<B>
    extends OpenMetadataAPIGenericHandler<B>
    GovernanceActionTypeHandler manages GovernanceActionType entities and their relationships.
    • Constructor Detail

      • GovernanceActionTypeHandler

        public GovernanceActionTypeHandler​(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 handler for metadata elements.
        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 Asset instances from.
        defaultZones - list of zones that the access service should set in all new Asset instances.
        publishZones - list of zones that the access service sets up in published Asset instances.
        auditLog - destination for audit log events.
    • Method Detail

      • createGovernanceActionType

        public String createGovernanceActionType​(String userId,
                                                 String qualifiedName,
                                                 int domainIdentifier,
                                                 String displayName,
                                                 String description,
                                                 List<String> supportedGuards,
                                                 Map<String,​String> additionalProperties,
                                                 String governanceEngineGUID,
                                                 String requestType,
                                                 Map<String,​String> requestParameters,
                                                 String methodName)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Create a new metadata element to represent a governance action type.
        Parameters:
        userId - calling user
        qualifiedName - unique name for the governance action
        domainIdentifier - governance domain for this governance action
        displayName - short display name for the governance action
        description - description of the governance action
        supportedGuards - list of guards that triggered this governance action
        additionalProperties - additional properties for a governance action
        governanceEngineGUID - unique identifier of governance engine to execute the request
        requestType - type of request
        requestParameters - properties for the request type
        methodName - calling method
        Returns:
        unique identifier of the new governance action type
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateGovernanceActionType

        public void updateGovernanceActionType​(String userId,
                                               String actionTypeGUID,
                                               boolean isMergeUpdate,
                                               String qualifiedName,
                                               int domainIdentifier,
                                               String displayName,
                                               String description,
                                               List<String> supportedGuards,
                                               Map<String,​String> additionalProperties,
                                               String governanceEngineGUID,
                                               String requestType,
                                               Map<String,​String> requestParameters,
                                               String methodName)
                                        throws InvalidParameterException,
                                               UserNotAuthorizedException,
                                               PropertyServerException
        Update the metadata element representing a governance action type.
        Parameters:
        userId - calling user
        actionTypeGUID - unique identifier of the metadata element to update
        isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
        qualifiedName - unique name for the governance action
        domainIdentifier - governance domain for this governance action
        displayName - short display name for the governance action
        description - description of the governance action
        supportedGuards - list of guards that triggered this governance action
        additionalProperties - additional properties for a governance action
        governanceEngineGUID - unique identifier of governance engine to execute the request
        requestType - type of request
        requestParameters - properties for the request type
        methodName - calling method
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • findGovernanceActionTypes

        public List<B> findGovernanceActionTypes​(String userId,
                                                 String searchString,
                                                 String searchStringParameterName,
                                                 int startFrom,
                                                 int pageSize,
                                                 String methodName)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Retrieve the list of governance action type metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        userId - calling user
        searchString - string to find in the properties
        searchStringParameterName - parameter supplying search string
        startFrom - paging start point
        pageSize - maximum results that can be returned
        methodName - calling method
        Returns:
        list of matching metadata elements
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • getGovernanceActionTypesByName

        public List<B> getGovernanceActionTypesByName​(String userId,
                                                      String name,
                                                      String nameParameterName,
                                                      int startFrom,
                                                      int pageSize,
                                                      String methodName)
                                               throws InvalidParameterException,
                                                      UserNotAuthorizedException,
                                                      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.
        Parameters:
        userId - calling user
        name - name to search for
        nameParameterName - name of parameter supplying name
        startFrom - paging start point
        pageSize - maximum results that can be returned
        methodName - calling method
        Returns:
        list of matching metadata elements
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • setupNextActionType

        public String setupNextActionType​(String userId,
                                          String currentActionTypeGUID,
                                          String nextActionTypeGUID,
                                          String guard,
                                          boolean mandatoryGuard,
                                          boolean ignoreMultipleTriggers,
                                          String methodName)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Add a link between two governance action types to show that one follows on from the other when a governance action process is executing.
        Parameters:
        userId - calling user
        currentActionTypeGUID - unique identifier of the governance action type that defines the previous step in the governance action process
        nextActionTypeGUID - unique identifier of the governance action type that defines the next step in the governance action process
        guard - guard required for this next step to proceed - or null for always run the next step.
        mandatoryGuard - means that no next steps can run if this guard is not returned
        ignoreMultipleTriggers - prevent multiple instances of the next step to run (or not)
        methodName - calling method
        Returns:
        unique identifier of the new link
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateNextActionType

        public void updateNextActionType​(String userId,
                                         String nextActionLinkGUID,
                                         String guard,
                                         boolean mandatoryGuard,
                                         boolean ignoreMultipleTriggers,
                                         String methodName)
                                  throws InvalidParameterException,
                                         UserNotAuthorizedException,
                                         PropertyServerException
        Update the properties of the link between two governance action types that shows that one follows on from the other when a governance action process is executing.
        Parameters:
        userId - calling user
        nextActionLinkGUID - unique identifier of the relationship between the governance action types
        guard - guard required for this next step to proceed - or null for always run the next step.
        mandatoryGuard - means that no next steps can run if this guard is not returned
        ignoreMultipleTriggers - prevent multiple instances of the next step to run (or not)
        methodName - calling method
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)