|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxx.compiler.tags.DefaultObjectHandler
jaxx.compiler.tags.validator.BeanValidatorHandler
public class BeanValidatorHandler
| Nested Class Summary | |
|---|---|
static class |
BeanValidatorHandler.CompiledBeanValidator
The compiled objet representing a BeanValidator to be generated in JAXXObject |
| Nested classes/interfaces inherited from class jaxx.compiler.tags.DefaultObjectHandler |
|---|
DefaultObjectHandler.ProxyEventInfo |
| Field Summary | |
|---|---|
static String |
AUTOFIELD_ATTRIBUTE
|
static String |
BEAN_ATTRIBUTE
|
static String |
BEAN_CLASS_ATTRIBUTE
|
static String |
BEAN_INITIALIZER_ATTRIBUTE
|
static String |
CONTEXT_ATTRIBUTE
|
static String |
CONTEXT_NAME_ATTRIBUTE
Deprecated. since 2.4.1, now use the CONTEXT_ATTRIBUTE. |
static String |
ERROR_LIST_ATTRIBUTE
|
static String |
ERROR_LIST_DEFAULT
|
static String |
ERROR_LIST_MODEL_ATTRIBUTE
|
static String |
ERROR_LIST_MODEL_DEFAULT
|
static String |
ERROR_TABLE_ATTRIBUTE
|
static String |
ERROR_TABLE_DEFAULT
|
static String |
ERROR_TABLE_MODEL_ATTRIBUTE
|
static String |
ERROR_TABLE_MODEL_DEFAULT
|
static String |
PARENT_VALIDATOR_ATTRIBUTE
|
static String |
STRICT_MODE_ATTRIBUTE
|
static String |
TAG
|
static String |
UI_CLASS_ATTRIBUTE
|
protected static Map<JAXXCompiler,List<String>> |
validatedComponents
|
protected static Map<JAXXCompiler,List<BeanValidatorHandler.CompiledBeanValidator>> |
validators
|
| Fields inherited from interface jaxx.compiler.tags.TagHandler |
|---|
XMLNS_ATTRIBUTE |
| Constructor Summary | |
|---|---|
BeanValidatorHandler(ClassDescriptor beanClass)
|
|
| Method Summary | |
|---|---|
protected void |
compileChildTagFirstPass(Element tag,
JAXXCompiler compiler)
Compiles a child of the current tag. |
void |
compileSecondPass(Element tag,
JAXXCompiler compiler)
Performs the second pass of compilation on an XML tag from a JAXX source file. |
protected CompiledObject |
createCompiledObject(String id,
JAXXCompiler compiler)
Creates the CompiledObject which will represent the object
created by this TagHandler. |
static List<BeanValidatorHandler.CompiledBeanValidator> |
getValidators(JAXXCompiler compiler)
|
static boolean |
hasValidator(JAXXCompiler compiler)
|
static boolean |
isBeanUsedByValidator(JAXXCompiler compiler,
String beanId)
Test if a given bean is attached to a validator. |
static boolean |
isComponentUsedByValidator(JAXXCompiler compiler,
String componentId)
Test if a given CompiledObject is attached to a validator. |
void |
setAttribute(CompiledObject object,
String propertyName,
String stringValue,
boolean inline,
JAXXCompiler compiler)
Set a single property on an object. |
protected void |
setDefaults(CompiledObject object,
Element tag,
JAXXCompiler compiler)
Initializes the default settings of the object, prior to setting its attribute values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String TAG
public static final String BEAN_ATTRIBUTE
public static final String BEAN_CLASS_ATTRIBUTE
public static final String BEAN_INITIALIZER_ATTRIBUTE
public static final String ERROR_LIST_MODEL_ATTRIBUTE
public static final String ERROR_TABLE_MODEL_ATTRIBUTE
public static final String ERROR_LIST_ATTRIBUTE
public static final String ERROR_TABLE_ATTRIBUTE
public static final String ERROR_LIST_MODEL_DEFAULT
public static final String ERROR_TABLE_MODEL_DEFAULT
public static final String ERROR_LIST_DEFAULT
public static final String ERROR_TABLE_DEFAULT
public static final String AUTOFIELD_ATTRIBUTE
public static final String UI_CLASS_ATTRIBUTE
public static final String STRICT_MODE_ATTRIBUTE
public static final String CONTEXT_ATTRIBUTE
@Deprecated public static final String CONTEXT_NAME_ATTRIBUTE
CONTEXT_ATTRIBUTE.public static final String PARENT_VALIDATOR_ATTRIBUTE
protected static Map<JAXXCompiler,List<BeanValidatorHandler.CompiledBeanValidator>> validators
protected static Map<JAXXCompiler,List<String>> validatedComponents
| Constructor Detail |
|---|
public BeanValidatorHandler(ClassDescriptor beanClass)
| Method Detail |
|---|
protected CompiledObject createCompiledObject(String id,
JAXXCompiler compiler)
DefaultObjectHandlerCompiledObject which will represent the object
created by this TagHandler.
createCompiledObject in class DefaultObjectHandlerid - the CompiledObject's ID.compiler - compiler to use
CompiledObject to use
protected void compileChildTagFirstPass(Element tag,
JAXXCompiler compiler)
throws CompilerException,
IOException
DefaultObjectHandlerJAXXCompiler.compileFirstPass.
compileChildTagFirstPass in class DefaultObjectHandlertag - the child tag to runcompiler - the current JAXXCompiler
CompilerException - if a compilation error occurs
IOException - if an I/O error occurs
public void compileSecondPass(Element tag,
JAXXCompiler compiler)
throws CompilerException,
IOException
TagHandlerTagHandler implementations affect the generated .java
file by calling methods in the JAXXCompiler.
compileSecondPass in interface TagHandlercompileSecondPass in class DefaultObjectHandlertag - the XML tag to compilecompiler - the active JAXXCompiler
CompilerException - if a compilation error occurs
IOException - if an I/O error occurs
protected void setDefaults(CompiledObject object,
Element tag,
JAXXCompiler compiler)
DefaultObjectHandler
setDefaults in class DefaultObjectHandlerobject - the object to initializetag - the tag being compiledcompiler - the current JAXXCompiler
public void setAttribute(CompiledObject object,
String propertyName,
String stringValue,
boolean inline,
JAXXCompiler compiler)
DefaultObjectHandlerDefaultObjectHandler.convertFromString(String, String, Class).
setAttribute in class DefaultObjectHandlerobject - the object on which to set the propertypropertyName - the name of the property to setstringValue - the raw string value of the property from the XMLinline - true if the value was directly specified as an inline class tag attribute, false otherwise (a default value, specified in CSS, etc.)compiler - the current JAXXCompiler
public static boolean isBeanUsedByValidator(JAXXCompiler compiler,
String beanId)
compiler - current compiler to usebeanId - the bean to test
true if the given bean is attached to a validator,
false otherwisepublic static boolean hasValidator(JAXXCompiler compiler)
compiler - compiler to use
true if some validators were detected,
false otherwise
public static boolean isComponentUsedByValidator(JAXXCompiler compiler,
String componentId)
compiler - compiler to usecomponentId - the compiled object to test
true if the given compiled object is attached to
a validator, false otherwisepublic static List<BeanValidatorHandler.CompiledBeanValidator> getValidators(JAXXCompiler compiler)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||