Class DataEngineCollectionHandler
java.lang.Object
org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineCollectionHandler
DataEngineCollectionHandler manages collection objects. It runs server-side in the
DataEngine OMAS and creates and retrieves collections entities through the OMRSRepositoryConnector.
-
Constructor Summary
ConstructorsConstructorDescriptionDataEngineCollectionHandler
(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, OpenMetadataAPIGenericHandler<Collection> collectionOpenMetadataAPIGenericHandler, DataEngineRegistrationHandler dataEngineRegistrationHandler, DataEngineCommonHandler dataEngineCommonHandler) Construct the handler information needed to interact with the repository services -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCollectionMembershipRelationship
(String userId, String processGUID, String collectionGUID, String externalSourceName) Create CollectionMembership relationships between a Process asset and a Collection.createCollection
(String userId, Collection collection, String externalSourceName) Create the schema type entity, with the corresponding schema attributes and relationships if it doesn't exist or updates the existing one.findCollectionEntity
(String userId, String qualifiedName) Find out if the Transformation Project object is already stored in the repository as a Collection.
-
Constructor Details
-
DataEngineCollectionHandler
public DataEngineCollectionHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, OpenMetadataAPIGenericHandler<Collection> collectionOpenMetadataAPIGenericHandler, DataEngineRegistrationHandler dataEngineRegistrationHandler, DataEngineCommonHandler dataEngineCommonHandler) Construct the handler information needed to interact with the repository services- Parameters:
serviceName
- name of this serviceserverName
- name of the local serverinvalidParameterHandler
- handler for managing parameter errorsrepositoryHelper
- provides utilities for manipulating the repository services objectsdataEngineRegistrationHandler
- provides calls for retrieving external data engine guiddataEngineCommonHandler
- provides utilities for manipulating entitiescollectionOpenMetadataAPIGenericHandler
- helps building model for creating Collection metadata associated with Process assets
-
-
Method Details
-
createCollection
public String createCollection(String userId, Collection collection, String externalSourceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create the schema type entity, with the corresponding schema attributes and relationships if it doesn't exist or updates the existing one.- Parameters:
userId
- the name of the calling usercollection
- the collection type valuesexternalSourceName
- the unique name of the external source- Returns:
- unique identifier of the schema type in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
findCollectionEntity
public Optional<EntityDetail> findCollectionEntity(String userId, String qualifiedName) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException Find out if the Transformation Project object is already stored in the repository as a Collection. It uses the fully qualified name to retrieve the entity- Parameters:
userId
- the name of the calling userqualifiedName
- the qualifiedName name of the process to be searched- Returns:
- optional with entity details if found, empty optional if not found
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
addCollectionMembershipRelationship
public void addCollectionMembershipRelationship(String userId, String processGUID, String collectionGUID, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create CollectionMembership relationships between a Process asset and a Collection. Verifies that the relationship is not present before creating it- Parameters:
userId
- the name of the calling userprocessGUID
- the unique identifier of the processcollectionGUID
- the unique identifier of the collectionexternalSourceName
- the unique name of the external source- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-