|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.mindmatters.faces.spring.context.support.ManagedBeanDefinitionParser
Faces implementation of the
XmlBeanDefinitionParser
interface. Parses bean definitions according to the "faces-config" DTD.
Tries to build and register bean definitions of type
ManagedBeanDefinition
parsed from the "managed-bean"-elements. Futhermode this parser is able to
parse definitions according to the spring beans DTD and the jsf-spring beans
DTD. That is done by delegation to the
ScopedBeanDefinitionParser
.
MessageSource
application
scope defined in the faces
configuration file in the "managed-bean-scope" tag is interpreted as
singleton
ManagedBeanDefinition
Nested Class Summary | |
static class |
ManagedBeanDefinitionParser.FacesHierarchicalMessageSource
JSF implementation of a HierarchicalMessageSource . |
Field Summary | |
static java.lang.String |
BEAN_ELEMENT
<managed-bean></managed-bean> element. |
static java.lang.String |
CLASS_ELEMENT
<managed-bean-class></managed-bean-class> element. |
static java.lang.String |
DEFAULT_LOCALE_ELEMENT
<default-locale></default-locale> element. |
static java.lang.String |
ID_ATTRIBUTE
id attribute of the <managed-bean></managed-bean> element. |
static java.lang.String |
KEY_CLASS_ELEMENT
<key-class></key-class> element. |
static java.lang.String |
KEY_ELEMENT
<key></key> element. |
static java.lang.String |
LIST_ENTRIES_ELEMENT
<list-entries></list-entries> element. |
static java.lang.String |
LOCALE_CONFIG_ELEMENT
<locale-config></locale-config> element. |
protected org.apache.commons.logging.Log |
logger
For logging. |
static java.lang.String |
MAP_ENTRIES_ELEMENT
<map-entries></map-entries> element. |
static java.lang.String |
MAP_ENTRY_ELEMENT
<map-entry></map-entry> element. |
static java.lang.String |
MESSAGE_BUNDLE_ELEMENT
<message-bundle></message-bundle> element. |
static java.lang.String |
NAME_ELEMENT
<managed-bean-name></managed-bean-name> element. |
static java.lang.String |
NULL_VALUE_ELEMENT
<null-value></null-value> element. |
static java.lang.String |
PROPERTY_CLASS_ELEMENT
<property-class></property-class> element. |
static java.lang.String |
PROPERTY_ELEMENT
<managed-property></managed-property> element. |
static java.lang.String |
PROPERTY_NAME_ELEMENT
<property-name></property-name> element. |
static java.lang.String |
ROOT_ELEMENT
<faces-config></faces-config> element. |
static java.lang.String |
SCOPE_ELEMENT
<managed-bean-scope></managed-bean-scope> element. |
static java.lang.String |
SUPPORTED_LOCALE_ELEMENT
<supported-locale></supported-locale> element. |
static java.lang.String |
VALUE_CLASS_ELEMENT
<value-class></value-class> element. |
static java.lang.String |
VALUE_ELEMENT
<value></value> element. |
Constructor Summary | |
ManagedBeanDefinitionParser()
|
Method Summary | |
protected void |
addSupportedLocales(ManagedList supportedLocales,
org.w3c.dom.Element localeConfigElement,
java.lang.String beanName)
Adds the supported locales to the MessageResource
definition defined as a "locale-config" tag in the "faces-config.xml". |
protected ScopedBeanDefinitionParser |
createScopedBeanDefinitionParser()
|
protected java.lang.String |
getDefaultLocale(org.w3c.dom.Element localeConfigElement,
java.lang.String beanName)
Parses and returns the default locale from the given locale config DOM element. |
protected ManagedBeanDefinition |
parseManagedBeanDefinition(org.w3c.dom.Element element,
java.lang.String beanName)
Parses a standard faces managed bean definition. |
protected PropertyValue |
parseManagedBeanListEntries(org.w3c.dom.Element element,
java.lang.String beanName)
Parses list-entries subelements of the given MANAGED-BEAN element. |
protected PropertyValue |
parseManagedBeanMapEntries(org.w3c.dom.Element element,
java.lang.String beanName)
Parses map-entries subelements of the given MANAGED-BEAN element. |
protected void |
parseManagedBeanPropertyDefinition(MutablePropertyValues propertyValues,
org.w3c.dom.Element element,
java.lang.String beanName)
Parses a managed-property. |
int |
registerBeanDefinitions(BeanDefinitionReader reader,
org.w3c.dom.Document doc,
Resource xmlResource)
|
protected int |
registerFacesBeanDefinitions(org.w3c.dom.Document doc)
Parses bean definitions from the given DOM document, and register them with the given bean factory. |
protected void |
registerManagedBeanDefinition(org.w3c.dom.Element element)
Parses an element definition: We know this is a MANAGED-BEAN element. |
protected void |
registerMessageBeanDefinitions(org.w3c.dom.NodeList messageBundleElements,
org.w3c.dom.NodeList localeConfigElements)
Loads the MessageSource definition as a
RootBeanDefinition
defined in the "faces-config.xml" as a "message-bundle" tag. |
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 ROOT_ELEMENT
public static final java.lang.String MESSAGE_BUNDLE_ELEMENT
public static final java.lang.String LOCALE_CONFIG_ELEMENT
public static final java.lang.String DEFAULT_LOCALE_ELEMENT
public static final java.lang.String SUPPORTED_LOCALE_ELEMENT
public static final java.lang.String BEAN_ELEMENT
public static final java.lang.String ID_ATTRIBUTE
public static final java.lang.String NAME_ELEMENT
public static final java.lang.String CLASS_ELEMENT
public static final java.lang.String SCOPE_ELEMENT
public static final java.lang.String PROPERTY_ELEMENT
public static final java.lang.String PROPERTY_NAME_ELEMENT
public static final java.lang.String PROPERTY_CLASS_ELEMENT
public static final java.lang.String VALUE_ELEMENT
public static final java.lang.String VALUE_CLASS_ELEMENT
public static final java.lang.String NULL_VALUE_ELEMENT
public static final java.lang.String MAP_ENTRIES_ELEMENT
public static final java.lang.String MAP_ENTRY_ELEMENT
public static final java.lang.String KEY_ELEMENT
public static final java.lang.String KEY_CLASS_ELEMENT
public static final java.lang.String LIST_ENTRIES_ELEMENT
protected final org.apache.commons.logging.Log logger
Constructor Detail |
public ManagedBeanDefinitionParser()
Method Detail |
public final int registerBeanDefinitions(BeanDefinitionReader reader, org.w3c.dom.Document doc, Resource xmlResource)
registerBeanDefinitions
in interface XmlBeanDefinitionParser
protected ScopedBeanDefinitionParser createScopedBeanDefinitionParser()
ScopedBeanDefinitionParser
for parsing definitions
according to the spring beans DTD and the jsf-spring beans DTDprotected int registerFacesBeanDefinitions(org.w3c.dom.Document doc)
doc
- the DOM document
BeanDefinitionStoreException
- in case of parsing errorsprotected void registerManagedBeanDefinition(org.w3c.dom.Element element)
element
- the DOM element representing a MANAGED-BEANprotected ManagedBeanDefinition parseManagedBeanDefinition(org.w3c.dom.Element element, java.lang.String beanName)
element
- the DOM element representing a MANAGED-BEANbeanName
- the name of the bean represented by the delivered
BeanDefinition
ManagedBeanDefinition
protected PropertyValue parseManagedBeanListEntries(org.w3c.dom.Element element, java.lang.String beanName)
element
- the DOM element representing a MANAGED-BEAN elementbeanName
- the name of the bean represented by the delivered
BeanDefinition
PropertyValue
protected PropertyValue parseManagedBeanMapEntries(org.w3c.dom.Element element, java.lang.String beanName)
element
- the DOM element representing a MANAGED-BEAN elementbeanName
- the name of the bean represented by the delivered
BeanDefinition
PropertyValue
protected void parseManagedBeanPropertyDefinition(MutablePropertyValues propertyValues, org.w3c.dom.Element element, java.lang.String beanName)
propertyValues
- MutablePropertyValues representing the properties defined for
this managed bean definitionelement
- the managed property definitionbeanName
- the name of the bean represented by the delivered
BeanDefinitionprotected void registerMessageBeanDefinitions(org.w3c.dom.NodeList messageBundleElements, org.w3c.dom.NodeList localeConfigElements)
MessageSource
definition as a
RootBeanDefinition
defined in the "faces-config.xml" as a "message-bundle" tag.
messageBundleElements
- the DOM nodelist representing message bundle definitionslocaleConfigElements
- the DOM nodelist representing locale config definitionsprotected void addSupportedLocales(ManagedList supportedLocales, org.w3c.dom.Element localeConfigElement, java.lang.String beanName)
MessageResource
definition defined as a "locale-config" tag in the "faces-config.xml".
supportedLocales
- the locale definitions to supportlocaleConfigElement
- the DOM element representing a locale config definitionbeanName
- the name of the bean represented by the delivered
BeanDefinitionprotected java.lang.String getDefaultLocale(org.w3c.dom.Element localeConfigElement, java.lang.String beanName)
localeConfigElement
- the DOM element representing the locale config definitionbeanName
- the name of the bean represented by the delivered
BeanDefinition
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |