Class LocationArenaRESTServices
java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.viewservices.locationarena.server.LocationArenaRESTServices
The LocationArenaRESTServices provides the server-side implementation of the Location Arena Open Metadata
View Service (OMVS). This interface provides access to a person's profile, roles and network.
-
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, DeleteRequestBody requestBody) Delete a location.detachKnownLocation
(String serverName, String elementGUID, String locationGUID, DeleteRequestBody requestBody) Detach an element from its location.detachNestedLocation
(String serverName, String locationGUID, String nestedLocationGUID, DeleteRequestBody requestBody) Detach a super location from a nested location.detachPeerLocations
(String serverName, String locationOneGUID, String locationTwoGUID, DeleteRequestBody 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) Retrieve the list of location metadata elements that contain the search string.getLocationsByName
(String serverName, FilterRequestBody requestBody) Retrieve the list of location metadata elements that contain the search string.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.Methods inherited from class org.odpi.openmetadata.tokencontroller.TokenController
getUser
-
Constructor Details
-
LocationArenaRESTServices
public LocationArenaRESTServices()Default constructor
-
-
Method Details
-
createLocation
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
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
public VoidResponse updateLocation(String serverName, String locationGUID, 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
public VoidResponse linkPeerLocation(String serverName, String locationOneGUID, String locationTwoGUID, 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
public VoidResponse detachPeerLocations(String serverName, String locationOneGUID, String locationTwoGUID, DeleteRequestBody 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
public VoidResponse linkNestedLocation(String serverName, String locationGUID, String nestedLocationGUID, 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
public VoidResponse detachNestedLocation(String serverName, String locationGUID, String nestedLocationGUID, DeleteRequestBody 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
public VoidResponse linkKnownLocation(String serverName, String elementGUID, String locationGUID, NewRelationshipRequestBody requestBody) Attach an element to its location.- Parameters:
serverName
- name of called serverelementGUID
- unique identifier of the assetlocationGUID
- 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
public VoidResponse detachKnownLocation(String serverName, String elementGUID, String locationGUID, DeleteRequestBody 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
public VoidResponse deleteLocation(String serverName, String locationGUID, DeleteRequestBody 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
public OpenMetadataRootElementsResponse getLocationsByName(String serverName, FilterRequestBody 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
public OpenMetadataRootElementResponse getLocationByGUID(String serverName, String locationGUID, GetRequestBody requestBody) Retrieve the list of location metadata elements that contain the search string.- 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)
-
findLocations
public OpenMetadataRootElementsResponse findLocations(String serverName, 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)
-