public class CommonHandler extends Object
| Constructor and Description |
|---|
CommonHandler(String serviceName,
String serverName,
InvalidParameterHandler invalidParameterHandler,
OMRSRepositoryHelper repositoryHelper,
RepositoryHandler repositoryHandler)
Construct the discovery engine configuration handler caching the objects
needed to operate within a single server instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected EntityDetail |
buildGraphEdgeByRelationship(String userId,
EntityDetail startEntity,
Relationship relationship,
AssetContext graph)
Adds entities and relationships for the process Context structure
|
EntityDetail |
getEntityAtTheEnd(String userId,
String entityDetailGUID,
Relationship relationship) |
Optional<EntityDetail> |
getEntityDetails(String userId,
String guid,
String typeName)
Query about the entity in the repositories based on the Guid
|
List<Relationship> |
getRelationshipsByType(String userId,
String assetGuid,
String relationshipTypeName,
String entityTypeName)
Query about the relationships of an entity based on the type of the relationship
|
String |
getTypeName(String userId,
String typeDefName)
Retrieves guid for a specific type
|
public CommonHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, RepositoryHandler repositoryHandler)
serviceName - name of the consuming serviceserverName - name of this server instanceinvalidParameterHandler - handler for invalid parametersrepositoryHelper - helper used by the convertersrepositoryHandler - handler for calling the repository servicespublic Optional<EntityDetail> getEntityDetails(String userId, String guid, String typeName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - String - userId of user making request.guid - guid of the asset we need to retrieve from a repositorytypeName - the name of the Open Metadata type for getting detailsInvalidParameterExceptionPropertyServerExceptionUserNotAuthorizedExceptionpublic List<Relationship> getRelationshipsByType(String userId, String assetGuid, String relationshipTypeName, String entityTypeName) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException
userId - String - userId of user making request.assetGuid - guid of the asset we need to retrieve the relationshipsrelationshipTypeName - the type of the relationshipentityTypeName - the type of the entityUserNotAuthorizedExceptionPropertyServerExceptionInvalidParameterExceptionpublic String getTypeName(String userId, String typeDefName)
userId - String - userId of user making request.typeDefName - type of the Entitypublic EntityDetail getEntityAtTheEnd(String userId, String entityDetailGUID, Relationship relationship) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
protected EntityDetail buildGraphEdgeByRelationship(String userId, EntityDetail startEntity, Relationship relationship, AssetContext graph) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - String - userId of user making request.startEntity - parent entity of the relationshiprelationship - the relationship of the parent nodeInvalidParameterExceptionPropertyServerExceptionUserNotAuthorizedExceptionCopyright © 2018–2019 ODPi. All rights reserved.