public class RemediationGovernanceContext extends GovernanceContext
| Constructor and Description |
|---|
RemediationGovernanceContext(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 |
|---|---|
void |
classifyMetadataElement(String metadataElementGUID,
String classificationName,
Date effectiveFrom,
Date effectiveTo,
ElementProperties properties)
Add a new classification to the metadata element.
|
void |
classifyMetadataElement(String metadataElementGUID,
String classificationName,
ElementProperties properties)
Add a new classification to the metadata element.
|
String |
createMetadataElement(String metadataElementTypeName,
ElementProperties properties,
String templateGUID)
Create a new metadata element in the metadata store.
|
String |
createMetadataElement(String metadataElementTypeName,
ElementStatus initialStatus,
Date effectiveFrom,
Date effectiveTo,
ElementProperties properties,
String templateGUID)
Create a new metadata element in the metadata store.
|
String |
createRelatedElements(String relationshipTypeName,
String metadataElement1GUID,
String metadataElement2GUID,
Date effectiveFrom,
Date effectiveTo,
ElementProperties properties)
Create a relationship between two metadata elements.
|
String |
createRelatedElements(String relationshipTypeName,
String metadataElement1GUID,
String metadataElement2GUID,
ElementProperties properties)
Create a relationship between two metadata elements.
|
void |
deleteMetadataElement(String metadataElementGUID)
Delete a specific metadata element.
|
void |
deleteRelatedElements(String relationshipGUID)
Delete a relationship between two metadata elements.
|
void |
reclassifyMetadataElement(String metadataElementGUID,
String classificationName,
boolean replaceProperties,
ElementProperties properties)
Update the properties of a classification that is currently attached to a specific metadata element.
|
void |
unclassifyMetadataElement(String metadataElementGUID,
String classificationName)
Remove the named classification from a specific metadata element.
|
void |
updateClassificationStatus(String metadataElementGUID,
String classificationName,
Date effectiveFrom,
Date effectiveTo)
Update the effectivity dates of a specific classification attached to a metadata element.
|
void |
updateMetadataElement(String metadataElementGUID,
boolean replaceProperties,
ElementProperties properties)
Update the properties of a specific metadata element.
|
void |
updateMetadataElementStatus(String metadataElementGUID,
ElementStatus newElementStatus,
Date effectiveFrom,
Date effectiveTo)
Update the status of specific metadata element.
|
void |
updateRelatedElements(String relationshipGUID,
boolean replaceProperties,
ElementProperties properties)
Update the properties associated with a relationship.
|
void |
updateRelatedElementsStatus(String relationshipGUID,
Date effectiveFrom,
Date effectiveTo)
Update the effectivity dates of a specific relationship between metadata elements.
|
getActionTargetElements, getCompletionStatus, getOpenMetadataStore, getRequestParameters, getRequestSourceElements, getRequestType, recordCompletionStatus, recordCompletionStatus, recordCompletionStatus, toString, updateActionTargetStatuspublic RemediationGovernanceContext(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 createMetadataElement(String metadataElementTypeName, ElementProperties properties, String templateGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementTypeName - type name of the new metadata elementproperties - properties of the new metadata elementtemplateGUID - the unique identifier of the existing asset to copy (this will copy all of the attachments such as nested content, schema
connection etc)InvalidParameterException - the type name, status or one of the properties is invalidUserNotAuthorizedException - the governance action service is not authorized to create this type of elementPropertyServerException - there is a problem with the metadata storepublic String createMetadataElement(String metadataElementTypeName, ElementStatus initialStatus, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String templateGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementTypeName - type name of the new metadata elementinitialStatus - initial status of the metadata elementeffectiveFrom - the date when this element is active - null for active on creationeffectiveTo - the date when this element becomes inactive - null for active until deletedproperties - properties of the new metadata elementtemplateGUID - the unique identifier of the existing asset to copy (this will copy all of the attachments such as nested content, schema
connection etc)InvalidParameterException - the type name, status or one of the properties is invalidUserNotAuthorizedException - the governance action service is not authorized to create this type of elementPropertyServerException - there is a problem with the metadata storepublic void updateMetadataElement(String metadataElementGUID, boolean replaceProperties, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updatereplaceProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update
the individual properties specified on the request.properties - new properties for the metadata elementInvalidParameterException - either the unique identifier or the properties are invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic void updateMetadataElementStatus(String metadataElementGUID, ElementStatus newElementStatus, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updatenewElementStatus - new status value - or null to leave as iseffectiveFrom - the date when this element is active - null for active noweffectiveTo - the date when this element becomes inactive - null for active until deletedInvalidParameterException - either the unique identifier or the status are invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic void deleteMetadataElement(String metadataElementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateInvalidParameterException - the unique identifier is null or invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to delete this elementPropertyServerException - there is a problem with the metadata storepublic void classifyMetadataElement(String metadataElementGUID, String classificationName, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateclassificationName - name of the classification to add (if the classification is already present then use reclassify)properties - properties to store in the new classification. These must conform to the valid properties associated with the
classification nameInvalidParameterException - the unique identifier or classification name is null or invalid in some way; properties do not match the
valid properties associated with the classification's type definitionUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic void classifyMetadataElement(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateclassificationName - name of the classification to add (if the classification is already present then use reclassify)effectiveFrom - the date when this classification is active - null for active noweffectiveTo - the date when this classification becomes inactive - null for active until deletedproperties - properties to store in the new classification. These must conform to the valid properties associated with the
classification nameInvalidParameterException - the unique identifier or classification name is null or invalid in some way; properties do not match the
valid properties associated with the classification's type definitionUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic void reclassifyMetadataElement(String metadataElementGUID, String classificationName, boolean replaceProperties, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateclassificationName - unique name of the classification to updatereplaceProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update
the individual properties specified on the request.properties - new properties for the classificationInvalidParameterException - the unique identifier or classification name is null or invalid in some way; properties do not match the
valid properties associated with the classification's type definitionUserNotAuthorizedException - the governance action service is not authorized to update this element/classificationPropertyServerException - there is a problem with the metadata storepublic void updateClassificationStatus(String metadataElementGUID, String classificationName, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateclassificationName - unique name of the classification to updateeffectiveFrom - the date when this element is active - null for active noweffectiveTo - the date when this element becomes inactive - null for active until deletedInvalidParameterException - either the unique identifier or the status are invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic void unclassifyMetadataElement(String metadataElementGUID, String classificationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
metadataElementGUID - unique identifier of the metadata element to updateclassificationName - unique name of the classification to removeInvalidParameterException - the unique identifier or classification name is null or invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to remove this classificationPropertyServerException - there is a problem with the metadata storepublic String createRelatedElements(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
relationshipTypeName - name of the type of relationship to create. This will determine the types of metadata elements that can be
related and the properties that can be associated with this relationship.metadataElement1GUID - unique identifier of the metadata element at end 1 of the relationshipmetadataElement2GUID - unique identifier of the metadata element at end 2 of the relationshipproperties - the properties of the relationshipInvalidParameterException - the unique identifier's of the metadata elements are null or invalid in some way; the properties are
not valid for this type of relationshipUserNotAuthorizedException - the governance action service is not authorized to create this type of relationshipPropertyServerException - there is a problem with the metadata storepublic String createRelatedElements(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, Date effectiveFrom, Date effectiveTo, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
relationshipTypeName - name of the type of relationship to create. This will determine the types of metadata elements that can be
related and the properties that can be associated with this relationship.metadataElement1GUID - unique identifier of the metadata element at end 1 of the relationshipmetadataElement2GUID - unique identifier of the metadata element at end 2 of the relationshipeffectiveFrom - the date when this element is active - null for active noweffectiveTo - the date when this element becomes inactive - null for active until deletedproperties - the properties of the relationshipInvalidParameterException - the unique identifier's of the metadata elements are null or invalid in some way; the properties are
not valid for this type of relationshipUserNotAuthorizedException - the governance action service is not authorized to create this type of relationshipPropertyServerException - there is a problem with the metadata storepublic void updateRelatedElements(String relationshipGUID, boolean replaceProperties, ElementProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
relationshipGUID - unique identifier of the relationship to updatereplaceProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update
the individual properties specified on the request.properties - new properties for the classificationInvalidParameterException - the unique identifier of the relationship is null or invalid in some way; the properties are
not valid for this type of relationshipUserNotAuthorizedException - the governance action service is not authorized to update this relationshipPropertyServerException - there is a problem with the metadata storepublic void updateRelatedElementsStatus(String relationshipGUID, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
relationshipGUID - unique identifier of the relationship to updateeffectiveFrom - the date when this element is active - null for active noweffectiveTo - the date when this element becomes inactive - null for active until deletedInvalidParameterException - either the unique identifier or the status are invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to update this elementPropertyServerException - there is a problem with the metadata storepublic void deleteRelatedElements(String relationshipGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
relationshipGUID - unique identifier of the relationship to deleteInvalidParameterException - the unique identifier of the relationship is null or invalid in some wayUserNotAuthorizedException - the governance action service is not authorized to delete this relationshipPropertyServerException - there is a problem with the metadata storeCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.