Class GovernanceZoneRESTServices
java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.server.GovernanceZoneRESTServices
GovernanceZoneRESTServices provides the server side logic for the Governance Zone Manager.
It manages the definitions of governance zones and their linkage to the rest of the
governance program.
-
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
-
GovernanceZoneRESTServices
public GovernanceZoneRESTServices()Default constructor
-
-
Method Details
-
createGovernanceZone
public GUIDResponse createGovernanceZone(String serverName, String userId, 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
- properties to store- 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
public VoidResponse updateGovernanceZone(String serverName, String userId, String zoneGUID, boolean isMergeUpdate, 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
public VoidResponse deleteGovernanceZone(String serverName, String userId, String zoneGUID, 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 request body- Returns:
- void or InvalidParameterException guid or userId is null; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
linkZonesInHierarchy
public VoidResponse linkZonesInHierarchy(String serverName, String userId, String parentZoneGUID, String childZoneGUID, 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
public VoidResponse unlinkZonesInHierarchy(String serverName, String userId, String parentZoneGUID, String childZoneGUID, 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
public VoidResponse 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.- 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
public VoidResponse unlinkZoneFromGovernanceDefinition(String serverName, String userId, String zoneGUID, String definitionGUID, 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
public GovernanceZoneResponse getGovernanceZoneByGUID(String serverName, String userId, 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
public GovernanceZoneResponse getGovernanceZoneByName(String serverName, String userId, 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
public GovernanceZonesResponse getGovernanceZonesForDomain(String serverName, String userId, int domainIdentifier, int startFrom, 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 domain - 0 for all domainsstartFrom
- 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
public GovernanceZoneDefinitionResponse getGovernanceZoneDefinitionByGUID(String serverName, String userId, 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
-