|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.javalid.core.config.JvConfiguration
public class JvConfiguration
This class is responsible for loading the xml configuration file(s) and create a valid configuration from it. The loading process is initialized directly from the constructor, hence only 1 instance of this class is needed normally.
The class loads the core configuration xml file only, any config files related to extensionsMap are loaded by the extensionsMap themselves, this class only kicks them off in that case.
| Field Summary | |
|---|---|
static java.lang.String |
EXTENSION_DATABASE_NAME
Name of the database extension. |
static java.lang.String |
EXTENSION_JSF_NAME
Name of the jsf extension. |
static java.lang.String |
EXTENSION_SPRING_NAME
Name of the spring extension. |
static java.lang.String |
JV_CONFIG_DEFAULT_FILE
Default configuration file that ships in the core jar file and used by AnnotationValidatorImpl by default if not told otherwise. |
| Constructor Summary | |
|---|---|
JvConfiguration(java.lang.String xmlConfigFile,
AnnotationValidator validator)
Construct this configuration by xmlConfigFile and reference to the validator this config is for. |
|
| Method Summary | |
|---|---|
void |
callExtensionsAfterValidation(JvConfigurationWrapper wrapper)
Calls the afterValidation(..) method on each extension |
void |
callExtensionsBeforeValidation(JvConfigurationWrapper wrapper)
Calls the beforeValidation(..) method on each extension |
void |
callExtensionsConfigurationLoadingComplete(JvConfigurationWrapper wrapper)
Calls the configurationLoadingComplete(..) method on each extension |
JvConfigurationWrapper |
getConfigWrapper()
Gets a new configuration wrapper for this configuration. |
javax.el.ELContext |
getELContext()
Returns the context that is used by the framework. |
javax.el.ExpressionFactory |
getExpressionFactory()
Returns a new ExpressionFactory to use |
JavalidExtension |
getExtension(java.lang.String nameExtension)
Returns the extension for given name if found, null otherwise. |
JavalidValidator |
getImplementationClassForAnnotation(java.lang.String className)
Checks the map containing the annotation implementations supported by the framework. |
java.lang.String[] |
getProxyRecognizers()
Returns all names to recognize a classname as a proxied object (only valid if isCheckForProxy() returns true, else this returns null). |
protected void |
init(java.lang.String xmlConfigFile)
|
boolean |
isCheckAnnotationsOnMethods()
Returns true if annotations must be checked on methods, if false fields must be used. |
boolean |
isCheckForProxy()
Return true if classes should check the parent class for an annotation (method annotations e.g) if not found on the current method/class. |
boolean |
isExtensionLoaded(java.lang.String nameExtension)
Returns true if an extension under given name is loaded, false otherwise. |
boolean |
isImplementationClassAvailableForAnnotation(java.lang.String className)
Returns true if for given fully qualified classname of an annotation, a validator is available |
boolean |
isPluralAnnotationSupported(java.lang.String className)
Returns true if given plural annotation is supported. |
java.lang.Object |
lookupBean(java.lang.String beanLookupName)
Locates given beanName and returns bean instance if found. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String JV_CONFIG_DEFAULT_FILE
public static final java.lang.String EXTENSION_SPRING_NAME
public static final java.lang.String EXTENSION_JSF_NAME
public static final java.lang.String EXTENSION_DATABASE_NAME
| Constructor Detail |
|---|
public JvConfiguration(java.lang.String xmlConfigFile,
AnnotationValidator validator)
throws JavalidException
xmlConfigFile - The configuration filevalidator - The validator
JavalidException - Raised if loading fails| Method Detail |
|---|
protected void init(java.lang.String xmlConfigFile)
throws JavalidException
JavalidException
public JavalidValidator getImplementationClassForAnnotation(java.lang.String className)
throws JavalidException
className - Fully qualified annotation class name to check
JavalidException - Raised if no implementation class was foundpublic boolean isImplementationClassAvailableForAnnotation(java.lang.String className)
className - The fully qualified classname of an annotation
public boolean isPluralAnnotationSupported(java.lang.String className)
className - The annotation classname to check
public java.lang.Object lookupBean(java.lang.String beanLookupName)
beanLookupName - The beanName to lookup
public boolean isExtensionLoaded(java.lang.String nameExtension)
nameExtension - The name of the extension
public JavalidExtension getExtension(java.lang.String nameExtension)
nameExtension - The name of the extension.
public void callExtensionsBeforeValidation(JvConfigurationWrapper wrapper)
wrapper - The config wrapperpublic void callExtensionsAfterValidation(JvConfigurationWrapper wrapper)
wrapper - The config wrapperpublic void callExtensionsConfigurationLoadingComplete(JvConfigurationWrapper wrapper)
wrapper - The config wrapperpublic JvConfigurationWrapper getConfigWrapper()
public boolean isCheckForProxy()
public boolean isCheckAnnotationsOnMethods()
public java.lang.String[] getProxyRecognizers()
public javax.el.ELContext getELContext()
public javax.el.ExpressionFactory getExpressionFactory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||