public class HandlerHelper extends Object
| Constructor and Description |
|---|
HandlerHelper(InvalidParameterHandler invalidParameterHandler,
OMRSRepositoryHelper repositoryHelper,
RepositoryHandler repositoryHandler,
Set<String> lineageClassificationTypes)
Construct the handler information needed to interact with the repository services
|
| Modifier and Type | Method and Description |
|---|---|
protected EntityDetail |
addContextForRelationships(String userId,
EntityDetail startEntity,
String relationshipTypeName,
Set<GraphContext> context)
Adds the relationships context for an entity, based on the relationship type.
|
RelationshipsContext |
buildContextForLineageClassifications(EntityDetail entityDetail)
Builds the classification context for an entity
|
RelationshipsContext |
buildContextForRelationships(String userId,
String entityGUID,
List<Relationship> relationships)
Builds the relationships context for an entity
|
List<Classification> |
filterLineageClassifications(List<Classification> classifications)
Extract the lineage classifications from the list of classifications assigned
|
List<EntityDetail> |
findEntitiesByType(String userId,
String entityTypeName,
SearchProperties searchProperties,
FindEntitiesParameters findEntitiesParameters)
Retrieves a list of entities based on the search criteria passed
|
EntityDetail |
getEntityDetails(String userId,
String entityDetailGUID,
String entityTypeName)
Fetch the entity using the identifier and the type name
|
SearchProperties |
getSearchPropertiesAfterUpdateTime(Long time)
Creat the search body for find entities searching entities updated after the given time
|
void |
validateAsset(EntityDetail entityDetail,
String methodName,
List<String> supportedZones)
Validate asset's GUID and it being in the specific supported zones.
|
public HandlerHelper(InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, RepositoryHandler repositoryHandler, Set<String> lineageClassificationTypes)
invalidParameterHandler - handler for invalid parametersrepositoryHelper - helper used by the convertersrepositoryHandler - handler for calling the repository servicespublic EntityDetail getEntityDetails(String userId, String entityDetailGUID, String entityTypeName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - the user identifierentityDetailGUID - the entity 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.public List<EntityDetail> findEntitiesByType(String userId, String entityTypeName, SearchProperties searchProperties, FindEntitiesParameters findEntitiesParameters) throws UserNotAuthorizedException, PropertyServerException
userId - the user identityTypeName - the name of the entity typesearchProperties - searchProperties used in the filteringfindEntitiesParameters - filtering used to reduce the scope of the searchUserNotAuthorizedException - the user is not authorized to make this request.PropertyServerException - something went wrong with the REST call stack.public List<Classification> filterLineageClassifications(List<Classification> classifications)
classifications - the list of available classificationspublic SearchProperties getSearchPropertiesAfterUpdateTime(Long time)
time - date in milliseconds after which the entities were updatedpublic RelationshipsContext buildContextForRelationships(String userId, String entityGUID, List<Relationship> relationships) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException
userId - the unique identifier for the userentityGUID - the guid of the entityrelationships - the list of relationships for which the context is builtGraphContext containing the lineage context for the relationshipsInvalidParameterException - the invalid parameter exceptionPropertyServerException - the property server exceptionUserNotAuthorizedException - the user not authorized exceptionpublic RelationshipsContext buildContextForLineageClassifications(EntityDetail entityDetail)
entityDetail - the entity for retrieving the classifications attached to itGraphContext containing the lineage context for the classificationsprotected EntityDetail addContextForRelationships(String userId, EntityDetail startEntity, String relationshipTypeName, Set<GraphContext> context) throws OCFCheckedExceptionBase
userId - the unique identifier for the userstartEntity - the start entity for the relationshipsrelationshipTypeName - the type of the relationship for which the context is builtcontext - the context to be updatedOCFCheckedExceptionBase - checked exception for reporting errors found when using OCF connectorspublic void validateAsset(EntityDetail entityDetail, String methodName, List<String> supportedZones) throws InvalidParameterException
entityDetail - the entity detailmethodName - the method namesupportedZones - the supported zonesInvalidParameterException - the invalid parameter exceptionCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.