Class AssetCatalogHandler
java.lang.Object
org.odpi.openmetadata.accessservices.assetcatalog.handlers.AssetCatalogHandler
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
ConstructorsConstructorDescriptionAssetCatalogHandler(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 TypeMethodDescriptionorg.odpi.openmetadata.accessservices.assetcatalog.model.ElementsbuildContextByType(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.AssetCatalogBeangetEntityDetails(String userId, String assetGUID, String assetTypeName) Return the requested entity and converting to Asset Catalog OMAS modelList<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) \
-
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 serversourceName- name of the componentinvalidParameterHandler- handler for managing parameter errorsrepositoryHandler- manages calls to the repository servicesrepositoryHelper- provides utilities for manipulating the repository services objectsassetHandler- provides utilities for manipulating asset catalog objects using a generic handlerassetCatalogConverter- asset catalog bean convertererrorHandler- provides common validation routines for the other handler classessupportedZones- configurable list of zones that Asset Catalog is allowed to serve Assets fromsupportedTypesForSearch- configurable list of supported types used for searchclockService- 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 callassetGUID- the asset identifierassetTypeName- 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 connectororg.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 callassetGUID- the asset identifierassetTypeName- 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 connectororg.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 callassetGUID- the asset identifierassetTypeName- the asset type nameclassificationName- 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 connectororg.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 callassetGUID- the asset identifierassetTypeName- the asset type namerelationshipTypeName- the relationship type namefrom- offsetpageSize- 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 connectororg.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 callassetGUID- the asset identifiersearchParameters- additional parameters for searching and filteringserverName-- 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 repositoryorg.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 connectororg.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 callsearchCriteria- search criteria string used for finding the entitiessearchParameters- 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 calledorg.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException- - is thrown by an OMRS Connector when the parameters passed to a repository connector are not validorg.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.EntityNotKnownExceptionorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionorg.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 calltypeName- 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 calledorg.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException- - is thrown by an OMRS Connector when the parameters passed to a repository connector are not validorg.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException- - is thrown by an OMRS Connector when the properties defined for a specific entityorg.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.EntityNotKnownExceptionorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connectororg.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 calltypeGUID- 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 calledorg.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException- - is thrown by an OMRS Connector when the parameters passed to a repository connector are not validorg.odpi.openmetadata.repositoryservices.ffdc.exception.PropertyErrorException- - is thrown by an OMRS Connector when the properties defined for a specific entityorg.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.EntityNotKnownExceptionorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- - reporting errors when connecting to a metadata repository to retrieve properties about the connection and/or connectororg.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 callentityGUID- the identifier of the entityentityTypeDefName- 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 calltypeName- optional type name- Returns:
- a list of types
-