Class LocationResource
java.lang.Object
org.odpi.openmetadata.accessservices.digitalarchitecture.server.spring.LocationResource
@RestController
@RequestMapping("/servers/{serverName}/open-metadata/access-services/digital-architecture/users/{userId}")
public class LocationResource
extends Object
LocationResource provides the API operations to create and maintain locations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseclearAdjacentLocation(String serverName, String userId, String locationOneGUID, String locationTwoGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove a peer-to-peer relationship between two locations.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseclearLocationAsDigital(String serverName, String userId, String locationGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove the digital/cyber location designation from the location.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseclearLocationAsFixedPhysical(String serverName, String userId, String locationGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove the fixed physical location designation from the location.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseclearLocationAsSecure(String serverName, String userId, String locationGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove the secure location designation from the location.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseclearNestedLocation(String serverName, String userId, String parentLocationGUID, String childLocationGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove a parent-child relationship between two locations.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateLocation(String serverName, String userId, org.odpi.openmetadata.accessservices.digitalarchitecture.properties.LocationProperties locationProperties) Create a new metadata element to represent a location.org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponsecreateLocationFromTemplate(String serverName, String userId, String templateGUID, org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateProperties templateProperties) Create a new metadata element to represent a location using an existing metadata element as a template.org.odpi.openmetadata.accessservices.digitalarchitecture.rest.LocationsResponsefindLocations(String serverName, String userId, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody requestBody) Retrieve the list of location metadata elements that contain the search string.org.odpi.openmetadata.accessservices.digitalarchitecture.rest.LocationResponsegetLocationByGUID(String serverName, String userId, String locationGUID) Retrieve the location metadata element with the supplied unique identifier.org.odpi.openmetadata.accessservices.digitalarchitecture.rest.LocationsResponsegetLocationsByName(String serverName, String userId, int startFrom, int pageSize, org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody requestBody) Retrieve the list of location metadata elements with a matching qualified or display name.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseremoveLocation(String serverName, String userId, String locationGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove the metadata element representing a location.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponsesetLocationAsDigital(String serverName, String userId, String locationGUID, org.odpi.openmetadata.accessservices.digitalarchitecture.rest.DigitalLocationRequestBody requestBody) Classify the location to indicate that it represents a digital/cyber location.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponsesetLocationAsFixedPhysical(String serverName, String userId, String locationGUID, org.odpi.openmetadata.accessservices.digitalarchitecture.rest.FixedLocationRequestBody requestBody) Classify the location to indicate that it represents a fixed physical location.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponsesetLocationAsSecure(String serverName, String userId, String locationGUID, org.odpi.openmetadata.accessservices.digitalarchitecture.rest.SecureLocationRequestBody requestBody) Classify the location to indicate that it represents a secure location.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponsesetupAdjacentLocation(String serverName, String userId, String locationOneGUID, String locationTwoGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Create a peer-to-peer relationship between two locations.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponsesetupNestedLocation(String serverName, String userId, String parentLocationGUID, String childLocationGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Create a parent-child relationship between two locations.org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponseupdateLocation(String serverName, String userId, String locationGUID, boolean isMergeUpdate, org.odpi.openmetadata.accessservices.digitalarchitecture.properties.LocationProperties locationProperties) Update the metadata element representing a location.
-
Constructor Details
-
LocationResource
public LocationResource()Default constructor
-
-
Method Details
-
createLocation
@PostMapping(path="/locations") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createLocation(@PathVariable String serverName, @PathVariable String userId, @RequestBody org.odpi.openmetadata.accessservices.digitalarchitecture.properties.LocationProperties locationProperties) Create a new metadata element to represent a location. Classifications can be added later to define the type of location.- Parameters:
serverName- name of calling serveruserId- calling userlocationProperties- properties to store- Returns:
- unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
createLocationFromTemplate
@PostMapping(path="/locations/from-template/{templateGUID}") public org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse createLocationFromTemplate(@PathVariable String serverName, @PathVariable String userId, @PathVariable String templateGUID, @RequestBody org.odpi.openmetadata.accessservices.digitalarchitecture.properties.TemplateProperties templateProperties) 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 location.- Parameters:
serverName- name of calling serveruserId- calling usertemplateGUID- unique identifier of the metadata element to copytemplateProperties- properties that override the template- Returns:
- unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
updateLocation
@PostMapping(path="/locations/{locationGUID}/update") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse updateLocation(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationGUID, @RequestParam boolean isMergeUpdate, @RequestBody org.odpi.openmetadata.accessservices.digitalarchitecture.properties.LocationProperties locationProperties) Update the metadata element representing a location.- Parameters:
serverName- name of calling serveruserId- calling userlocationGUID- unique identifier of the metadata element to updateisMergeUpdate- should the new properties be merged with existing properties (true) or completely replace them (false)?locationProperties- new properties for this element- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
setLocationAsFixedPhysical
@PostMapping(path="/locations/{locationGUID}/classify-as-fixed-location") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse setLocationAsFixedPhysical(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationGUID, @RequestBody org.odpi.openmetadata.accessservices.digitalarchitecture.rest.FixedLocationRequestBody requestBody) Classify the location to indicate that it represents a fixed physical location.- Parameters:
serverName- name of calling serveruserId- calling userlocationGUID- unique identifier of the metadata element to classifyrequestBody- properties of the location- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
clearLocationAsFixedPhysical
@PostMapping(path="/locations/{locationGUID}/classify-as-fixed-location/delete") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse clearLocationAsFixedPhysical(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove the fixed physical location designation from the location.- Parameters:
serverName- name of calling serveruserId- calling userlocationGUID- unique identifier of the metadata element to unclassifyrequestBody- null request body- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
setLocationAsSecure
@PostMapping(path="/locations/{locationGUID}/classify-as-secure-location") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse setLocationAsSecure(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationGUID, @RequestBody org.odpi.openmetadata.accessservices.digitalarchitecture.rest.SecureLocationRequestBody requestBody) Classify the location to indicate that it represents a secure location.- Parameters:
serverName- name of calling serveruserId- calling userlocationGUID- unique identifier of the metadata element to classifyrequestBody- properties of the location- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
clearLocationAsSecure
@PostMapping(path="/locations/{locationGUID}/classify-as-secure-location/delete") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse clearLocationAsSecure(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove the secure location designation from the location.- Parameters:
serverName- name of calling serveruserId- calling userlocationGUID- unique identifier of the metadata element to unclassifyrequestBody- null request body- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
setLocationAsDigital
@PostMapping(path="/locations/{locationGUID}/classify-as-digital-location") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse setLocationAsDigital(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationGUID, @RequestBody org.odpi.openmetadata.accessservices.digitalarchitecture.rest.DigitalLocationRequestBody requestBody) Classify the location to indicate that it represents a digital/cyber location.- Parameters:
serverName- name of calling serveruserId- calling userlocationGUID- unique identifier of the metadata element to classifyrequestBody- position of the location- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
clearLocationAsDigital
@PostMapping(path="/locations/{locationGUID}/classify-as-digital-location/delete") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse clearLocationAsDigital(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove the digital/cyber location designation from the location.- Parameters:
serverName- name of calling serveruserId- calling userlocationGUID- unique identifier of the metadata element to unclassifyrequestBody- null request body- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
removeLocation
@PostMapping(path="/locations/{locationGUID}/delete") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse removeLocation(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove the metadata element representing a location.- Parameters:
serverName- name of calling serveruserId- calling userlocationGUID- unique identifier of the metadata element to removerequestBody- null request body- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
setupNestedLocation
@PostMapping(path="/locations/{parentLocationGUID}/has-nested-location/{childLocationGUID}") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse setupNestedLocation(@PathVariable String serverName, @PathVariable String userId, @PathVariable String parentLocationGUID, @PathVariable String childLocationGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Create a parent-child relationship between two locations.- Parameters:
serverName- name of calling serveruserId- calling userparentLocationGUID- unique identifier of the location that is the broader locationchildLocationGUID- unique identifier of the location that is the smaller, nested locationrequestBody- null request body- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
clearNestedLocation
@PostMapping(path="/locations/{parentLocationGUID}/has-nested-location/{childLocationGUID}/delete") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse clearNestedLocation(@PathVariable String serverName, @PathVariable String userId, @PathVariable String parentLocationGUID, @PathVariable String childLocationGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove a parent-child relationship between two locations.- Parameters:
serverName- name of calling serveruserId- calling userparentLocationGUID- unique identifier of the location that is the broader locationchildLocationGUID- unique identifier of the location that is the smaller, nested locationrequestBody- null request body- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
setupAdjacentLocation
@PostMapping(path="/locations/{locationOneGUID}/linked-to-peer-location/{locationTwoGUID}") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse setupAdjacentLocation(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationOneGUID, @PathVariable String locationTwoGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Create a peer-to-peer relationship between two locations.- Parameters:
serverName- name of calling serveruserId- calling userlocationOneGUID- unique identifier of the first locationlocationTwoGUID- unique identifier of the second locationrequestBody- null request body- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
clearAdjacentLocation
@PostMapping(path="/locations/{locationOneGUID}/linked-to-peer-location/{locationTwoGUID}/delete") public org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse clearAdjacentLocation(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationOneGUID, @PathVariable String locationTwoGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody requestBody) Remove a peer-to-peer relationship between two locations.- Parameters:
serverName- name of calling serveruserId- calling userlocationOneGUID- unique identifier of the first locationlocationTwoGUID- unique identifier of the second locationrequestBody- null request body- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
findLocations
@PostMapping(path="/locations/by-search-string") public org.odpi.openmetadata.accessservices.digitalarchitecture.rest.LocationsResponse findLocations(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestBody org.odpi.openmetadata.commonservices.ffdc.rest.SearchStringRequestBody requestBody) Retrieve the list of location metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
serverName- name of calling serveruserId- calling userrequestBody- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
getLocationsByName
@PostMapping(path="/locations/by-name") public org.odpi.openmetadata.accessservices.digitalarchitecture.rest.LocationsResponse getLocationsByName(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestBody org.odpi.openmetadata.commonservices.ffdc.rest.NameRequestBody requestBody) Retrieve the list of location metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
serverName- name of calling serveruserId- calling userrequestBody- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-
getLocationByGUID
@GetMapping(path="/locations/{locationGUID}") public org.odpi.openmetadata.accessservices.digitalarchitecture.rest.LocationResponse getLocationByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String locationGUID) Retrieve the location metadata element with the supplied unique identifier.- Parameters:
serverName- name of calling serveruserId- calling userlocationGUID- unique identifier of the requested metadata element- Returns:
- matching metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
-