public class SubjectAreaCategoryHandler extends SubjectAreaHandler
CATEGORY_ANCHOR_RELATIONSHIP_NAME, CATEGORY_HIERARCHY_LINK_RELATIONSHIP_NAME, CATEGORY_TYPE_NAME, GLOSSARY_TYPE_NAME, mappersFactory, oMRSAPIHelper, PROJECT_SCOPE_RELATIONSHIP_NAME, PROJECT_TYPE_NAME, TERM_ANCHOR_RELATIONSHIP_NAME, TERM_TYPE_NAME| Constructor and Description |
|---|
SubjectAreaCategoryHandler(OMRSAPIHelper oMRSAPIHelper)
Construct the Subject Area Category Handler
needed to operate within a single server instance.
|
| Modifier and Type | Method and Description |
|---|---|
SubjectAreaOMASAPIResponse<Category> |
createCategory(String userId,
Category suppliedCategory)
Create a Category.
|
SubjectAreaOMASAPIResponse<Category> |
deleteCategory(String userId,
String guid,
Boolean isPurge)
Delete a Category or SubjectAreaDefinition instance
|
SubjectAreaOMASAPIResponse<Category> |
findCategory(String userId,
FindRequest findRequest)
Find Category
|
SubjectAreaOMASAPIResponse<Category> |
getCategoryByGuid(String userId,
String guid)
Get a Category
|
SubjectAreaOMASAPIResponse<Line> |
getCategoryRelationships(String userId,
String guid,
FindRequest findRequest)
Get Category relationships
|
SubjectAreaOMASAPIResponse<Category> |
restoreCategory(String userId,
String guid)
Restore a Category or a SubjectAreaDefinition
|
SubjectAreaOMASAPIResponse<Category> |
updateCategory(String userId,
String guid,
Category suppliedCategory,
boolean isReplace)
Update a Category
|
convertOmrsToOmas, findEntities, getAllLineForEntity, getAllRelationshipsForEntity, getLinesFromRelationships, getNodesFromEntityDetails, validateGlossarySummaryDuringCreationpublic SubjectAreaCategoryHandler(OMRSAPIHelper oMRSAPIHelper)
oMRSAPIHelper - omrs API helperpublic SubjectAreaOMASAPIResponse<Category> createCategory(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
userId - unique identifier for requesting user, under which the request is performedsuppliedCategory - category to createpublic SubjectAreaOMASAPIResponse<Category> getCategoryByGuid(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 SubjectAreaDefinition, which is a type of categorypublic SubjectAreaOMASAPIResponse<Category> findCategory(String userId, FindRequest findRequest)
userId - unique identifier for requesting user, under which the request is performedfindRequest - FindRequestpublic SubjectAreaOMASAPIResponse<Line> getCategoryRelationships(String userId, String guid, FindRequest findRequest)
userId - unique identifier for requesting user, under which the request is performedguid - guidfindRequest - FindRequestpublic SubjectAreaOMASAPIResponse<Category> 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<Category> 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<Category> 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.