Class SubjectAreaRelationshipHandler
java.lang.Object
org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaHandler
org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaRelationshipHandler
TheSubjectAreaTermRESTServices provides the server-side implementation of the SubjectArea Open Metadata
Access Service (OMAS) for Terms. This interface provides relationship authoring interfaces for subject area experts.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaHandler
genericHandler, invalidParameterHandler, mappersFactory, maxPageSize
-
Constructor Summary
ConstructorsConstructorDescriptionSubjectAreaRelationshipHandler
(OpenMetadataAPIGenericHandler genericHandler, int maxPageSize) Construct the Subject Area Relationship Handler needed to operate within a single server instance. -
Method Summary
Modifier and TypeMethodDescription<R extends Relationship>
SubjectAreaOMASAPIResponse<R>createRelationship
(String restAPIName, String userId, Class<? extends IRelationshipMapper<R>> clazz, R relationship) Create a relationship, which is a link between two Nodes.<R extends Relationship>
SubjectAreaOMASAPIResponse<R>deleteRelationship
(String restAPIName, String userId, Class<? extends IRelationshipMapper<R>> clazz, String guid) Delete a relationship<R extends Relationship>
SubjectAreaOMASAPIResponse<R>getRelationship
(String restAPIName, String userId, Class<? extends IRelationshipMapper<R>> clazz, String guid) Get a relationship (relationship)<R extends Relationship>
SubjectAreaOMASAPIResponse<R>restoreRelationship
(String restAPIName, String userId, Class<? extends IRelationshipMapper<R>> clazz, String guid) Restore a relationship.<R extends Relationship>
SubjectAreaOMASAPIResponse<R>updateRelationship
(String restAPIName, String userId, String relationshipGuid, Class<? extends IRelationshipMapper<R>> clazz, R relationship, Boolean isReplace) Update a relationship.Methods inherited from class org.odpi.openmetadata.accessservices.subjectarea.handlers.SubjectAreaHandler
convertOmrsToOmas, findNodes, getAllRelationshipForEntity, getAllRelationshipsForEntity, getMaxPageSize, getNodesFromEntityDetails, getRelationshipsForEntityByType, getRelationshipsFromRelationships, sanitiseFindRequest, sanitiseFindRequest, setNodeEffectivity, setRelationshipEffectivity, setUniqueQualifiedNameIfBlank, validateGlossarySummaryDuringCreation
-
Constructor Details
-
SubjectAreaRelationshipHandler
public SubjectAreaRelationshipHandler(OpenMetadataAPIGenericHandler genericHandler, int maxPageSize) Construct the Subject Area Relationship Handler needed to operate within a single server instance.- Parameters:
genericHandler
- generic handlermaxPageSize
- maximum page size
-
-
Method Details
-
createRelationship
public <R extends Relationship> SubjectAreaOMASAPIResponse<R> createRelationship(String restAPIName, String userId, Class<? extends IRelationshipMapper<R>> clazz, R relationship) Create a relationship, which is a link between two Nodes.- Type Parameters:
R
-Relationship
type of object for response- Parameters:
restAPIName
- rest API nameuserId
- userId under which the request is performedclazz
- mapper Classrelationship
- relationship to create- Returns:
- response, when successful contains the created relationship
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- MetadataServerUncontactableException not able to communicate with a Metadata respository service.
- InvalidParameterException one of the parameters is null or invalid.
- UnrecognizedGUIDException the supplied guid was not recognised
- ClassificationException Error processing a classification.
- StatusNotSupportedException A status value is not supported.
- FunctionNotSupportedException Function is not supported.
-
getRelationship
public <R extends Relationship> SubjectAreaOMASAPIResponse<R> getRelationship(String restAPIName, String userId, Class<? extends IRelationshipMapper<R>> clazz, String guid) Get a relationship (relationship)- Type Parameters:
R
-Relationship
type of object for response- Parameters:
restAPIName
- rest API nameuserId
- unique identifier for requesting user, under which the request is performedclazz
- mapper Classguid
- guid of the relationship to get- Returns:
- response which when successful contains the relationship with the requested guid
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- MetadataServerUncontactableException not able to communicate with a Metadata respository service.
- InvalidParameterException one of the parameters is null or invalid.
- UnrecognizedGUIDException the supplied guid was not recognised
-
updateRelationship
public <R extends Relationship> SubjectAreaOMASAPIResponse<R> updateRelationship(String restAPIName, String userId, String relationshipGuid, Class<? extends IRelationshipMapper<R>> clazz, R relationship, Boolean isReplace) Update a relationship.- Type Parameters:
R
-Relationship
type of object for response- Parameters:
restAPIName
- rest API nameuserId
- userId under which the request is performedrelationshipGuid
- unique identifier of the relationshipclazz
- mapper Classrelationship
- the relationship to updateisReplace
- flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated.- Returns:
- response, when successful contains the updated relationship
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- MetadataServerUncontactableException not able to communicate with a Metadata respository service.
- InvalidParameterException one of the parameters is null or invalid.
- UnrecognizedGUIDException the supplied guid was not recognised
- ClassificationException Error processing a classification.
- StatusNotSupportedException A status value is not supported.
- FunctionNotSupportedException Function not supported.
-
deleteRelationship
public <R extends Relationship> SubjectAreaOMASAPIResponse<R> deleteRelationship(String restAPIName, String userId, Class<? extends IRelationshipMapper<R>> clazz, String guid) Delete a relationship- Type Parameters:
R
-Relationship
type of object for response- Parameters:
restAPIName
- rest API nameuserId
- unique identifier for requesting user, under which the request is performedclazz
- mapper Classguid
- guid of the relationship to delete- Returns:
- response for a soft delete, the response contains the deleted relationship
when not successful the following Exception responses can occur
- UnrecognizedGUIDException the supplied guid was not recognised
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- FunctionNotSupportedException Function not supported.
- InvalidParameterException one of the parameters is null or invalid.
- MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
- EntityNotDeletedException a soft delete was issued but the relationship was not deleted.
-
restoreRelationship
public <R extends Relationship> SubjectAreaOMASAPIResponse<R> restoreRelationship(String restAPIName, String userId, Class<? extends IRelationshipMapper<R>> clazz, String guid) Restore a relationship.Restore allows the deleted relationship to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored.
- Type Parameters:
R
-Relationship
type of object for response- Parameters:
restAPIName
- rest API nameuserId
- unique identifier for requesting user, under which the request is performedclazz
- mapper Classguid
- guid of the relationship to restore- Returns:
- response which when successful contains the restored relationship
when not successful the following Exception responses can occur
- UnrecognizedGUIDException the supplied guid was not recognised
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- FunctionNotSupportedException Function not supported.
- InvalidParameterException one of the parameters is null or invalid.
- MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
-