Class GlossaryAuthorViewCategoryRESTServices
- java.lang.Object
-
- org.odpi.openmetadata.viewservices.glossaryauthor.services.BaseGlossaryAuthorView
-
- org.odpi.openmetadata.viewservices.glossaryauthor.services.GlossaryAuthorViewCategoryRESTServices
-
public class GlossaryAuthorViewCategoryRESTServices extends BaseGlossaryAuthorView
The GlossaryAuthorViewCategoryRESTServices provides the org.odpi.openmetadata.viewservices.glossaryauthor.services implementation of the Glossary Author Open Metadata View Service (OMVS). This interface provides view category authoring interfaces for subject area experts to author categories.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.viewservices.glossaryauthor.services.BaseGlossaryAuthorView
instanceHandler, invalidParameterHandler, restCallLogger
-
-
Constructor Summary
Constructors Constructor Description GlossaryAuthorViewCategoryRESTServices()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubjectAreaOMASAPIResponse<Category>createCategory(String serverName, String userId, Category suppliedCategory)Create a CategorySubjectAreaOMASAPIResponse<Category>deleteCategory(String serverName, String userId, String guid, boolean isPurge)Delete a Category instanceSubjectAreaOMASAPIResponse<Category>findCategory(String serverName, String userId, Date asOfTime, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty)Find CategorySubjectAreaOMASAPIResponse<Term>getCategorizedTerms(String serverName, String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize)Get the terms that are categorized by this CategorySubjectAreaOMASAPIResponse<Category>getCategory(String serverName, String userId, String guid)Get a category.SubjectAreaOMASAPIResponse<Category>getCategoryChildren(String serverName, String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize)Get this Category's child Categories.SubjectAreaOMASAPIResponse<Relationship>getCategoryRelationships(String serverName, String userId, String guid, Date asOfTime, Integer startingFrom, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty)Get Category relationshipsSubjectAreaOMASAPIResponse<Category>restoreCategory(String serverName, String userId, String guid)Restore a CategorySubjectAreaOMASAPIResponse<Category>updateCategory(String serverName, String userId, String guid, Category category, boolean isReplace)Update a Category-
Methods inherited from class org.odpi.openmetadata.viewservices.glossaryauthor.services.BaseGlossaryAuthorView
getFindRequest, getResponseForException
-
-
-
-
Method Detail
-
createCategory
public SubjectAreaOMASAPIResponse<Category> createCategory(String serverName, String userId, Category suppliedCategory)
Create a Category- Parameters:
serverName- name of the local view server.userId- userId under which the request is performedsuppliedCategory- Category to create- Returns:
- the created category.
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
getCategory
public SubjectAreaOMASAPIResponse<Category> getCategory(String serverName, String userId, String guid)
Get a category.- Parameters:
serverName- name of the local view server.userId- user identifierguid- guid of the category to get- Returns:
- response which when successful contains the category with the requested guid
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
findCategory
public SubjectAreaOMASAPIResponse<Category> findCategory(String serverName, String userId, Date asOfTime, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty)
Find Category- Parameters:
serverName- name of the local view server.userId- user identifiersearchCriteria- String expression matching Category property values.exactValue- a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned.ignoreCase- a boolean, which when set means that case will be ignored, if not set that case will be respectedasOfTime- the glossaries returned as they were at this time. null indicates at the current time.startingFrom- 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.sequencingOrder- the sequencing order for the results.sequencingProperty- the name of the property that should be used to sequence the results.- Returns:
- A list of glossaries meeting the search Criteria
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
getCategoryRelationships
public SubjectAreaOMASAPIResponse<Relationship> getCategoryRelationships(String serverName, String userId, String guid, Date asOfTime, Integer startingFrom, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty)
Get Category relationships- Parameters:
serverName- name of the local view server.userId- user identifierguid- guid of the category 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.startingFrom- 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.sequencingOrder- the sequencing order for the results.sequencingProperty- the name of the property that should be used to sequence the results.- Returns:
- a response which when successful contains the category relationships
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
updateCategory
public SubjectAreaOMASAPIResponse<Category> updateCategory(String serverName, String userId, String guid, Category category, boolean isReplace)
Update a CategoryStatus is not updated using this call.
- Parameters:
serverName- name of the local view server.userId- user identifierguid- guid of the category to updatecategory- category to updateisReplace- flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated.- Returns:
- a response which when successful contains the updated category
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
deleteCategory
public SubjectAreaOMASAPIResponse<Category> deleteCategory(String serverName, String userId, String guid, boolean isPurge)
Delete a Category instanceThe deletion of a category is only allowed if there is no category content (i.e. no categories or categories).
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 Exceptions can occur
- Parameters:
serverName- name of the local view server.userId- user identifierguid- guid of the category to be deleted.isPurge- true indicates a hard delete, false is a soft delete.- Returns:
- a void response
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
restoreCategory
public SubjectAreaOMASAPIResponse<Category> restoreCategory(String serverName, String userId, String guid)
Restore a CategoryRestore 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.
- Parameters:
serverName- name of the local view server.userId- user identifierguid- guid of the category to restore- Returns:
- response which when successful contains the restored category
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
getCategoryChildren
public SubjectAreaOMASAPIResponse<Category> getCategoryChildren(String serverName, String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize)
Get this Category's child Categories. The server has a maximum page size defined, the number of Categories returned is limited by that maximum page size.- Parameters:
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 parent categorysearchCriteria- String expression matching child Category property values.exactValue- a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned.ignoreCase- a boolean, which when set means that case will be ignored, if not set that case will be respectedstartingFrom- the starting element number for this set of results. This is used when retrieving elementspageSize- the maximum number of elements that can be returned on this request.- Returns:
- A list of child categories filtered by the search criteria if one is supplied.
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
getCategorizedTerms
public SubjectAreaOMASAPIResponse<Term> getCategorizedTerms(String serverName, String userId, String guid, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize)
Get the terms that are categorized by this Category- Parameters:
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 termssearchCriteria- String expression to match the categorized Term property values.exactValue- a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned.ignoreCase- a boolean, which when set means that case will be ignored, if not set that case will be respectedstartingFrom- the starting element number for this set of results. This is used when retrieving elementspageSize- the maximum number of elements that can be returned on this request.- Returns:
- A list of terms is categorized by this Category
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
-