Class GovernanceDefinitionsResource
java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.server.spring.GovernanceDefinitionsResource
@RestController
@RequestMapping("/servers/{serverName}/open-metadata/access-services/governance-program/users/{userId}")
public class GovernanceDefinitionsResource
extends Object
GovernanceDefinitionsResource sets up the governance definitions that are part of an organization governance.
Each governance definition describes a decision.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclearSupportingDefinition
(String serverName, String userId, String definitionGUID, String supportingDefinitionGUID, RelationshipRequestBody requestBody) Remove the supporting link between two governance definitions.createGovernanceDefinition
(String serverName, String userId, GovernanceDefinitionRequestBody requestBody) Create a new governance definition.deleteGovernanceDefinition
(String serverName, String userId, String definitionGUID, ExternalSourceRequestBody requestBody) Delete a specific governance definition.linkPeerDefinitions
(String serverName, String userId, String definitionOneGUID, String definitionTwoGUID, RelationshipRequestBody requestBody) Link two related governance definitions together.setGovernanceDefinitionStatus
(String serverName, String userId, String definitionGUID, GovernanceStatusRequestBody requestBody) Update the status of a governance definitionsetupSupportingDefinition
(String serverName, String userId, String definitionGUID, String supportingDefinitionGUID, RelationshipRequestBody requestBody) Create a link to show that a governance definition supports the requirements of another governance definition.unlinkPeerDefinitions
(String serverName, String userId, String definitionOneGUID, String definitionTwoGUID, RelationshipRequestBody requestBody) Remove the link between two definitions.updateGovernanceDefinition
(String serverName, String userId, String definitionGUID, boolean isMergeUpdate, GovernanceDefinitionRequestBody requestBody) Update an existing governance definition.
-
Constructor Details
-
GovernanceDefinitionsResource
public GovernanceDefinitionsResource()Default constructor
-
-
Method Details
-
createGovernanceDefinition
@PostMapping(path="/governance-definitions") public GUIDResponse createGovernanceDefinition(@PathVariable String serverName, @PathVariable String userId, @RequestBody GovernanceDefinitionRequestBody requestBody) Create a new governance definition. The type of the definition is located in the properties.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userrequestBody
- properties of the definition and initial status- Returns:
- unique identifier of the definition or InvalidParameterException typeName, documentIdentifier or userId is null; documentIdentifier is not unique; typeName is not valid PropertyServerException problem accessing the metadata service UserNotAuthorizedException security access problem
-
updateGovernanceDefinition
@PostMapping(path="/governance-definitions/{definitionGUID}/update") public VoidResponse updateGovernanceDefinition(@PathVariable String serverName, @PathVariable String userId, @PathVariable String definitionGUID, @RequestParam boolean isMergeUpdate, @RequestBody GovernanceDefinitionRequestBody requestBody) Update an existing governance definition.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userdefinitionGUID
- unique identifier of the definition to updateisMergeUpdate
- are unspecified properties unchanged (true) or removed?requestBody
- properties to update- Returns:
- void or InvalidParameterException guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
setGovernanceDefinitionStatus
@PostMapping(path="/governance-definitions/{definitionGUID}/update-status") public VoidResponse setGovernanceDefinitionStatus(@PathVariable String serverName, @PathVariable String userId, @PathVariable String definitionGUID, @RequestBody GovernanceStatusRequestBody requestBody) Update the status of a governance definition- Parameters:
serverName
- name of the server instance to connect touserId
- calling userdefinitionGUID
- unique identifierrequestBody
- new status- Returns:
- void or InvalidParameterException guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
deleteGovernanceDefinition
@PostMapping(path="/governance-definitions/{definitionGUID}/delete") public VoidResponse deleteGovernanceDefinition(@PathVariable String serverName, @PathVariable String userId, @PathVariable String definitionGUID, @RequestBody ExternalSourceRequestBody requestBody) Delete a specific governance definition.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userdefinitionGUID
- unique identifier of the definition to removerequestBody
- external source request body- Returns:
- void or InvalidParameterException guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
linkPeerDefinitions
@PostMapping(path="/governance-definitions/{definitionOneGUID}/peers/{definitionTwoGUID}/link") public VoidResponse linkPeerDefinitions(@PathVariable String serverName, @PathVariable String userId, @PathVariable String definitionOneGUID, @PathVariable String definitionTwoGUID, @RequestBody RelationshipRequestBody requestBody) Link two related governance definitions together. The governance definitions are of the same type as follows:- A relationship of type GovernanceDriverLink is between two GovernanceDriver definitions
- A relationship of type GovernancePolicyLink is between two GovernancePolicy definitions
- A relationship of type GovernanceControl is between two GovernanceControl definitions
- Parameters:
serverName
- name of the server instance to connect touserId
- calling userdefinitionOneGUID
- unique identifier of the first definitiondefinitionTwoGUID
- unique identifier of the second definitionrequestBody
- description of their relationship- Returns:
- void or InvalidParameterException guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
unlinkPeerDefinitions
@PostMapping(path="/governance-definitions/{definitionOneGUID}/peers/{definitionTwoGUID}/unlink") public VoidResponse unlinkPeerDefinitions(@PathVariable String serverName, @PathVariable String userId, @PathVariable String definitionOneGUID, @PathVariable String definitionTwoGUID, @RequestBody RelationshipRequestBody requestBody) Remove the link between two definitions.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userdefinitionOneGUID
- unique identifier of the first definitiondefinitionTwoGUID
- unique identifier of the second definitionrequestBody
- the name of the relationship to delete- Returns:
- void or InvalidParameterException guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
setupSupportingDefinition
@PostMapping(path="/governance-definitions/{definitionGUID}/supporting-definitions/{supportingDefinitionGUID}/link") public VoidResponse setupSupportingDefinition(@PathVariable String serverName, @PathVariable String userId, @PathVariable String definitionGUID, @PathVariable String supportingDefinitionGUID, @RequestBody RelationshipRequestBody requestBody) Create a link to show that a governance definition supports the requirements of another governance definition. This supporting relationship is between definitions of different types as follows:- A relationship of type GovernanceResponse is between a GovernanceDriver and a GovernancePolicy
- A relationship of type GovernanceImplementation is between a GovernancePolicy and a GovernanceControl
- Parameters:
serverName
- name of the server instance to connect touserId
- calling userdefinitionGUID
- unique identifier of the governance definitionsupportingDefinitionGUID
- unique identifier of the supporting governance definitionrequestBody
- description of how the supporting definition provides support- Returns:
- void or InvalidParameterException guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
clearSupportingDefinition
@PostMapping(path="/governance-definitions/{definitionGUID}/supporting-definitions/{supportingDefinitionGUID}/unlink") public VoidResponse clearSupportingDefinition(@PathVariable String serverName, @PathVariable String userId, @PathVariable String definitionGUID, @PathVariable String supportingDefinitionGUID, @RequestBody RelationshipRequestBody requestBody) Remove the supporting link between two governance definitions.- Parameters:
serverName
- name of the server instance to connect touserId
- calling userdefinitionGUID
- unique identifier of the governance definitionsupportingDefinitionGUID
- unique identifier of the supporting governance definitionrequestBody
- the name of the relationship to delete- Returns:
- void or InvalidParameterException guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-