java.lang.Object
org.odpi.openmetadata.accessservices.assetcatalog.handlers.AssetCatalogHandler

public class AssetCatalogHandler extends Object
Asset Catalog Handler supports the lookup of the assets from the repositories. It runs on the server-side of the Asset Catalog OMAS, fetches the entities using the RepositoryHandler.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AssetCatalogHandler(String serverUserName, String sourceName, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler repositoryHandler, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler<org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean> assetHandler, AssetCatalogConverter<org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean> assetCatalogConverter, org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryErrorHandler errorHandler, List<String> supportedZones, List<String> supportedTypesForSearch, ClockService clockService)
    Construct the handler information needed to interact with the repository services
  • Method Summary

    Modifier and Type
    Method
    Description
    org.odpi.openmetadata.accessservices.assetcatalog.model.Elements
    buildContextByType(String userId, String entityGUID, String entityTypeDefName)
     
    List<org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean>
    getEntitiesFromNeighborhood(String userId, String assetGUID, org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters searchParameters, String serverName)
     
    List<org.odpi.openmetadata.accessservices.assetcatalog.model.Classification>
    getEntityClassificationByName(String userId, String assetGUID, String assetTypeName, String classificationName)
    Returns a list of the classification assigned to the given asset.
    org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean
    getEntityDetails(String userId, String assetGUID, String assetTypeName)
    Return the requested entity and converting to Asset Catalog OMAS model
    List<org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship>
    getRelationships(String userId, String assetGUID, String assetTypeName, String relationshipTypeName, Integer from, Integer pageSize)
     
    List<org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship>
    getRelationshipsByEntityGUID(String userId, String assetGUID, String assetTypeName)
    Returns a list of the relationships for the given entity identifier.
    List<org.odpi.openmetadata.accessservices.assetcatalog.model.Type>
    getSupportedTypes(String userId, String typeName)
    Returns supported types for search with all sub-types.
    List<org.odpi.openmetadata.accessservices.assetcatalog.model.Elements>
    searchByType(String userId, String searchCriteria, org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters searchParameters)
     
    List<org.odpi.openmetadata.accessservices.assetcatalog.model.Elements>
    searchByTypeGUID(String userId, String typeGUID)
    \
    List<org.odpi.openmetadata.accessservices.assetcatalog.model.Elements>
    searchByTypeName(String userId, String typeName)
    \

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AssetCatalogHandler

      public AssetCatalogHandler(String serverUserName, String sourceName, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler repositoryHandler, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper repositoryHelper, org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler<org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean> assetHandler, AssetCatalogConverter<org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean> assetCatalogConverter, org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryErrorHandler errorHandler, List<String> supportedZones, List<String> supportedTypesForSearch, ClockService clockService)
      Construct the handler information needed to interact with the repository services
      Parameters:
      serverUserName - name of the local server
      sourceName - name of the component
      invalidParameterHandler - handler for managing parameter errors
      repositoryHandler - manages calls to the repository services
      repositoryHelper - provides utilities for manipulating the repository services objects
      assetHandler - provides utilities for manipulating asset catalog objects using a generic handler
      assetCatalogConverter - asset catalog bean converter
      errorHandler - provides common validation routines for the other handler classes
      supportedZones - configurable list of zones that Asset Catalog is allowed to serve Assets from
      supportedTypesForSearch - configurable list of supported types used for search
      clockService - clock service
  • Method Details

    • getEntityDetails

      public org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean getEntityDetails(String userId, String assetGUID, String assetTypeName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
      Return the requested entity and converting to Asset Catalog OMAS model
      Parameters:
      userId - user identifier that issues the call
      assetGUID - the asset identifier
      assetTypeName - the asset type name
      Returns:
      AssetCatalogBean that contains the core properties of the entity and additional properties
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - is thrown by the OMAS when a parameter is null or an invalid value.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action.
    • getRelationshipsByEntityGUID

      public List<org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship> getRelationshipsByEntityGUID(String userId, String assetGUID, String assetTypeName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Returns a list of the relationships for the given entity identifier. Relationship type name can be used for filtering.
      Parameters:
      userId - user identifier that issues the call
      assetGUID - the asset identifier
      assetTypeName - the asset type name
      Returns:
      a list of Relationships
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - is thrown by the OMAG Service when a parameter is null or an invalid value.
    • getEntityClassificationByName

      public List<org.odpi.openmetadata.accessservices.assetcatalog.model.Classification> getEntityClassificationByName(String userId, String assetGUID, String assetTypeName, String classificationName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
      Returns a list of the classification assigned to the given asset. The filtering based on the classification name is possible.
      Parameters:
      userId - user identifier that issues the call
      assetGUID - the asset identifier
      assetTypeName - the asset type name
      classificationName - the classification type name
      Returns:
      a list of Classifications assigned to the given asset
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - is thrown by the OMAG Service when a parameter is null or an invalid value.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action.
    • getRelationships

      public List<org.odpi.openmetadata.accessservices.assetcatalog.model.Relationship> getRelationships(String userId, String assetGUID, String assetTypeName, String relationshipTypeName, Integer from, Integer pageSize) throws org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Parameters:
      userId - user identifier that issues the call
      assetGUID - the asset identifier
      assetTypeName - the asset type name
      relationshipTypeName - the relationship type name
      from - offset
      pageSize - limit the number of the assets returned
      Returns:
      the list of relationships for the given asset
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - is thrown by the OMAG Service when a parameter is null or an invalid value.
    • getEntitiesFromNeighborhood

      public List<org.odpi.openmetadata.accessservices.assetcatalog.model.AssetCatalogBean> getEntitiesFromNeighborhood(String userId, String assetGUID, org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters searchParameters, String serverName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.accessservices.assetcatalog.exception.AssetCatalogException
      Parameters:
      userId - user identifier that issues the call
      assetGUID - the asset identifier
      searchParameters - additional parameters for searching and filtering
      serverName -
      Returns:
      a list of entities from the neighborhood of the given entity
      Throws:
      org.odpi.openmetadata.accessservices.assetcatalog.exception.AssetCatalogException - is thrown by the Asset Catalog OMAS when the asset passed on a request is not found in the repository
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - is thrown by the OMAG Service when a parameter is null or an invalid value.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action.
    • searchByType

      public List<org.odpi.openmetadata.accessservices.assetcatalog.model.Elements> searchByType(String userId, String searchCriteria, org.odpi.openmetadata.accessservices.assetcatalog.model.rest.body.SearchParameters searchParameters) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
      Parameters:
      userId - user identifier that issues the call
      searchCriteria - search criteria string used for finding the entities
      searchParameters - additional parameters for searching and filtering
      Returns:
      a list of matching criteria entities
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - - is thrown by an OMRS Connector when the supplied UserId is not permitted to perform a specific operation on the metadata collection.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException - - provides a checked exception for reporting that an OMRS repository connector does not support the method called
      org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - - is thrown by an OMRS Connector when the parameters passed to a repository connector are not valid
      org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException - - is thrown by an OMRS Connector when the properties defined for a specific entity or relationship instance do not match the TypeDefs for the metadata collection.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException - - is thrown by an OMRS Connector when the requested type for an instance is not represented by a known TypeDef.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException - - is thrown by an OMRS Connector when the caller has passed invalid paging attributes on a search call.
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - - is thrown by the OMAG Service when a parameter is null or an invalid value.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - - there is a problem communicating with the metadata repository.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
    • searchByTypeName

      public List<org.odpi.openmetadata.accessservices.assetcatalog.model.Elements> searchByTypeName(String userId, String typeName) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
      \
      Parameters:
      userId - user identifier that issues the call
      typeName - the assets type name to search for
      Returns:
      list of assets by type name
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - - is thrown by an OMRS Connector when the supplied UserId is not permitted to perform a specific operation on the metadata collection.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException - - provides a checked exception for reporting that an OMRS repository connector does not support the method called
      org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - - is thrown by an OMRS Connector when the parameters passed to a repository connector are not valid
      org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException - - is thrown by an OMRS Connector when the properties defined for a specific entity
      org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException - - is thrown by an OMRS Connector when the requested type for an instance is not represented by a known TypeDef.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException - - is thrown by an OMRS Connector when the caller has passed invalid paging attributes on a search call.
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - - is thrown by the OMAG Service when a parameter is null or an invalid value.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - - there is a problem communicating with the metadata repository.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - - is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action.
    • searchByTypeGUID

      public List<org.odpi.openmetadata.accessservices.assetcatalog.model.Elements> searchByTypeGUID(String userId, String typeGUID) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException, org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException, org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException
      \
      Parameters:
      userId - user identifier that issues the call
      typeGUID - the assets type GUID to search for
      Returns:
      list of assets by type GUID
      Throws:
      org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - - is thrown by an OMRS Connector when the supplied UserId is not permitted to perform a specific operation on the metadata collection.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException - - provides a checked exception for reporting that an OMRS repository connector does not support the method called
      org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - - is thrown by an OMRS Connector when the parameters passed to a repository connector are not valid
      org.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException - - is thrown by an OMRS Connector when the properties defined for a specific entity
      org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException - - is thrown by an OMRS Connector when the requested type for an instance is not represented by a known TypeDef.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.PagingErrorException - - is thrown by an OMRS Connector when the caller has passed invalid paging attributes on a search call.
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - - is thrown by the OMAG Service when a parameter is null or an invalid value.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - - there is a problem communicating with the metadata repository.
      org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - - is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action.
    • buildContextByType

      public org.odpi.openmetadata.accessservices.assetcatalog.model.Elements buildContextByType(String userId, String entityGUID, String entityTypeDefName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Parameters:
      userId - user identifier that issues the call
      entityGUID - the identifier of the entity
      entityTypeDefName - the type name of the entity
      Returns:
      the context of the given entity
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - - is thrown by the OCF when a userId passed on a request is not authorized to perform the requested action.
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - - provides a checked exception for reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connector.
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - - is thrown by the OMAS when a parameter is null or an invalid value.
    • getSupportedTypes

      public List<org.odpi.openmetadata.accessservices.assetcatalog.model.Type> getSupportedTypes(String userId, String typeName)
      Returns supported types for search with all sub-types. If type name is provided, it returns the type itself and the list of sub-types for it
      Parameters:
      userId - user identifier that issues the call
      typeName - optional type name
      Returns:
      a list of types