Class APIOperationHandler<B>

  • Type Parameters:
    B - class that represents the API Operation

    public class APIOperationHandler<B>
    extends ReferenceableHandler<B>
    APIOperationHandler provides the exchange of metadata about APIOperation schema types between the repository and the OMAS.
    • Constructor Detail

      • APIOperationHandler

        public APIOperationHandler​(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 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

      • createAPIOperation

        public String createAPIOperation​(String userId,
                                         String externalSourceGUID,
                                         String externalSourceName,
                                         String apiGUID,
                                         String apiGUIDParameterName,
                                         String qualifiedName,
                                         String displayName,
                                         String description,
                                         String versionNumber,
                                         boolean isDeprecated,
                                         String author,
                                         String usage,
                                         String encodingStandard,
                                         String namespace,
                                         Map<String,​String> additionalProperties,
                                         String suppliedTypeName,
                                         Map<String,​Object> extendedProperties,
                                         String methodName)
                                  throws InvalidParameterException,
                                         UserNotAuthorizedException,
                                         PropertyServerException
        Create the API Operation object.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        apiGUID - unique identifier of the owning topic
        apiGUIDParameterName - parameter supplying apiGUID
        qualifiedName - unique name for the API Operation - used in other configuration
        displayName - short display name for the API Operation
        description - description of the API Operation
        versionNumber - version of the schema type.
        isDeprecated - is the schema type deprecated
        author - name of the author
        usage - guidance on how the schema should be used.
        encodingStandard - format of the schema
        namespace - namespace where the schema is defined.
        additionalProperties - additional properties for a API Operation
        suppliedTypeName - type name from the caller (enables creation of subtypes)
        extendedProperties - properties for a API Operation subtype
        methodName - calling method
        Returns:
        unique identifier of the new API Operation object
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • createAPIOperationFromTemplate

        public String createAPIOperationFromTemplate​(String userId,
                                                     String externalSourceGUID,
                                                     String externalSourceName,
                                                     String apiGUID,
                                                     String apiGUIDParameterName,
                                                     String templateGUID,
                                                     String qualifiedName,
                                                     String displayName,
                                                     String description,
                                                     String methodName)
                                              throws InvalidParameterException,
                                                     UserNotAuthorizedException,
                                                     PropertyServerException
        Create a API Operation from a template.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        apiGUID - unique identifier of the owning topic
        apiGUIDParameterName - parameter supplying apiGUID
        templateGUID - unique identifier of the metadata element to copy
        qualifiedName - unique name for the API Operation - used in other configuration
        displayName - short display name for the API Operation
        description - description of the API Operation
        methodName - calling method
        Returns:
        unique identifier of the new metadata element
        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)
      • updateAPIOperation

        public void updateAPIOperation​(String userId,
                                       String externalSourceGUID,
                                       String externalSourceName,
                                       String apiOperationGUID,
                                       String apiOperationGUIDParameterName,
                                       String qualifiedName,
                                       String displayName,
                                       String description,
                                       String versionNumber,
                                       boolean isDeprecated,
                                       String author,
                                       String usage,
                                       String encodingStandard,
                                       String namespace,
                                       Map<String,​String> additionalProperties,
                                       String suppliedTypeName,
                                       Map<String,​Object> extendedProperties,
                                       boolean isMergeUpdate,
                                       String methodName)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Update the API Operation.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        apiOperationGUID - unique identifier for the API Operation to update
        apiOperationGUIDParameterName - parameter supplying the API Operation
        qualifiedName - unique name for the API Operation - used in other configuration
        displayName - short display name for the API Operation
        description - description of the governance API Operation
        versionNumber - version of the schema type.
        isDeprecated - is the schema type deprecated
        author - name of the author
        usage - guidance on how the schema should be used.
        encodingStandard - format of the schema.
        namespace - namespace where the schema is defined.
        additionalProperties - additional properties for an API Operation
        suppliedTypeName - type of term
        extendedProperties - properties for a governance API Operation subtype
        isMergeUpdate - are unspecified properties unchanged (true) or removed?
        methodName - calling method
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • removeAPIOperation

        public void removeAPIOperation​(String userId,
                                       String externalSourceGUID,
                                       String externalSourceName,
                                       String apiOperationGUID,
                                       String apiOperationGUIDParameterName,
                                       String qualifiedName,
                                       String methodName)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Remove the metadata element representing a API Operations.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        apiOperationGUID - unique identifier of the metadata element to remove
        apiOperationGUIDParameterName - parameter for apiOperationGUID
        qualifiedName - validating property
        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)
      • findAPIOperations

        public List<B> findAPIOperations​(String userId,
                                         String searchString,
                                         String searchStringParameterName,
                                         int startFrom,
                                         int pageSize,
                                         String methodName)
                                  throws InvalidParameterException,
                                         UserNotAuthorizedException,
                                         PropertyServerException
        Retrieve the list of API Operations 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 - name of parameter supplying the 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)
      • getAPIOperationsByName

        public List<B> getAPIOperationsByName​(String userId,
                                              String name,
                                              String nameParameterName,
                                              int startFrom,
                                              int pageSize,
                                              Date effectiveTime,
                                              String methodName)
                                       throws InvalidParameterException,
                                              UserNotAuthorizedException,
                                              PropertyServerException
        Retrieve the list of API Operation 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 - parameter supplying name
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for
        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)
      • getAPIOperationsForAPI

        public List<B> getAPIOperationsForAPI​(String userId,
                                              String apiGUID,
                                              String apiGUIDParameterName,
                                              int startFrom,
                                              int pageSize,
                                              Date effectiveTime,
                                              String methodName)
                                       throws InvalidParameterException,
                                              UserNotAuthorizedException,
                                              PropertyServerException
        Retrieve the API Operations metadata element with the supplied unique identifier.
        Parameters:
        userId - calling user
        apiGUID - unique identifier of the requested metadata element
        apiGUIDParameterName - parameter name of the apiGUID
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for
        methodName - calling method
        Returns:
        list of API Operations element
        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)