Class LocationArenaResource
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLocation(String serverName, NewElementRequestBody requestBody) Create a location.createLocationFromTemplate(String serverName, TemplateRequestBody requestBody) Create a new metadata element to represent a location using an existing metadata element as a template.deleteLocation(String serverName, String locationGUID, DeleteElementRequestBody requestBody) Delete a location.detachKnownLocation(String serverName, String elementGUID, String locationGUID, DeleteRelationshipRequestBody requestBody) Detach an element from its location.detachNestedLocation(String serverName, String locationGUID, String nestedLocationGUID, DeleteRelationshipRequestBody requestBody) Detach a super location from a nested location.detachPeerLocations(String serverName, String locationOneGUID, String locationTwoGUID, DeleteRelationshipRequestBody requestBody) Detach a location from one of its peers.findLocations(String serverName, SearchStringRequestBody requestBody) Retrieve the list of location metadata elements that contain the search string.getLocationByGUID(String serverName, String locationGUID, GetRequestBody requestBody) Return the properties of a specific location.getLocationsByName(String serverName, FilterRequestBody requestBody) Returns the list of locations with a particular name.linkKnownLocation(String serverName, String elementGUID, String locationGUID, NewRelationshipRequestBody requestBody) Attach an element to its location.linkNestedLocation(String serverName, String locationGUID, String nestedLocationGUID, NewRelationshipRequestBody requestBody) Attach a super location to a nested location.linkPeerLocation(String serverName, String locationOneGUID, String locationTwoGUID, NewRelationshipRequestBody requestBody) Attach a location to one of its peers.updateLocation(String serverName, String locationGUID, UpdateElementRequestBody requestBody) Update the properties of a location.
-
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 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)
-
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 serverlocationOneGUID- unique identifier of the first locationlocationTwoGUID- unique identifier of the second locationrequestBody- 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 serverlocationOneGUID- unique identifier of the first locationlocationTwoGUID- unique identifier of the second locationrequestBody- 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 serverlocationGUID- unique identifier of the super locationnestedLocationGUID- unique identifier of the nested locationrequestBody- 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 serverlocationGUID- unique identifier of the super locationnestedLocationGUID- unique identifier of the nested locationrequestBody- 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 serverelementGUID- unique identifier of the elementlocationGUID- unique identifier of the locationrequestBody- 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 serverelementGUID- unique identifier of the elementlocationGUID- unique identifier of the locationrequestBody- 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 serverlocationGUID- 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.
-
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 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)
-
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 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)
-
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 tolocationGUID- 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)
-