public abstract class AbstractProcessTemplateCheck extends java.lang.Object implements ProcessTemplateCheck
| Modifier and Type | Field and Description |
|---|---|
protected java.util.logging.Logger |
logger
My logger.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractProcessTemplateCheck(java.lang.String id)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addReportEntry(CheckReport.ResultType resultType,
java.lang.Object[] affectedElements,
java.lang.String msgKey,
java.lang.String bundleName,
LocalisedString... args)
Adds a localised entry to our check report (if it isn't null) and updates
result. |
boolean |
performCheck(Template template,
NodeRelations relations,
CheckReport checkReport)
Performs the check on the given template.
|
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.
|
protected AbstractProcessTemplateCheck(java.lang.String id)
id - public final boolean performCheck(Template template, NodeRelations relations, CheckReport checkReport)
ProcessTemplateCheck
Any problems which will be found during the check, will be reported to the
checkReport, if the parameter is not null.
performCheck in interface ProcessTemplateChecktemplate - The template to be checked.relations - The node relation cache to use.checkReport - The check report for found problems (may be null). If this is a
LocalisedCheckReport, the check should respect and provide all
preferred locale or
corresponding fallbacks.protected abstract void performCheckSpi(Template template, NodeRelations relations, CheckReport checkReport)
template - relations - checkReport - protected final void addReportEntry(CheckReport.ResultType resultType, java.lang.Object[] affectedElements, java.lang.String msgKey, java.lang.String bundleName, LocalisedString... args)
result.
Note, that the objects passed as affectedElements must be supported, cf.
implementation of getURIsForElement(URI, Object[]). The message for the report
entry will be retrieved from the designated bundle using the designated message key. 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.bundleName - The name of the resource bundle.args - Optional arguments passed to the corresponding localised message using
String.format(Locale, String, Object...).