public class DefaultModelValidator extends Object implements ModelValidator
ModelValidator
implementation.ModelContext.validateModel(org.jomc.modlet.Model)
Modifier and Type | Field and Description |
---|---|
static String |
ENABLED_ATTRIBUTE_NAME
Constant for the name of the model context attribute backing property
enabled . |
static String |
VALIDATE_JAVA_ATTRIBUTE_NAME
Constant for the name of the model context attribute backing property
validateJava . |
Constructor and Description |
---|
DefaultModelValidator()
Creates a new
DefaultModelValidator instance. |
Modifier and Type | Method and Description |
---|---|
static boolean |
isDefaultEnabled()
Gets a flag indicating the validator is enabled by default.
|
static boolean |
isDefaultValidateJava()
Gets a flag indicating the validator is performing Java related validation by default.
|
boolean |
isEnabled()
Gets a flag indicating the validator is enabled.
|
boolean |
isValidateJava()
Gets a flag indicating the validator is performing Java related validation.
|
static void |
setDefaultEnabled(Boolean value)
Sets the flag indicating the validator is enabled by default.
|
static void |
setDefaultValidateJava(Boolean value)
Sets the flag indicating the validator is performing Java related validation by default.
|
void |
setEnabled(Boolean value)
Sets the flag indicating the validator is enabled.
|
void |
setValidateJava(Boolean value)
Sets the flag indicating the validator is performing Java related validation.
|
ModelValidationReport |
validateModel(ModelContext context,
Model model) |
public static final String ENABLED_ATTRIBUTE_NAME
enabled
.public static final String VALIDATE_JAVA_ATTRIBUTE_NAME
validateJava
.ModelContext.getAttribute(java.lang.String)
,
Constant Field Valuespublic DefaultModelValidator()
DefaultModelValidator
instance.public static boolean isDefaultEnabled()
The default enabled flag is controlled by system property
org.jomc.model.modlet.DefaultModelValidator.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.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 boolean isDefaultValidateJava()
The default validate Java flag is controlled by system property
org.jomc.model.modlet.DefaultModelValidator.defaultValidateJava
holding a value indicating the validator
is performing Java related validation by default. If that property is not set, the true
default is
returned.
true
, if the validator is performing Java related validation by default; false
, if the
validator is not performing Java related validation by default.setDefaultValidateJava(java.lang.Boolean)
public static void setDefaultValidateJava(Boolean value)
value
- The new value of the flag indicating the validator is performing Java related validation by default
or null
.isDefaultValidateJava()
public final boolean isValidateJava()
true
, if the validator is performing Java related validation; false
, if the the validator
is not performing Java related validation.isDefaultValidateJava()
,
setValidateJava(java.lang.Boolean)
public final void setValidateJava(Boolean value)
value
- The new value of the flag indicating the validator is performing Java related validation or
null
.isValidateJava()
public ModelValidationReport validateModel(ModelContext context, Model model) throws ModelException
validateModel
in interface ModelValidator
ModelException
Copyright © 2005–2016 The JOMC Project. All rights reserved.