Class SubjectAreaResource
java.lang.Object
org.odpi.openmetadata.viewservices.subjectarea.server.spring.SubjectAreaResource
@RestController
@RequestMapping("/servers/{serverName}/api/open-metadata/subject-area")
public class SubjectAreaResource
extends Object
The SubjectAreaResource provides part of the server-side implementation of the Subject Area OMVS.
=
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSubjectArea
(String serverName, NewElementRequestBody requestBody) Create a subject area definition.createSubjectAreaFromTemplate
(String serverName, TemplateRequestBody requestBody) Create a new metadata element to represent a subject area definition using an existing metadata element as a template.deleteSubjectArea
(String serverName, String subjectAreaGUID, boolean cascadedDelete, MetadataSourceRequestBody requestBody) Delete a subject area definition.detachSubjectAreas
(String serverName, String parentSubjectAreaGUID, String memberDataFieldGUID, MetadataSourceRequestBody requestBody) Detach a data field from a subject area definition.findSubjectAreas
(String serverName, int startFrom, int pageSize, boolean startsWith, boolean endsWith, boolean ignoreCase, FilterRequestBody requestBody) Retrieve the list of subject area definition metadata elements that contain the search string.getSubjectAreaByGUID
(String serverName, String subjectAreaGUID, AnyTimeRequestBody requestBody) Return the properties of a specific subject area definition.getSubjectAreasByName
(String serverName, int startFrom, int pageSize, FilterRequestBody requestBody) Returns the list of subject area definitions with a particular name.linkSubjectAreas
(String serverName, String subjectAreaGUID, String nestedSubjectAreaGUID, RelationshipRequestBody requestBody) Attach a nested subject area to a broader subject area definition.updateSubjectArea
(String serverName, String subjectAreaGUID, boolean replaceAllProperties, UpdateElementRequestBody requestBody) Update the properties of a subject area definition.
-
Constructor Details
-
SubjectAreaResource
public SubjectAreaResource()Default constructor
-
-
Method Details
-
createSubjectArea
@PostMapping(path="/subject-areas") public GUIDResponse createSubjectArea(@PathVariable String serverName, @RequestBody(required=false) NewElementRequestBody requestBody) Create a subject area definition.- Parameters:
serverName
- name of called server.requestBody
- properties for the subject area definition.- Returns:
- unique identifier of the newly created element InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
createSubjectAreaFromTemplate
@PostMapping(path="/subject-areas/from-template") public GUIDResponse createSubjectAreaFromTemplate(@PathVariable String serverName, @RequestBody(required=false) TemplateRequestBody requestBody) Create a new metadata element to represent a subject area definition using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new element.- Parameters:
serverName
- calling userrequestBody
- properties that override the template- Returns:
- unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
updateSubjectArea
@PostMapping(path="/subject-areas/{subjectAreaGUID}/update") public VoidResponse updateSubjectArea(@PathVariable String serverName, @PathVariable String subjectAreaGUID, @RequestParam(required=false,defaultValue="false") boolean replaceAllProperties, @RequestBody(required=false) UpdateElementRequestBody requestBody) Update the properties of a subject area definition.- Parameters:
serverName
- name of called server.subjectAreaGUID
- unique identifier of the subject area definition (returned from create)replaceAllProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.requestBody
- properties for the new element.- Returns:
- void or InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkSubjectAreas
@PostMapping(path="/subject-areas/{subjectAreaGUID}/subject-area-hierarchies/{nestedSubjectAreaGUID}/attach") public VoidResponse linkSubjectAreas(@PathVariable String serverName, @PathVariable String subjectAreaGUID, @PathVariable String nestedSubjectAreaGUID, @RequestBody(required=false) RelationshipRequestBody requestBody) Attach a nested subject area to a broader subject area definition.- Parameters:
serverName
- name of called serversubjectAreaGUID
- unique identifier of the first subject area definitionnestedSubjectAreaGUID
- unique identifier of the second subject area definitionrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachSubjectAreas
@PostMapping(path="/subject-areas/{parentSubjectAreaGUID}/subject-area-hierarchies/{memberDataFieldGUID}/detach") public VoidResponse detachSubjectAreas(@PathVariable String serverName, @PathVariable String parentSubjectAreaGUID, @PathVariable String memberDataFieldGUID, @RequestBody(required=false) MetadataSourceRequestBody requestBody) Detach a data field from a subject area definition.- Parameters:
serverName
- name of called serverparentSubjectAreaGUID
- unique identifier of the first subject area definitionmemberDataFieldGUID
- unique identifier of the second subject area definitionrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
deleteSubjectArea
@PostMapping(path="/subject-areas/{subjectAreaGUID}/delete") public VoidResponse deleteSubjectArea(@PathVariable String serverName, @PathVariable String subjectAreaGUID, @RequestParam(required=false,defaultValue="false") boolean cascadedDelete, @RequestBody(required=false) MetadataSourceRequestBody requestBody) Delete a subject area definition.- Parameters:
serverName
- name of called serversubjectAreaGUID
- unique identifier of the element to deletecascadedDelete
- can subject area definitions be deleted if data fields are attached?requestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getSubjectAreasByName
@PostMapping(path="/subject-areas/by-name") public SubjectAreasResponse getSubjectAreasByName(@PathVariable String serverName, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) FilterRequestBody requestBody) Returns the list of subject area definitions with a particular name.- Parameters:
serverName
- name of the service to route the request tostartFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
findSubjectAreas
@PostMapping(path="/subject-areas/by-search-string") public SubjectAreasResponse findSubjectAreas(@PathVariable String serverName, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestParam(required=false,defaultValue="false") boolean startsWith, @RequestParam(required=false,defaultValue="false") boolean endsWith, @RequestParam(required=false,defaultValue="false") boolean ignoreCase, @RequestBody(required=false) FilterRequestBody requestBody) Retrieve the list of subject area definition metadata elements that contain the search string.- Parameters:
serverName
- name of the service to route the request tostartsWith
- does the value start with the supplied string?endsWith
- does the value end with the supplied string?ignoreCase
- should the search ignore case?startFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getSubjectAreaByGUID
@PostMapping(path="/subject-areas/{subjectAreaGUID}/retrieve") public SubjectAreaResponse getSubjectAreaByGUID(@PathVariable String serverName, @PathVariable String subjectAreaGUID, @RequestBody(required=false) AnyTimeRequestBody requestBody) Return the properties of a specific subject area definition.- Parameters:
serverName
- name of the service to route the request tosubjectAreaGUID
- unique identifier of the required elementrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-