java.lang.Object
org.odpi.openmetadata.viewservices.locationarena.server.spring.LocationArenaResource

@RestController @RequestMapping("/servers/{serverName}/api/open-metadata/location-arena") public class LocationArenaResource extends Object
The LocationArenaResource provides part of the server-side implementation of the Location Arena OMVS. =
  • Constructor Details

    • LocationArenaResource

      public LocationArenaResource()
      Default constructor
  • Method Details

    • createLocation

      @PostMapping(path="/locations") public GUIDResponse createLocation(@PathVariable String serverName, @RequestBody(required=false) NewElementRequestBody requestBody)
      Create a location.
      Parameters:
      serverName - name of called server.
      requestBody - properties for the location.
      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.
    • createLocationFromTemplate

      @PostMapping(path="/locations/from-template") public GUIDResponse createLocationFromTemplate(@PathVariable String serverName, @RequestBody(required=false) TemplateRequestBody requestBody)
      Create a new metadata element to represent a location 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)
    • updateLocation

      @PostMapping(path="/locations/{locationGUID}/update") public VoidResponse updateLocation(@PathVariable String serverName, @PathVariable String locationGUID, @RequestBody(required=false) UpdateElementRequestBody requestBody)
      Update the properties of a location.
      Parameters:
      serverName - name of called server.
      locationGUID - unique identifier of the location (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.
    • linkPeerLocation

      @PostMapping(path="/locations/{locationOneGUID}/adjacent-locations/{locationTwoGUID}/attach") public VoidResponse linkPeerLocation(@PathVariable String serverName, @PathVariable String locationOneGUID, @PathVariable String locationTwoGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody)
      Attach a location to one of its peers.
      Parameters:
      serverName - name of called server
      locationOneGUID - unique identifier of the first location
      locationTwoGUID - unique identifier of the second location
      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.
    • detachPeerLocations

      @PostMapping(path="/locations/{locationOneGUID}/adjacent-locations/{locationTwoGUID}/detach") public VoidResponse detachPeerLocations(@PathVariable String serverName, @PathVariable String locationOneGUID, @PathVariable String locationTwoGUID, @RequestBody(required=false) DeleteRelationshipRequestBody requestBody)
      Detach a location from one of its peers.
      Parameters:
      serverName - name of called server
      locationOneGUID - unique identifier of the first location
      locationTwoGUID - unique identifier of the second location
      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.
    • linkNestedLocation

      @PostMapping(path="/locations/{locationGUID}/nested-locations/{nestedLocationGUID}/attach") public VoidResponse linkNestedLocation(@PathVariable String serverName, @PathVariable String locationGUID, @PathVariable String nestedLocationGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody)
      Attach a super location to a nested location.
      Parameters:
      serverName - name of called server
      locationGUID - unique identifier of the super location
      nestedLocationGUID - unique identifier of the nested location
      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.
    • detachNestedLocation

      @PostMapping(path="/locations/{locationGUID}/nested-locations/{nestedLocationGUID}/detach") public VoidResponse detachNestedLocation(@PathVariable String serverName, @PathVariable String locationGUID, @PathVariable String nestedLocationGUID, @RequestBody(required=false) DeleteRelationshipRequestBody requestBody)
      Detach a super location from a nested location.
      Parameters:
      serverName - name of called server
      locationGUID - unique identifier of the super location
      nestedLocationGUID - unique identifier of the nested location
      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.
    • linkKnownLocation

      @PostMapping(path="/elements/{elementGUID}/known-locations/{locationGUID}/attach") public VoidResponse linkKnownLocation(@PathVariable String serverName, @PathVariable String elementGUID, @PathVariable String locationGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody)
      Attach an element to its location.
      Parameters:
      serverName - name of called server
      elementGUID - unique identifier of the element
      locationGUID - unique identifier of the location
      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.
    • detachKnownLocation

      @PostMapping(path="/elements/{elementGUID}/known-locations/{locationGUID}/detach") public VoidResponse detachKnownLocation(@PathVariable String serverName, @PathVariable String elementGUID, @PathVariable String locationGUID, @RequestBody(required=false) DeleteRelationshipRequestBody requestBody)
      Detach an element from its location.
      Parameters:
      serverName - name of called server
      elementGUID - unique identifier of the element
      locationGUID - unique identifier of the location
      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.
    • deleteLocation

      @PostMapping(path="/locations/{locationGUID}/delete") public VoidResponse deleteLocation(@PathVariable String serverName, @PathVariable String locationGUID, @RequestBody(required=false) DeleteElementRequestBody requestBody)
      Delete a location.
      Parameters:
      serverName - name of called server
      locationGUID - 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.
    • getLocationsByName

      @PostMapping(path="/locations/by-name") public OpenMetadataRootElementsResponse getLocationsByName(@PathVariable String serverName, @RequestBody(required=false) FilterRequestBody requestBody)
      Returns the list of locations 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)
    • findLocations

      @PostMapping(path="/locations/by-search-string") public OpenMetadataRootElementsResponse findLocations(@PathVariable String serverName, @RequestBody(required=false) SearchStringRequestBody requestBody)
      Retrieve the list of location 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)
    • getLocationByGUID

      @PostMapping(path="/locations/{locationGUID}/retrieve") public OpenMetadataRootElementResponse getLocationByGUID(@PathVariable String serverName, @PathVariable String locationGUID, @RequestBody(required=false) GetRequestBody requestBody)
      Return the properties of a specific location.
      Parameters:
      serverName - name of the service to route the request to
      locationGUID - 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)