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 Details

    • 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 Details

    • 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, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create the API Operation object.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software 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 an API Operation
      suppliedTypeName - type name from the caller (enables creation of subtypes)
      extendedProperties - properties for an API Operation subtype
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create an API Operation from a template.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software 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
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, Date effectiveFrom, Date effectiveTo, boolean isMergeUpdate, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Update the API Operation.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software 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
      effectiveFrom - starting time for this relationship (null for all time)
      effectiveTo - ending time for this relationship (null for all time)
      isMergeUpdate - are unspecified properties unchanged (true) or removed?
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Remove the metadata element representing an API Operations.
      Parameters:
      userId - calling user
      externalSourceGUID - unique identifier of software capability representing the caller
      externalSourceName - unique name of software capability representing the caller
      apiOperationGUID - unique identifier of the metadata element to remove
      apiOperationGUIDParameterName - parameter for apiOperationGUID
      qualifiedName - validating property
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, 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
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, boolean forLineage, boolean forDuplicateProcessing, 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
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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, boolean forLineage, boolean forDuplicateProcessing, 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
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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)
    • getAPIOperationsForAPI

      public List<B> getAPIOperationsForAPI(String userId, String apiGUID, String apiGUIDParameterName, List<String> serviceSupportedZones, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, 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
      serviceSupportedZones - supported zones for calling service
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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)
    • getAPIOperationsForAPISchemaType

      public List<B> getAPIOperationsForAPISchemaType(String userId, String apiSchemaTypeGUID, String apiSchemaTypeGUIDParameterName, List<String> serviceSupportedZones, int startFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the API Operations metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      apiSchemaTypeGUID - unique identifier of the requested metadata element
      apiSchemaTypeGUIDParameterName - parameter name of the apiSchemaTypeGUID
      serviceSupportedZones - supported zones for calling service
      startFrom - paging start point
      pageSize - maximum results that can be returned
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      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)
    • getAPIOperationByGUID

      public B getAPIOperationByGUID(String userId, String guid, String guidParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the API Operation metadata element with the supplied unique identifier.
      Parameters:
      userId - calling user
      guid - unique identifier of the requested metadata element
      guidParameterName - parameter name of guid
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - calling method
      Returns:
      matching 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)