Class GovernanceZonesResource
java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.server.spring.GovernanceZonesResource
@RestController
@RequestMapping("/servers/{serverName}/open-metadata/access-services/governance-program/users/{userId}")
public class GovernanceZonesResource
extends Object
The GovernanceZonesResource provides a Spring based server-side REST API
that supports the GovernanceZonesInterface. It delegates each request to the
GovernanceZoneRESTServices.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateGovernanceZone
(String serverName, String userId, ReferenceableRequestBody requestBody) Create a definition of a governance zone.deleteGovernanceZone
(String serverName, String userId, String zoneGUID, ExternalSourceRequestBody requestBody) Remove the definition of a zone.getGovernanceZoneByGUID
(String serverName, String userId, String zoneGUID) Return information about a specific governance zone.getGovernanceZoneByName
(String serverName, String userId, String qualifiedName) Return information about a specific governance zone.getGovernanceZoneDefinitionByGUID
(String serverName, String userId, String zoneGUID) Return information about a specific governance zone and its linked governance definitions.getGovernanceZonesForDomain
(String serverName, String userId, int domainIdentifier, int startFrom, int pageSize) Return information about the defined governance zones.linkZonesInHierarchy
(String serverName, String userId, String parentZoneGUID, String childZoneGUID, RelationshipRequestBody requestBody) Link two related governance zones together as part of a hierarchy.linkZoneToGovernanceDefinition
(String serverName, String userId, String zoneGUID, String definitionGUID, RelationshipRequestBody requestBody) Link a governance zone to a governance definition that controls how the assets in the zone should be governed.unlinkZoneFromGovernanceDefinition
(String serverName, String userId, String zoneGUID, String definitionGUID, RelationshipRequestBody requestBody) Remove the link between a zone and a governance definition.unlinkZonesInHierarchy
(String serverName, String userId, String parentZoneGUID, String childZoneGUID, RelationshipRequestBody requestBody) Remove the link between two zones in the zone hierarchy.updateGovernanceZone
(String serverName, String userId, String zoneGUID, boolean isMergeUpdate, ReferenceableRequestBody requestBody) Update the definition of a zone.
-
Constructor Details
-
GovernanceZonesResource
public GovernanceZonesResource()Default constructor
-
-
Method Details
-
createGovernanceZone
@PostMapping(path="/governance-zones") public GUIDResponse createGovernanceZone(@PathVariable String serverName, @PathVariable String userId, @RequestBody ReferenceableRequestBody requestBody) Create a definition of a governance zone. The qualified name of these governance zones can be added to the supportedZones and defaultZones properties of an OMAS to control which assets are processed and how they are set up. In addition, the qualified names of zones can be added to Asset definitions to indicate which zone(s) they belong to.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userrequestBody
- other properties for a governance zone- Returns:
- unique identifier of the new zone or InvalidParameterException full path or userId is null or PropertyServerException problem accessing property server or UserNotAuthorizedException security access problem
-
updateGovernanceZone
@PostMapping(path="/governance-zones/{zoneGUID}") public VoidResponse updateGovernanceZone(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID, @RequestParam boolean isMergeUpdate, @RequestBody ReferenceableRequestBody requestBody) Update the definition of a zone.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userzoneGUID
- unique identifier of zoneisMergeUpdate
- are unspecified properties unchanged (true) or replaced with null?requestBody
- properties to change- Returns:
- void or InvalidParameterException guid, qualifiedName or userId is null; qualifiedName is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
deleteGovernanceZone
@PostMapping(path="/governance-zones/{zoneGUID}/delete") public VoidResponse deleteGovernanceZone(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID, @RequestBody(required=false) ExternalSourceRequestBody requestBody) Remove the definition of a zone.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userzoneGUID
- unique identifier of zonerequestBody
- external source requestBody- Returns:
- void or InvalidParameterException guid or userId is null; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
linkZonesInHierarchy
@PostMapping(path="/governance-zones/{parentZoneGUID}/nested-zone/{childZoneGUID}/link") public VoidResponse linkZonesInHierarchy(@PathVariable String serverName, @PathVariable String userId, @PathVariable String parentZoneGUID, @PathVariable String childZoneGUID, @RequestBody(required=false) RelationshipRequestBody requestBody) Link two related governance zones together as part of a hierarchy. A zone can only have one parent but many child zones.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userparentZoneGUID
- unique identifier of the parent zonechildZoneGUID
- unique identifier of the child zonerequestBody
- relationship requestBody- Returns:
- void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
unlinkZonesInHierarchy
@PostMapping(path="/governance-zones/{parentZoneGUID}/nested-zone/{childZoneGUID}/unlink") public VoidResponse unlinkZonesInHierarchy(@PathVariable String serverName, @PathVariable String userId, @PathVariable String parentZoneGUID, @PathVariable String childZoneGUID, @RequestBody(required=false) RelationshipRequestBody requestBody) Remove the link between two zones in the zone hierarchy.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userparentZoneGUID
- unique identifier of the parent zonechildZoneGUID
- unique identifier of the child zonerequestBody
- relationship requestBody- Returns:
- void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
linkZoneToGovernanceDefinition
@PostMapping(path="/governance-zones/{zoneGUID}/governed-by/{definitionGUID}/link") public VoidResponse linkZoneToGovernanceDefinition(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID, @PathVariable String definitionGUID, @RequestBody(required=false) RelationshipRequestBody requestBody) Link a governance zone to a governance definition that controls how the assets in the zone should be governed.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userzoneGUID
- unique identifier of the zonedefinitionGUID
- unique identifier of the governance definitionrequestBody
- relationship requestBody- Returns:
- void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
unlinkZoneFromGovernanceDefinition
@PostMapping(path="/governance-zones/{zoneGUID}/governed-by/{definitionGUID}/unlink") public VoidResponse unlinkZoneFromGovernanceDefinition(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID, @PathVariable String definitionGUID, @RequestBody(required=false) RelationshipRequestBody requestBody) Remove the link between a zone and a governance definition.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userzoneGUID
- unique identifier of the zonedefinitionGUID
- unique identifier of the governance definitionrequestBody
- relationship requestBody- Returns:
- void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getGovernanceZoneByGUID
@GetMapping(path="/governance-zones/{zoneGUID}") public GovernanceZoneResponse getGovernanceZoneByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID) Return information about a specific governance zone.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userzoneGUID
- unique identifier for the zone- Returns:
- properties of the governance zone or InvalidParameterException zoneGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getGovernanceZoneByName
@GetMapping(path="/governance-zones/name/{qualifiedName}") public GovernanceZoneResponse getGovernanceZoneByName(@PathVariable String serverName, @PathVariable String userId, @PathVariable String qualifiedName) Return information about a specific governance zone.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userqualifiedName
- unique name for the zone- Returns:
- properties of the governance zone or InvalidParameterException qualifiedName or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getGovernanceZonesForDomain
@GetMapping(path="/governance-zones/for-domain") public GovernanceZonesResponse getGovernanceZonesForDomain(@PathVariable String serverName, @PathVariable String userId, @RequestParam int domainIdentifier, @RequestParam int startFrom, @RequestParam int pageSize) Return information about the defined governance zones.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userdomainIdentifier
- identifier for the desired governance domainstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- properties of the governance zone or InvalidParameterException qualifiedName or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getGovernanceZoneDefinitionByGUID
@GetMapping(path="/governance-zones/{zoneGUID}/with-definitions") public GovernanceZoneDefinitionResponse getGovernanceZoneDefinitionByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable String zoneGUID) Return information about a specific governance zone and its linked governance definitions.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userzoneGUID
- unique identifier for the zone- Returns:
- properties of the governance zone linked to the associated governance definitions or InvalidParameterException zoneGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-