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
|
protected void |
createOrUpdateExternalRelationship(String userId,
String firstGUID,
String secondGUID,
String relationshipTypeName,
String firstEntityTypeName,
String externalSourceName,
InstanceProperties relationshipProperties)
Create or updates an external relationship between two entities.
|
protected Optional<EntityDetail> |
findEntity(String userId,
String qualifiedName,
String entityTypeName)
Find out if the entity is already stored in the repository.
|
protected void |
removeEntity(String userId,
String entityGUID,
String entityTypeName)
Remove entity
|
protected void |
throwInvalidParameterException(DataEngineErrorCode errorCode,
String methodName,
String... params) |
protected void |
updateEntity(String userId,
String entityGUID,
InstanceProperties instanceProperties,
String entityTypeName)
Update an existing entity
|
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) throws UserNotAuthorizedException, PropertyServerException
userId - the name of the calling userentityGUID - unique identifier of entity to updateinstanceProperties - the properties of the entityentityTypeName - name of the entity's typeUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverprotected 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 relationshipprotected 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 searchedInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverprotected void createOrUpdateExternalRelationship(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 void removeEntity(String userId, String entityGUID, String entityTypeName) 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 entityInvalidParameterException - the bean properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverprotected void throwInvalidParameterException(DataEngineErrorCode errorCode, String methodName, String... params) throws InvalidParameterException
InvalidParameterExceptionCopyright © 2018–2020 ODPi. All rights reserved.