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, DeleteRequestBody requestBody) Delete a subject area definition.detachSubjectAreas
(String serverName, String parentSubjectAreaGUID, String memberDataFieldGUID, DeleteRequestBody requestBody) Detach a data field from a subject area definition.findSubjectAreas
(String serverName, SearchStringRequestBody requestBody) Retrieve the list of subject area definition metadata elements that contain the search string.getSubjectAreaByGUID
(String serverName, String subjectAreaGUID, GetRequestBody requestBody) Return the properties of a specific subject area definition.getSubjectAreasByName
(String serverName, FilterRequestBody requestBody) Returns the list of subject area definitions with a particular name.linkSubjectAreas
(String serverName, String subjectAreaGUID, String nestedSubjectAreaGUID, NewRelationshipRequestBody requestBody) Attach a nested subject area to a broader subject area definition.updateSubjectArea
(String serverName, String subjectAreaGUID, 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, @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)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) NewRelationshipRequestBody 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) DeleteRequestBody 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, @RequestBody(required=false) DeleteRequestBody requestBody) Delete a subject area definition.- Parameters:
serverName
- name of called serversubjectAreaGUID
- unique identifier of the element to deleterequestBody
- 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 OpenMetadataRootElementsResponse getSubjectAreasByName(@PathVariable String serverName, @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 torequestBody
- 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 OpenMetadataRootElementsResponse findSubjectAreas(@PathVariable String serverName, @RequestBody(required=false) SearchStringRequestBody 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 torequestBody
- 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 OpenMetadataRootElementResponse getSubjectAreaByGUID(@PathVariable String serverName, @PathVariable String subjectAreaGUID, @RequestBody(required=false) GetRequestBody 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)
-