Class GovernanceZoneManager
java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceZoneManager
- All Implemented Interfaces:
GovernanceZonesInterface
,RelatedElementsManagementInterface
public class GovernanceZoneManager
extends GovernanceProgramBaseClient
implements GovernanceZonesInterface
GovernanceZoneManager is the Java client used to manage governance zones.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
nullRequestBody
-
Constructor Summary
ConstructorDescriptionGovernanceZoneManager
(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.GovernanceZoneManager
(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request.GovernanceZoneManager
(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.GovernanceZoneManager
(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.GovernanceZoneManager
(String serverName, String serverPlatformURLRoot, GovernanceProgramRESTClient restClient, int maxPageSize) Create a new client that uses the supplied rest client. -
Method Summary
Modifier and TypeMethodDescriptioncreateGovernanceZone
(String userId, GovernanceZoneProperties properties) Create a definition of a governance zone.void
deleteGovernanceZone
(String userId, String zoneGUID) Remove the definition of a zone.getGovernanceZoneByGUID
(String userId, String zoneGUID) Return information about a specific governance zone.getGovernanceZoneByName
(String userId, String qualifiedName) Return information about a specific governance zone.getGovernanceZoneDefinitionByGUID
(String userId, String zoneGUID) Return information about a specific governance zone and its linked governance definitions.getGovernanceZonesForDomain
(String userId, int domainIdentifier, int startFrom, int pageSize) Return information about the defined governance zones.void
linkZonesInHierarchy
(String userId, String parentZoneGUID, String childZoneGUID) Link two related governance zones together as part of a hierarchy.void
unlinkZonesInHierarchy
(String userId, String parentZoneGUID, String childZoneGUID) Remove the link between two zones in the zone hierarchy.void
updateGovernanceZone
(String userId, String zoneGUID, boolean isMergeUpdate, GovernanceZoneProperties properties) Update the definition of a zone.Methods inherited from class org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
clearAssignmentScope, clearGovernanceDefinitionScope, clearGovernanceResponsibilityAssignment, clearGovernedBy, clearMoreInformation, clearResource, clearStakeholder, getAssignedActors, getAssignedScopes, getDescriptiveElements, getGovernanceDefinitionScopes, getGovernanceDefinitionsForElement, getGovernedElements, getMoreInformation, getResourceList, getResponsibleRoles, getRoleResponsibilities, getScopedGovernanceDefinitions, getStakeholderCommissionedElements, getStakeholders, getSupportedByResource, removeReferenceable, setupAssignmentScope, setupGovernanceDefinitionScope, setupGovernanceResponsibilityAssignment, setupGovernedBy, setupMoreInformation, setupResource, setupStakeholder, updateGovernanceDefinitionStatus, updateRelationship
-
Constructor Details
-
GovernanceZoneManager
public GovernanceZoneManager(String serverName, String serverPlatformURLRoot) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST services- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
GovernanceZoneManager
public GovernanceZoneManager(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
GovernanceZoneManager
public GovernanceZoneManager(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesmaxPageSize
- pre-initialized parameter limitauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
GovernanceZoneManager
public GovernanceZoneManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, AuditLog auditLog) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsmaxPageSize
- pre-initialized parameter limitauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
GovernanceZoneManager
public GovernanceZoneManager(String serverName, String serverPlatformURLRoot, GovernanceProgramRESTClient restClient, int maxPageSize) throws InvalidParameterException Create a new client that uses the supplied rest client. This is typically used when called from another OMAG Server.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesrestClient
- internal client for rest callsmaxPageSize
- pre-initialized parameter limit- Throws:
InvalidParameterException
- bad input parameters
-
-
Method Details
-
createGovernanceZone
public String createGovernanceZone(String userId, GovernanceZoneProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a definition of a governance zone. The qualified name of these governance zones can be added to the supportedZones, publishedZones 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.- Specified by:
createGovernanceZone
in interfaceGovernanceZonesInterface
- Parameters:
userId
- calling userproperties
- properties for a governance zone- Returns:
- unique identifier of the governance zone
- Throws:
InvalidParameterException
- qualifiedName or userId is null; qualifiedName is not uniquePropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
updateGovernanceZone
public void updateGovernanceZone(String userId, String zoneGUID, boolean isMergeUpdate, GovernanceZoneProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the definition of a zone.- Specified by:
updateGovernanceZone
in interfaceGovernanceZonesInterface
- Parameters:
userId
- calling userzoneGUID
- unique identifier of zoneisMergeUpdate
- are unspecified properties unchanged (true) or replaced with null?properties
- properties to change- Throws:
InvalidParameterException
- guid, qualifiedName or userId is null; qualifiedName is not unique; guid is not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
deleteGovernanceZone
public void deleteGovernanceZone(String userId, String zoneGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the definition of a zone.- Specified by:
deleteGovernanceZone
in interfaceGovernanceZonesInterface
- Parameters:
userId
- calling userzoneGUID
- unique identifier of zone- Throws:
InvalidParameterException
- guid or userId is null; guid is not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
linkZonesInHierarchy
public void linkZonesInHierarchy(String userId, String parentZoneGUID, String childZoneGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Link two related governance zones together as part of a hierarchy. A zone can only have one parent but many child zones.- Specified by:
linkZonesInHierarchy
in interfaceGovernanceZonesInterface
- Parameters:
userId
- calling userparentZoneGUID
- unique identifier of the parent zonechildZoneGUID
- unique identifier of the child zone- Throws:
InvalidParameterException
- one of the guids is null or not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
unlinkZonesInHierarchy
public void unlinkZonesInHierarchy(String userId, String parentZoneGUID, String childZoneGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the link between two zones in the zone hierarchy.- Specified by:
unlinkZonesInHierarchy
in interfaceGovernanceZonesInterface
- Parameters:
userId
- calling userparentZoneGUID
- unique identifier of the parent zonechildZoneGUID
- unique identifier of the child zone- Throws:
InvalidParameterException
- one of the guids is null or not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getGovernanceZoneByGUID
public GovernanceZoneElement getGovernanceZoneByGUID(String userId, String zoneGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about a specific governance zone.- Specified by:
getGovernanceZoneByGUID
in interfaceGovernanceZonesInterface
- Parameters:
userId
- calling userzoneGUID
- unique identifier for the zone- Returns:
- properties of the governance zone
- Throws:
InvalidParameterException
- zoneGUID or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getGovernanceZoneByName
public GovernanceZoneElement getGovernanceZoneByName(String userId, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about a specific governance zone.- Specified by:
getGovernanceZoneByName
in interfaceGovernanceZonesInterface
- Parameters:
userId
- calling userqualifiedName
- unique name for the zone- Returns:
- properties of the governance zone
- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getGovernanceZonesForDomain
public List<GovernanceZoneElement> getGovernanceZonesForDomain(String userId, int domainIdentifier, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about the defined governance zones.- Specified by:
getGovernanceZonesForDomain
in interfaceGovernanceZonesInterface
- Parameters:
userId
- calling userdomainIdentifier
- identifier for the desired governance domain - 0 for allstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- properties of the governance zone
- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getGovernanceZoneDefinitionByGUID
public GovernanceZoneDefinition getGovernanceZoneDefinitionByGUID(String userId, String zoneGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about a specific governance zone and its linked governance definitions.- Specified by:
getGovernanceZoneDefinitionByGUID
in interfaceGovernanceZonesInterface
- Parameters:
userId
- calling userzoneGUID
- unique identifier for the zone- Returns:
- properties of the governance zone linked to the associated governance definitions
- Throws:
InvalidParameterException
- zoneGUID or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-