Class ProvisioningGovernanceContext
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.governanceaction.GovernanceContext
-
- org.odpi.openmetadata.frameworks.governanceaction.ProvisioningGovernanceContext
-
public class ProvisioningGovernanceContext extends GovernanceContext
ProvisioningGovernanceContext provides access to details of the provisioning request along with basic access to the metadata store. A provisioning service is typically using the requestSourceElements to provision new resources at the actionTargetElements. It may also create the lineage to cover its provisioning work. The methods provided to create the lineage are simple. They include an optional templateGUID to copy the structure of a more complex element if needed. Alternatively, the provisioning service can specify a guard on completion to initiate a remediation service to fill out the lineage metadata in more detail.
-
-
Constructor Summary
Constructors Constructor Description ProvisioningGovernanceContext(String userId, String governanceActionGUID, String requestType, Map<String,String> requestParameters, List<RequestSourceElement> requestSourceElements, List<ActionTargetElement> actionTargetElements, OpenMetadataClient openMetadataStore)Constructor sets up the key parameters for processing the request to the governance action service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcreateAsset(String assetTypeName, String qualifiedName, String name, String description)Create an asset such as a data file, database, API or server.StringcreateAssetFromTemplate(String templateGUID, String qualifiedName, String name, String description)Create an asset such as a data file, database, API or server.StringcreateChildProcess(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String description, String parentGUID)Create a process that represents the processing instance of this governance action.StringcreateLineageMapping(String sourceElementGUID, String targetElementGUID)Create a lineage mapping relationship between a source and target element.StringcreatePort(String processGUID, String qualifiedName, String displayName, PortType portType, String templateGUID)Add a port to a process.StringcreateProcess(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String description)Create a new process to represent the processing of this governance action process.StringcreateProcessFromTemplate(String templateGUID, ElementStatus initialStatus, String qualifiedName, String name, String description)Create a new process to represent the processing of this governance action process.-
Methods inherited from class org.odpi.openmetadata.frameworks.governanceaction.GovernanceContext
createIncidentReport, getActionTargetElements, getCompletionStatus, getOpenMetadataStore, getRequestParameters, getRequestSourceElements, getRequestType, recordCompletionStatus, recordCompletionStatus, recordCompletionStatus, toString, updateActionTargetStatus
-
-
-
-
Constructor Detail
-
ProvisioningGovernanceContext
public ProvisioningGovernanceContext(String userId, String governanceActionGUID, String requestType, Map<String,String> requestParameters, List<RequestSourceElement> requestSourceElements, List<ActionTargetElement> actionTargetElements, OpenMetadataClient openMetadataStore)
Constructor sets up the key parameters for processing the request to the governance action service.- Parameters:
userId- calling usergovernanceActionGUID- unique identifier of the governance action that triggered this governance servicerequestType- unique identifier of the asset that the annotations should be attached torequestParameters- name-value properties to control the governance action servicerequestSourceElements- metadata elements associated with the request to the governance action serviceactionTargetElements- metadata elements that need to be worked on by the governance action serviceopenMetadataStore- client to the metadata store for use by the governance action service
-
-
Method Detail
-
createAsset
public String createAsset(String assetTypeName, String qualifiedName, String name, String description) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create an asset such as a data file, database, API or server. This is used if the provisioning governance action service has created a new asset as part of the provisioning process. This interface includes an optional templateGUID to copy the structure of an existing asset of the same type.- Parameters:
assetTypeName- the type name of the asset. This is the name of an open metadata type that inherits from "Asset".qualifiedName- the unique name of the new assetname- the technical display name of the assetdescription- the description of the asset- Returns:
- unique identifier of the new asset
- Throws:
InvalidParameterException- the type name or qualified name is null or invalidUserNotAuthorizedException- this governance action service is not authorized to create an assetPropertyServerException- there is a problem connecting to the metadata store
-
createAssetFromTemplate
public String createAssetFromTemplate(String templateGUID, String qualifiedName, String name, String description) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create an asset such as a data file, database, API or server. This is used if the provisioning governance action service has created a new asset as part of the provisioning process. This interface includes an optional templateGUID to copy the structure of an existing asset of the same type.- Parameters:
templateGUID- the unique identifier of the existing asset to copy (this will copy all of the attachments such as nested content, schema, connection etc)qualifiedName- the unique name of the new assetname- the technical display name of the assetdescription- the description of the asset- Returns:
- unique identifier of the new asset
- Throws:
InvalidParameterException- the type name or qualified name is null or invalidUserNotAuthorizedException- this governance action service is not authorized to create an assetPropertyServerException- there is a problem connecting to the metadata store
-
createProcess
public String createProcess(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String description) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new process to represent the processing of this governance action process.- Parameters:
processTypeName- the type name of the process. This is the name of an open metadata type that inherits from "Process".initialStatus- status value of the processqualifiedName- the unique name of the new processname- the technical display name of the processdescription- the description of the process- Returns:
- unique identifier of the new process
- Throws:
InvalidParameterException- the type name or qualified name is null or invalidUserNotAuthorizedException- this governance action service is not authorized to create a processPropertyServerException- there is a problem connecting to the metadata store
-
createProcessFromTemplate
public String createProcessFromTemplate(String templateGUID, ElementStatus initialStatus, String qualifiedName, String name, String description) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new process to represent the processing of this governance action process.- Parameters:
templateGUID- the unique identifier of the existing process to copy (this will copy all of the attachments such as ports, nested content, schema, connection etc)initialStatus- status value of the processqualifiedName- the unique name of the new processname- the technical display name of the processdescription- the description of the process- Returns:
- unique identifier of the new process
- Throws:
InvalidParameterException- the type name or qualified name is null or invalidUserNotAuthorizedException- this governance action service is not authorized to create a processPropertyServerException- there is a problem connecting to the metadata store
-
createChildProcess
public String createChildProcess(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String description, String parentGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a process that represents the processing instance of this governance action.- Parameters:
processTypeName- the type name of the process. This is the name of an open metadata type that inherits from "Process".initialStatus- status value of the processqualifiedName- the unique name of the new processname- the technical display name of the processdescription- the description of the processparentGUID- the unique identifier of the existing process to copy (this will copy all of the attachments such as ports, nested content, schema, connection etc)- Returns:
- unique identifier of the new process
- Throws:
InvalidParameterException- the type name or qualified name is null or invalidUserNotAuthorizedException- this governance action service is not authorized to create a processPropertyServerException- there is a problem connecting to the metadata store
-
createPort
public String createPort(String processGUID, String qualifiedName, String displayName, PortType portType, String templateGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Add a port to a process.- Parameters:
processGUID- unique identifier of the processqualifiedName- unique name for the portdisplayName- display name for the portportType- type of port (direction of data flow)templateGUID- optional unique identifier of a template port to copy- Returns:
- unique identifier of the new port
- Throws:
InvalidParameterException- the processGUID or qualified name is null or is invalidUserNotAuthorizedException- the governance action service is not authorized to create this type of elementPropertyServerException- there is a problem with the metadata store
-
createLineageMapping
public String createLineageMapping(String sourceElementGUID, String targetElementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a lineage mapping relationship between a source and target element. This could be between two assets, two process ports or two schema elements.- Parameters:
sourceElementGUID- unique identifier of the element that describes the source of the data.targetElementGUID- unique identifier of the element that describes the destination of the data.- Returns:
- unique identifier of the relationship
- Throws:
InvalidParameterException- one of the GUIDs is null or is invalidUserNotAuthorizedException- the governance action service is not authorized to create this type of relationshipPropertyServerException- there is a problem with the metadata store
-
-