@RestController
@RequestMapping(value="/servers/{serverName}/open-metadata/access-services/subject-area")
public class SubjectAreaCategoryRESTResource
extends SubjectAreaRESTServicesInstance
instanceHandler, oMRSAPIHelper| Constructor and Description |
|---|
SubjectAreaCategoryRESTResource()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
SubjectAreaOMASAPIResponse |
createCategory(String serverName,
String userId,
Category suppliedCategory)
Create a Category.
|
SubjectAreaOMASAPIResponse |
deleteCategory(String serverName,
String userId,
String guid,
Boolean isPurge)
Delete a Category or SubjectAreaDefinition instance
|
SubjectAreaOMASAPIResponse |
findTerm(String serverName,
String userId,
String searchCriteria,
Date asOfTime,
Integer offset,
Integer pageSize,
SequencingOrder sequencingOrder,
String sequencingProperty)
Find Category
|
SubjectAreaOMASAPIResponse |
getCategoryByGuid(String serverName,
String userId,
String guid)
Get a Category
|
SubjectAreaOMASAPIResponse |
getCategoryRelationships(String serverName,
String userId,
String guid,
Date asOfTime,
Integer offset,
Integer pageSize,
SequencingOrder sequencingOrder,
String sequencingProperty) |
SubjectAreaOMASAPIResponse |
restoreCategory(String serverName,
String userId,
String guid)
Restore a Category
Restore allows the deleted Category to be made active again.
|
SubjectAreaOMASAPIResponse |
updateCategory(String serverName,
String userId,
String guid,
Category suppliedCategory,
Boolean isReplace)
Update a Category
|
createLine, deleteLine, getLine, getRelationshipsFromGuid, initializeAPI, initializeAPI, restoreLine, setOMRSAPIHelper, updateLinepublic SubjectAreaCategoryRESTResource()
@RequestMapping(method=POST,
path="/users/{userId}/categories")
public SubjectAreaOMASAPIResponse createCategory(@PathVariable
String serverName,
@PathVariable
String userId,
@RequestBody
Category suppliedCategory)
Valid nodeTypes for this request are:
Failure to create the Categories classifications, link to its glossary or its icon, results in the create failing and the category being deleted
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedsuppliedCategory - category to create@RequestMapping(method=GET,
path="/users/{userId}/categories/{guid}")
public SubjectAreaOMASAPIResponse getCategoryByGuid(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String guid)
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedguid - guid of the category to get@RequestMapping(method=GET,
path="/users/{userId}/categories")
public SubjectAreaOMASAPIResponse findTerm(@PathVariable
String serverName,
@PathVariable
String userId,
@RequestParam(value="searchCriteria",required=false)
String searchCriteria,
@RequestParam(value="asOfTime",required=false)
Date asOfTime,
@RequestParam(value="offset",required=false)
Integer offset,
@RequestParam(value="pageSize",required=false)
Integer pageSize,
@RequestParam(value="sequencingOrder",required=false)
SequencingOrder sequencingOrder,
@RequestParam(value="SequencingProperty",required=false)
String sequencingProperty)
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedsearchCriteria - String expression matching Category property values (this does not include the GlossarySummary content).asOfTime - the categories 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.@RequestMapping(method=GET,
path="/users/{userId}/categories/{guid}/relationships")
public SubjectAreaOMASAPIResponse getCategoryRelationships(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String guid,
@RequestParam(value="asOfTime",required=false)
Date asOfTime,
@RequestParam(value="offset",required=false)
Integer offset,
@RequestParam(value="pageSize",required=false)
Integer pageSize,
@RequestParam(value="sequencingOrder",required=false)
SequencingOrder sequencingOrder,
@RequestParam(value="SequencingProperty",required=false)
String sequencingProperty)
@RequestMapping(method=PUT,
path="/users/{userId}/categories/{guid}")
public SubjectAreaOMASAPIResponse updateCategory(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String guid,
Category suppliedCategory,
@RequestParam(value="isReplace",required=false)
Boolean isReplace)
Status is not updated using this call.
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - 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.@RequestMapping(method=DELETE,
path="/users/{userId}/categories/{guid}")
public SubjectAreaOMASAPIResponse deleteCategory(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String guid,
@RequestParam(value="isPurge",required=false)
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
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - 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.@RequestMapping(method=POST,
path="/users/{userId}/categories/{guid}")
public SubjectAreaOMASAPIResponse restoreCategory(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String guid)
serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenantuserId - unique identifier for requesting user, under which the request is performedguid - guid of the category to restoreCopyright © 2018–2019 ODPi. All rights reserved.