Class SealProcessor
java.lang.Object
org.odpi.openmetadata.adapters.connectors.surveyaction.seal.SealProcessor
SealProcessor seals content, and verifies sealed content, on behalf of the file and folder survey services.
- Sealing reads every member of the content, writes the manifest and attaches the Sealed classification. It happens when the sealAction request parameter is SEAL.
- Verification compares each piece of sealed content that the survey covers with its manifest, records the result in the Sealed classification, and describes it in a Seal Verification annotation. If the seal is not intact, it adds a Broken Seal request for action.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAn annotation produced by the processor. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the action target that links a Broken Seal request for action to the sealed element. -
Constructor Summary
ConstructorsConstructorDescriptionSealProcessor(SurveyActionServiceConnector surveyService, SurveyContext surveyContext, AuditLog auditLog, String surveyServiceName, AnnotationType verificationAnnotationType, AnnotationType brokenSealAnnotationType) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturn the Broken Seal requests for action.static StringgetPathName(OpenMetadataRootElement element) Return the path name that an element is catalogued with.Return the Seal Verification annotations.voidprocess(OpenMetadataRootElement assetElement, File localRoot, String canonicalRootPathName, boolean lookBeneath) Seal the content if that is requested, and verify the sealed content that the survey covers.
-
Field Details
-
SEALED_ELEMENT_ACTION_TARGET
The name of the action target that links a Broken Seal request for action to the sealed element.- See Also:
-
-
Constructor Details
-
SealProcessor
public SealProcessor(SurveyActionServiceConnector surveyService, SurveyContext surveyContext, AuditLog auditLog, String surveyServiceName, AnnotationType verificationAnnotationType, AnnotationType brokenSealAnnotationType) Constructor.- Parameters:
surveyService- the survey action servicesurveyContext- the survey's contextauditLog- destination for audit log messagessurveyServiceName- name of the survey action serviceverificationAnnotationType- the annotation type for a Seal Verification annotationbrokenSealAnnotationType- the annotation type for a Broken Seal request for action
-
-
Method Details
-
getProfileAnnotations
Return the Seal Verification annotations.- Returns:
- list
-
getActionAnnotations
Return the Broken Seal requests for action.- Returns:
- list
-
process
public void process(OpenMetadataRootElement assetElement, File localRoot, String canonicalRootPathName, boolean lookBeneath) throws UserNotAuthorizedException Seal the content if that is requested, and verify the sealed content that the survey covers. A failure to seal or verify one piece of content is logged and does not stop the survey.- Parameters:
assetElement- the surveyed assetlocalRoot- the surveyed file or directory on this machinecanonicalRootPathName- the path name of the surveyed file or directory, as it is cataloguedlookBeneath- also verify the sealed content catalogued beneath the surveyed directory- Throws:
UserNotAuthorizedException- the survey action service has been disconnected
-
getPathName
Return the path name that an element is catalogued with.- Parameters:
element- catalogued file, directory or compound asset- Returns:
- path name or null
-