public class GovernanceContext extends Object
| Constructor and Description |
|---|
GovernanceContext(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.
|
| Modifier and Type | Method and Description |
|---|---|
List<ActionTargetElement> |
getActionTargetElements()
Return the list of elements that this governance action service should work on.
|
CompletionStatus |
getCompletionStatus()
Return any completion status from the governance action service.
|
OpenMetadataStore |
getOpenMetadataStore()
Return the client to access metadata from the open metadata repositories.
|
Map<String,String> |
getRequestParameters()
Return the properties that hold the parameters used to drive the governance action service's processing.
|
List<RequestSourceElement> |
getRequestSourceElements()
Return the list of metadata elements associated with the request to the governance action service.
|
String |
getRequestType()
Return the unique identifier of the asset being discovered.
|
void |
recordCompletionStatus(CompletionStatus status,
List<String> outputGuards)
Declare that all of the processing for the governance action service is finished and the status of the work.
|
void |
recordCompletionStatus(CompletionStatus status,
List<String> outputGuards,
List<NewActionTarget> newActionTargets)
Declare that all of the processing for the governance action service is finished and the status of the work.
|
void |
recordCompletionStatus(CompletionStatus status,
List<String> outputGuards,
Map<String,String> newRequestParameters,
List<NewActionTarget> newActionTargets)
Declare that all of the processing for the governance action service is finished and the status of the work.
|
String |
toString()
Standard toString method.
|
void |
updateActionTargetStatus(String actionTargetGUID,
GovernanceActionStatus status,
Date startDate,
Date completionDate)
Update the status of a specific action target.
|
public GovernanceContext(String userId, String governanceActionGUID, String requestType, Map<String,String> requestParameters, List<RequestSourceElement> requestSourceElements, List<ActionTargetElement> actionTargetElements, OpenMetadataClient openMetadataStore)
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 servicepublic String getRequestType()
public Map<String,String> getRequestParameters()
public List<RequestSourceElement> getRequestSourceElements()
public List<ActionTargetElement> getActionTargetElements()
public OpenMetadataStore getOpenMetadataStore()
public void updateActionTargetStatus(String actionTargetGUID, GovernanceActionStatus status, Date startDate, Date completionDate) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
actionTargetGUID - unique identifier of the governance action service.status - status enum to show its progressstartDate - date/time that the governance action service started processing the targetcompletionDate - date/time that the governance process completed processing this target.InvalidParameterException - the action target GUID is not recognizedUserNotAuthorizedException - the governance action service is not authorized to update the action target propertiesPropertyServerException - there is a problem connecting to the metadata storepublic void recordCompletionStatus(CompletionStatus status, List<String> outputGuards) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
status - completion status enum valueoutputGuards - optional guard strings for triggering subsequent action(s)InvalidParameterException - the completion status is nullUserNotAuthorizedException - the governance action service is not authorized to update the governance
action service completion statusPropertyServerException - there is a problem connecting to the metadata storepublic void recordCompletionStatus(CompletionStatus status, List<String> outputGuards, List<NewActionTarget> newActionTargets) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
status - completion status enum valueoutputGuards - optional guard strings for triggering subsequent action(s)newActionTargets - list of action target names to GUIDs for the resulting governance action serviceInvalidParameterException - the completion status is nullUserNotAuthorizedException - the governance action service is not authorized to update the governance
action service completion statusPropertyServerException - there is a problem connecting to the metadata storepublic void recordCompletionStatus(CompletionStatus status, List<String> outputGuards, Map<String,String> newRequestParameters, List<NewActionTarget> newActionTargets) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
status - completion status enum valueoutputGuards - optional guard strings for triggering subsequent action(s)newRequestParameters - additional request parameters. These override/augment any request parameters defined for the next invoked servicenewActionTargets - list of action target names to GUIDs for the resulting governance action serviceInvalidParameterException - the completion status is nullUserNotAuthorizedException - the governance action service is not authorized to update the governance
action service completion statusPropertyServerException - there is a problem connecting to the metadata storepublic CompletionStatus getCompletionStatus()
Copyright © 2018–2021 LF AI & Data Foundation. All rights reserved.