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, @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 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) MetadataSourceRequestBody 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, @RequestParam(required=false,defaultValue="false") boolean cascadedDelete, @RequestBody(required=false) MetadataSourceRequestBody requestBody)
      Delete a subject area definition.
      Parameters:
      serverName - name of called server
      subjectAreaGUID - unique identifier of the element to delete
      cascadedDelete - 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 to
      startFrom - paging start point
      pageSize - maximum results that can be returned
      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 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 to
      startsWith - 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 point
      pageSize - maximum results that can be returned
      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 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 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)