public class SubjectAreaCategoryHandler extends SubjectAreaHandler
invalidParameterHandler, oMRSAPIHelper, repositoryHandler, repositoryHelper, serverName, serviceName| Constructor and Description |
|---|
SubjectAreaCategoryHandler(String serviceName,
String serverName,
InvalidParameterHandler invalidParameterHandler,
OMRSRepositoryHelper repositoryHelper,
RepositoryHandler repositoryHandler,
OMRSAPIHelper oMRSAPIHelper,
RepositoryErrorHandler errorHandler)
Construct the Subject Area Category Handler
needed to operate within a single server instance.
|
| Modifier and Type | Method and Description |
|---|---|
SubjectAreaOMASAPIResponse |
createCategory(SubjectAreaGlossaryHandler glossaryHandler,
String userId,
Category suppliedCategory)
Create a Category.
|
protected SubjectAreaOMASAPIResponse |
createCategoryResponse(Category gotCategory) |
SubjectAreaOMASAPIResponse |
deleteCategory(String userId,
String guid,
Boolean isPurge)
Delete a Category or SubjectAreaDefinition instance
|
SubjectAreaOMASAPIResponse |
findCategory(String userId,
String searchCriteria,
Date asOfTime,
Integer offset,
Integer pageSize,
SequencingOrder sequencingOrder,
String sequencingProperty)
Find Category
|
SubjectAreaOMASAPIResponse |
getCategory(String userId,
String guid)
Get a Category
|
SubjectAreaOMASAPIResponse |
getCategoryRelationships(String userId,
String guid,
Date asOfTime,
Integer offset,
Integer pageSize,
SequencingOrder sequencingOrder,
String sequencingProperty)
Get Category relationships
|
protected SubjectAreaOMASAPIResponse |
getResponse(SubjectAreaOMASAPIResponse response)
Take an entityDetail response and map it to the appropriate Term orientated response
|
SubjectAreaOMASAPIResponse |
restoreCategory(String userId,
String guid)
Restore a Category or a SubjectAreaDefinition
|
SubjectAreaOMASAPIResponse |
updateCategory(String userId,
String guid,
Category suppliedCategory,
boolean isReplace)
Update a Category
|
getRelationshipsFromGuid, validateGlossarySummaryDuringCreationpublic SubjectAreaCategoryHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, RepositoryHandler repositoryHandler, OMRSAPIHelper oMRSAPIHelper, RepositoryErrorHandler errorHandler)
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 servicesoMRSAPIHelper - omrs API helpererrorHandler - handler for repository service errorsprotected SubjectAreaOMASAPIResponse getResponse(SubjectAreaOMASAPIResponse response)
getResponse in class SubjectAreaHandlerresponse - entityDetailResponsepublic SubjectAreaOMASAPIResponse createCategory(SubjectAreaGlossaryHandler glossaryHandler, String userId, Category suppliedCategory)
Valid nodeTypes for this request are:
The qualifiedName can be specified and will be honoured. If it is specified then the caller may wish to ensure that it is unique. If this qualifiedName is not specified then one will be generated as GlossaryCategory concatinated with the the guid.
Failure to create the Categories classifications, link to its glossary or its icon, results in the create failing and the category being deleted
glossaryHandler - glossary handleruserId - unique identifier for requesting user, under which the request is performedsuppliedCategory - category to createpublic SubjectAreaOMASAPIResponse getCategory(String userId, String guid)
userId - unique identifier for requesting user, under which the request is performedguid - guid of the category to get. This could be a guid for a SubjectAreaDefintion, which is type of categoryprotected SubjectAreaOMASAPIResponse createCategoryResponse(Category gotCategory)
public SubjectAreaOMASAPIResponse findCategory(String userId, String searchCriteria, Date asOfTime, Integer offset, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty)
userId - unique identifier for requesting user, under which the request is performedsearchCriteria - String expression matching Category property values (this does not include the CategorySummary content). When not specified, all terms are returned.asOfTime - the relationships returned as they were at this time. null indicates at the current time.offset - the starting element number for this set of results. This is used when retrieving elements
beyond the first page of results. Zero means the results start from the first element.pageSize - the maximum number of elements that can be returned on this request.
0 means there is no limit to the page sizesequencingOrder - the sequencing order for the results.sequencingProperty - the name of the property that should be used to sequence the results.public SubjectAreaOMASAPIResponse getCategoryRelationships(String userId, String guid, Date asOfTime, Integer offset, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty)
userId - unique identifier for requesting user, under which the request is performedguid - guid of the term to getasOfTime - the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00.offset - the starting element number for this set of results. This is used when retrieving elements
beyond the first page of results. Zero means the results start from the first element.pageSize - the maximum number of elements that can be returned on this request.
0 means there is not limit to the page sizesequencingOrder - the sequencing order for the results.sequencingProperty - the name of the property that should be used to sequence the results.public SubjectAreaOMASAPIResponse updateCategory(String userId, String guid, Category suppliedCategory, boolean isReplace)
Status is not updated using this call.
userId - userId under which the request is performedguid - guid of the category to updatesuppliedCategory - category to be updatedisReplace - flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated.public SubjectAreaOMASAPIResponse deleteCategory(String userId, String guid, Boolean isPurge)
There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support is optional. Soft delete is the default.
A soft delete means that the category instance will exist in a deleted state in the repository after the delete operation. This means that it is possible to undo the delete. A hard delete means that the category will not exist after the operation. when not successful the following Exception responses can occur
userId - userId under which the request is performedguid - guid of the category to be deleted.isPurge - true indicates a hard delete, false is a soft delete.public SubjectAreaOMASAPIResponse restoreCategory(String userId, String guid)
Restore allows the deleted Category 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 category to restoreCopyright © 2018–2020 ODPi. All rights reserved.