Class RelationshipHandler
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.assetcatalog.handlers.RelationshipHandler
-
public class RelationshipHandler extends Object
Relationship Handler supports the lookup of the asset's relationship from the repositories. It runs on the server-side of the Asset Catalog OMAS, fetches the relationships using the RepositoryHandler.
-
-
Field Summary
Fields Modifier and Type Field Description static StringENTITY_1_GUID_PARAMETERstatic StringENTITY_2_GUID_PARAMETER
-
Constructor Summary
Constructors Constructor Description RelationshipHandler(String sourceName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, OpenMetadataAPIGenericHandler<AssetCatalogBean> assetHandler, RepositoryErrorHandler errorHandler)Construct the handler information needed to interact with the repository services
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RelationshipgetRelationshipBetweenEntities(String userId, String serverName, String entity1GUID, String entity2GUID, String relationshipType)Fetch relationship between entities details based on its unique identifier of the ends
-
-
-
Field Detail
-
ENTITY_1_GUID_PARAMETER
public static final String ENTITY_1_GUID_PARAMETER
- See Also:
- Constant Field Values
-
ENTITY_2_GUID_PARAMETER
public static final String ENTITY_2_GUID_PARAMETER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RelationshipHandler
public RelationshipHandler(String sourceName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, OpenMetadataAPIGenericHandler<AssetCatalogBean> assetHandler, RepositoryErrorHandler errorHandler)
Construct the handler information needed to interact with the repository services- Parameters:
sourceName- name of the componentinvalidParameterHandler- handler for managing parameter errorsrepositoryHandler- manages calls to the repository servicesrepositoryHelper- provides utilities for manipulating the repository services objectsassetHandler- provides utilities for manipulating asset catalog objects using a generic handlererrorHandler- provides common validation routines for the other handler classes
-
-
Method Detail
-
getRelationshipBetweenEntities
public Relationship getRelationshipBetweenEntities(String userId, String serverName, String entity1GUID, String entity2GUID, String relationshipType) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Fetch relationship between entities details based on its unique identifier of the ends- Parameters:
userId- String unique identifier for the userserverName- server nameentity1GUID- Entity guid of the first end of the relationshipentity2GUID- Entity guid of the second end of the relationshiprelationshipType- Type of the relationship- Returns:
- the relationship between entities
- Throws:
InvalidParameterException- full path or userId is nullPropertyServerException- problem accessing property serverUserNotAuthorizedException- security access problem
-
-