public class TermHandler extends Object
| Constructor and Description |
|---|
TermHandler(SubjectAreaTerm subjectAreaTerm)
Constructor for the TermHandler
|
| Modifier and Type | Method and Description |
|---|---|
Term |
createTerm(String userId,
Term suppliedTerm)
Create a Term
|
void |
deleteTerm(String userId,
String guid)
Delete a Term instance
|
List<Term> |
findTerm(String userId,
FindRequest findRequest)
Find Term
|
Term |
getTermByGuid(String userId,
String guid)
Get a term by guid.
|
List<Line> |
getTermRelationships(String userId,
String guid,
FindRequest findRequest)
Get Term relationships
|
void |
purgeTerm(String userId,
String guid)
Purge a Term instance
|
Term |
replaceTerm(String userId,
String guid,
Term suppliedTerm)
Replace a Term.
|
Term |
restoreTerm(String userId,
String guid)
Restore a Term
|
Term |
updateTerm(String userId,
String guid,
Term suppliedTerm)
Update a Term.
|
public TermHandler(SubjectAreaTerm subjectAreaTerm)
subjectAreaTerm - The SubjectAreaDefinition Open Metadata Access Service (OMAS) API for terms. This is the same as the
The SubjectAreaDefinition Open Metadata View Service (OMVS) API for terms.public Term createTerm(String userId, Term suppliedTerm) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - userId under which the request is performedsuppliedTerm - Term to createExceptions returned by the server
UserNotAuthorizedException - the requesting user is not authorized to issue this request.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - property server exceptionpublic Term getTermByGuid(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - userId under which the request is performedguid - guid of the term to getExceptions returned by the server
UserNotAuthorizedException - the requesting user is not authorized to issue this request.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - property server exceptionpublic List<Term> findTerm(String userId, FindRequest findRequest) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
userId - unique identifier for requesting user, under which the request is performedfindRequest - FindRequestExceptions returned by the server
UserNotAuthorizedException - the requesting user is not authorized to issue this request.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - property server exceptionpublic Term replaceTerm(String userId, String guid, Term suppliedTerm) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Status is not updated using this call. The GovernanceAction content if specified replaces what is on the server.
userId - userId under which the request is performedguid - guid of the term to updatesuppliedTerm - term to be updatedUserNotAuthorizedException - the requesting user is not authorized to issue this request.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - property server exceptionpublic Term updateTerm(String userId, String guid, Term suppliedTerm) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Status is not updated using this call. The GovernanceAction content if specified replaces what is on the server.
userId - userId under which the request is performedguid - guid of the term to updatesuppliedTerm - term to be updatedUserNotAuthorizedException - the requesting user is not authorized to issue this request.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - property server exceptionpublic void deleteTerm(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
A delete (also known as a soft delete) means that the term instance will exist in a deleted state in the repository after the delete operation. This means that it is possible to undo the delete.
userId - userId under which the request is performedguid - guid of the term to be deleted.
Exceptions returned by the serverUserNotAuthorizedException - the requesting user is not authorized to issue this request.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - property server exceptionpublic void purgeTerm(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
A purge means that the term will not exist after the operation.
userId - userId under which the request is performedguid - guid of the term to be deleted.UserNotAuthorizedException - the requesting user is not authorized to issue this request.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - property server exceptionpublic Term restoreTerm(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Restore allows the deleted Term to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored.
userId - unique identifier for requesting user, under which the request is performedguid - guid of the term to restoreUserNotAuthorizedException - the requesting user is not authorized to issue this request.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - property server exceptionpublic List<Line> getTermRelationships(String userId, String guid, FindRequest findRequest) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException
userId - unique identifier for requesting user, under which the request is performedguid - guid of the term to getfindRequest - FindRequestExceptions returned by the server
UserNotAuthorizedException - the requesting user is not authorized to issue this request.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - Property Server exceptionCopyright © 2018–2020 ODPi. All rights reserved.