public class DefaultModletValidator extends Object implements ModletValidator
ModletValidator
implementation.ModelContext.validateModlets(org.jomc.modlet.Modlets)
Modifier and Type | Field and Description |
---|---|
static String |
ENABLED_ATTRIBUTE_NAME
Constant for the name of the model context attribute backing property
enabled . |
Constructor and Description |
---|
DefaultModletValidator()
Creates a new
DefaultModletValidator instance. |
Modifier and Type | Method and Description |
---|---|
static int |
getDefaultOrdinal()
Gets the default ordinal number of the validator.
|
int |
getOrdinal()
Gets the ordinal number of the validator.
|
static boolean |
isDefaultEnabled()
Gets a flag indicating the validator is enabled by default.
|
boolean |
isEnabled()
Gets a flag indicating the validator is enabled.
|
static void |
setDefaultEnabled(Boolean value)
Sets the flag indicating the validator is enabled by default.
|
static void |
setDefaultOrdinal(Integer value)
Sets the default ordinal number of the validator.
|
void |
setEnabled(Boolean value)
Sets the flag indicating the validator is enabled.
|
void |
setOrdinal(Integer value)
Sets the ordinal number of the validator.
|
ModelValidationReport |
validateModlets(ModelContext context,
Modlets modlets)
Validates a given list of
Modlet s with a context. |
public static final String ENABLED_ATTRIBUTE_NAME
enabled
.public DefaultModletValidator()
DefaultModletValidator
instance.public static boolean isDefaultEnabled()
The default enabled flag is controlled by system property
org.jomc.modlet.DefaultModletValidator.defaultEnabled
holding a value indicating the validator is
enabled by default. If that property is not set, the true
default is returned.
true
, if the validator is enabled by default; false
, if the validator is disabled by
default.isEnabled()
,
setDefaultEnabled(java.lang.Boolean)
public static void setDefaultEnabled(Boolean value)
value
- The new value of the flag indicating the validator is enabled by default or null
.isDefaultEnabled()
public final boolean isEnabled()
true
, if the validator is enabled; false
, if the validator is disabled.isDefaultEnabled()
,
setEnabled(java.lang.Boolean)
public final void setEnabled(Boolean value)
value
- The new value of the flag indicating the validator is enabled or null
.isEnabled()
public static int getDefaultOrdinal()
The default ordinal number is controlled by system property
org.jomc.modlet.DefaultModletValidator.defaultOrdinal
holding the default ordinal number of the
validator. If that property is not set, the 0
default is returned.
setDefaultOrdinal(java.lang.Integer)
public static void setDefaultOrdinal(Integer value)
value
- The new default ordinal number of the validator or null
.getDefaultOrdinal()
public final int getOrdinal()
getOrdinal
in interface ModletValidator
getDefaultOrdinal()
,
setOrdinal(java.lang.Integer)
public final void setOrdinal(Integer value)
value
- The new ordinal number of the validator or null
.getOrdinal()
public ModelValidationReport validateModlets(ModelContext context, Modlets modlets) throws NullPointerException, ModelException
ModletValidator
Modlet
s with a context.validateModlets
in interface ModletValidator
context
- The context to validate Modlets
with.modlets
- The Modlets
to validate.NullPointerException
- if context
or modlets
is null
.ModelException
- if validating modlets
fails.ModelValidationReport.isModelValid()
Copyright © 2005–2016 The JOMC Project. All rights reserved.