Class AbstractProcessTemplateCheck
java.lang.Object
de.aristaflow.adept2.core.checks.processmodel.AbstractProcessTemplateCheck
- All Implemented Interfaces:
ProcessTemplateCheck
Abstract implementation of the process template check.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddReportEntry(CheckReport.ResultType resultType, Object[] affectedElements, String msgKey, LocalisedString... args) Adds a localised entry to our check report (if it isn't null) and updatesresult.final booleanperformCheck(Template template, NodeRelations relations, CheckReport checkReport) Performs the check on the given template.protected abstract voidperformCheckSpi(Template template, NodeRelations relations, CheckReport checkReport) This is the method that must be implemented in subclasses and its purpose is to perform all required checks.
-
Field Details
-
logger
My logger.
-
-
Constructor Details
-
AbstractProcessTemplateCheck
Default constructor.- Parameters:
id-
-
-
Method Details
-
performCheck
public final boolean performCheck(Template template, NodeRelations relations, CheckReport checkReport) Description copied from interface:ProcessTemplateCheckPerforms the check on the given template.Any problems which will be found during the check, will be reported to the
checkReport, if the parameter is notnull.- Specified by:
performCheckin interfaceProcessTemplateCheck- Parameters:
template- The template to be checked.relations- The node relation cache to use.checkReport- The check report for found problems (may benull). If this is aLocalisedCheckReport, the check should respect and provide all preferred locale or corresponding fallbacks.- Returns:
- True, if the check was OK.
-
performCheckSpi
protected abstract void performCheckSpi(Template template, NodeRelations relations, CheckReport checkReport) This is the method that must be implemented in subclasses and its purpose is to perform all required checks. The other methods of this class can help you with that.- Parameters:
template-relations-checkReport-
-
addReportEntry
protected final void addReportEntry(CheckReport.ResultType resultType, Object[] affectedElements, String msgKey, LocalisedString... args) Adds a localised entry to our check report (if it isn't null) and updatesresult. Note, that the objects passed asaffectedElementsmust be supported, cf. implementation ofgetURIsForElement(URI, Object[]). The message for the report entry will be retrieved fromGlobalMessagesusing the designated message key.
The localisation for the root locale will be used for logging.- Parameters:
resultType- The type of the report entry.affectedElements- The affected elements that caused the report entry.msgKey- The message key with which to retrieve the localisation from the resource bundles.args- Optional arguments passed to the corresponding localised message usingString.format(Locale, String, Object...).
-