public class DataEngineCommonHandler extends Object
| Constructor and Description |
|---|
DataEngineCommonHandler(String serviceName,
String serverName,
InvalidParameterHandler invalidParameterHandler,
RepositoryHandler repositoryHandler,
OMRSRepositoryHelper repositoryHelper,
DataEngineRegistrationHandler dataEngineRegistrationHandler)
Construct the handler information needed to interact with the repository services
|
| Modifier and Type | Method and Description |
|---|---|
protected EntityDetail |
buildEntityDetail(String entityGUID,
InstanceProperties instanceProperties)
Build an EntityDetail object based on the instance properties on an entity bean
|
protected Relationship |
buildRelationship(String entityGUID,
InstanceProperties instanceProperties)
Build an Relationship object based on the instance properties of a relationship
|
protected String |
createExternalEntity(String userId,
InstanceProperties instanceProperties,
InstanceStatus instanceStatus,
String entityTypeName,
String externalSourceName)
Create a new entity from an external source with the specified instance status
|
Optional<EntityDetail> |
findEntity(String userId,
String qualifiedName,
String entityTypeName)
Find out if the entity is already stored in the repository.
|
protected Optional<Relationship> |
findRelationship(String userId,
String firstGUID,
String secondGUID,
String firstEntityTypeName,
String relationshipTypeName)
Find out if the relationship is already stored in the repository.
|
protected Set<EntityDetail> |
getEntitiesForRelationship(String userId,
String guid,
String relationshipTypeName,
String entityTypeName)
Return the set of entities at the other end of the requested relationship type.
|
Optional<EntityDetail> |
getEntityDetails(String userId,
String entityDetailGUID,
String entityTypeName)
Fetch the entity using the identifier and the type name.
|
protected Optional<EntityDetail> |
getEntityForRelationship(String userId,
String entityGUID,
String relationshipTypeName,
String entityTypeName)
Return the entity at the other end of the requested relationship type.
|
protected int |
getOwnerTypeOrdinal(OwnerType ownerType)
Return the owner type ordinal
|
protected int |
getSortOrder(Attribute column)
Return the ordinal for the order that the column is arranged in
|
protected void |
removeEntity(String userId,
String entityGUID,
String entityTypeName,
String externalSourceName)
Remove entity
|
void |
throwEntityNotDeletedException(DataEngineErrorCode errorCode,
String methodName,
String... params) |
protected void |
throwInvalidParameterException(DataEngineErrorCode errorCode,
String methodName,
String... params) |
protected void |
updateEntity(String userId,
String entityGUID,
InstanceProperties instanceProperties,
String entityTypeName,
String externalSourceName)
Update an existing entity
|
protected void |
upsertExternalRelationship(String userId,
String firstGUID,
String secondGUID,
String relationshipTypeName,
String firstEntityTypeName,
String externalSourceName,
InstanceProperties relationshipProperties)
Create or updates an external relationship between two entities.
|
protected void |
validateDeleteSemantic(DeleteSemantic deleteSemantic,
String methodName) |
public DataEngineCommonHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, DataEngineRegistrationHandler dataEngineRegistrationHandler)
serviceName - name of this serviceserverName - name of the local serverinvalidParameterHandler - handler for managing parameter errorsrepositoryHandler - manages calls to the repository servicesrepositoryHelper - provides utilities for manipulating the repository services objectsdataEngineRegistrationHandler - provides calls for retrieving external data engine guidprotected String createExternalEntity(String userId, InstanceProperties instanceProperties, InstanceStatus instanceStatus, String entityTypeName, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - the name of the calling userinstanceProperties - the properties of the entityinstanceStatus - initial status (needs to be valid for type)entityTypeName - name of the entity's typeexternalSourceName - the unique name of the external sourceInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverprotected void updateEntity(String userId, String entityGUID, InstanceProperties instanceProperties, String entityTypeName, String externalSourceName) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException
userId - the name of the calling userentityGUID - unique identifier of entity to updateinstanceProperties - the properties of the entityentityTypeName - name of the entity's typeexternalSourceName - the external data engineUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverInvalidParameterException - the bean properties are invalidprotected EntityDetail buildEntityDetail(String entityGUID, InstanceProperties instanceProperties)
entityGUID - unique identifier of entity to updateinstanceProperties - the properties of the entityprotected Relationship buildRelationship(String entityGUID, InstanceProperties instanceProperties)
entityGUID - unique identifier of entity to updateinstanceProperties - the properties of the relationshippublic Optional<EntityDetail> findEntity(String userId, String qualifiedName, String entityTypeName) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException
userId - the name of the calling userqualifiedName - the qualifiedName name of the entity to be searchedentityTypeName - the type name of the entityInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic Optional<EntityDetail> getEntityDetails(String userId, String entityDetailGUID, String entityTypeName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - the user identifierentityDetailGUID - the entity unique identifierentityTypeName - the entity type nameInvalidParameterException - one of the parameters is null or invalid.UserNotAuthorizedException - user not authorized to issue this request.PropertyServerException - problem retrieving the entity.protected void upsertExternalRelationship(String userId, String firstGUID, String secondGUID, String relationshipTypeName, String firstEntityTypeName, String externalSourceName, InstanceProperties relationshipProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - the name of the calling userfirstGUID - the unique identifier of the entity at first endsecondGUID - the unique identifier of the entity at second endrelationshipTypeName - type name for the relationship to createfirstEntityTypeName - type name for the entity at first endexternalSourceName - the unique name of the external sourcerelationshipProperties - the properties for the relationshipInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverprotected Optional<Relationship> findRelationship(String userId, String firstGUID, String secondGUID, String firstEntityTypeName, String relationshipTypeName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - the name of the calling userfirstGUID - the unique identifier of the entity at first endsecondGUID - the unique identifier of the entity at second endrelationshipTypeName - type name for the relationship to createfirstEntityTypeName - type name for the entity at first endInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverprotected void removeEntity(String userId, String entityGUID, String entityTypeName, String externalSourceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - the name of the calling userentityGUID - the unique identifier of the port to be removedentityTypeName - the type name of the entityexternalSourceName - the external data engineInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverprotected int getOwnerTypeOrdinal(OwnerType ownerType)
ownerType - OwnerType enumprotected int getSortOrder(Attribute column)
column - the column toprotected void throwInvalidParameterException(DataEngineErrorCode errorCode, String methodName, String... params) throws InvalidParameterException
InvalidParameterExceptionpublic void throwEntityNotDeletedException(DataEngineErrorCode errorCode, String methodName, String... params) throws EntityNotDeletedException
EntityNotDeletedExceptionprotected Set<EntityDetail> getEntitiesForRelationship(String userId, String guid, String relationshipTypeName, String entityTypeName) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException
userId - the name of the calling userguid - starting entity's GUIDrelationshipTypeName - type name for the relationship to followentityTypeName - starting entity's type nameInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverprotected Optional<EntityDetail> getEntityForRelationship(String userId, String entityGUID, String relationshipTypeName, String entityTypeName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - the name of the calling userentityGUID - the unique identifier of the starting entityrelationshipTypeName - the relationship type nameentityTypeName - the entity of the starting end type nameInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverprotected void validateDeleteSemantic(DeleteSemantic deleteSemantic, String methodName) throws FunctionNotSupportedException
FunctionNotSupportedExceptionCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.