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 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 user
      requestBody - 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 server
      subjectAreaGUID - unique identifier of the first subject area definition
      nestedSubjectAreaGUID - unique identifier of the second subject area definition
      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.
    • 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 server
      parentSubjectAreaGUID - unique identifier of the first subject area definition
      memberDataFieldGUID - unique identifier of the second subject area definition
      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.
    • 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 server
      subjectAreaGUID - unique identifier of the element to delete
      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 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 to
      requestBody - 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 to
      requestBody - 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 to
      subjectAreaGUID - unique identifier of the required element
      requestBody - 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)