Package ro.sync.exml.plugin.validator
Interface ValidatorPluginExtension
-
- All Superinterfaces:
PluginExtension
@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface ValidatorPluginExtension extends PluginExtension
Plug-in extension that allows custom validation engines.- Since:
- 24
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
allowsAutomaticValidation()
Check if the custom validation engine allows as you type validation which occurs every time the end user types.boolean
allowsValidation(java.lang.String contentType)
Checks if the current document is accepted for this validation.java.lang.String
getEngineName()
Get the name of the engine.default void
setSchemaSystemID(java.lang.String schemaSystemID)
Set the schema system ID in the custom validation engine, in case the validation engine needs a schema for validation.java.util.List<DocumentPositionedInfo>
validate(java.lang.String systemID, java.io.Reader documentReader, ValidationType validationType, ValidationMode mode)
Validate the document and provide a list of problems.
-
-
-
Method Detail
-
getEngineName
java.lang.String getEngineName()
Get the name of the engine. The name of the engine is shown to the end user as a possible option when they configure a validation scenario's stage in Oxygen. It must be unique.- Returns:
- The name of the current validation engine.
-
allowsValidation
boolean allowsValidation(java.lang.String contentType)
Checks if the current document is accepted for this validation.- Parameters:
contentType
- Current document content type: ro.sync.basic.contenttypes.ContentTypes- Returns:
true
if the current document can be validated.
-
allowsAutomaticValidation
boolean allowsAutomaticValidation()
Check if the custom validation engine allows as you type validation which occurs every time the end user types. If the validation engine is slow or it cannot validate content directly over the Reader provided on the "scan" method, the method should returnfalse
- Returns:
- if the custom validation engine allows automatic validation.
-
validate
java.util.List<DocumentPositionedInfo> validate(java.lang.String systemID, java.io.Reader documentReader, ValidationType validationType, ValidationMode mode)
Validate the document and provide a list of problems.- Parameters:
systemID
- The systemID of the document to be checked.documentReader
- The reader of the document.validationType
- Indicates the type of validation to be performed usually depending on what action was initiated by the end user from the application.mode
- Current validation mode: automatic or manual.- Returns:
- The result of the scanning. Can be
null
or an empty list to signify there are no validation problems.
-
setSchemaSystemID
default void setSchemaSystemID(java.lang.String schemaSystemID)
Set the schema system ID in the custom validation engine, in case the validation engine needs a schema for validation.- Parameters:
schemaSystemID
- The schema system ID
-
-