JSF-Spring

de.mindmatters.faces.spring.factory.aspectj
Class JsfBeanDefinitionParserUtils

java.lang.Object
  extended by de.mindmatters.faces.spring.factory.aspectj.JsfBeanDefinitionParserUtils

public final class JsfBeanDefinitionParserUtils
extends java.lang.Object

Miscellaneous parser utility methods for the 'jsh' namespace. Mainly for internal use within the framework.

Author:
Andreas Kuhrwahl

Nested Class Summary
static interface JsfBeanDefinitionParserUtils.UIComponentExtension
          Interface that will be implemented by the UIComponent subclasses generated by the SubclassCreator.
 
Field Summary
static java.lang.String ATTRIBUTE_ELEMENT
          The <attribute></attribute> element.
static java.lang.String CLASS_ATTRIBUTE
          The 'class' attribute of a bean definition.
static java.lang.String COMPONENT_ELEMENT
          The <component></component> element.
static java.lang.String COMPONENT_REF_ELEMENT
          The <component-ref></component-ref> element.
static java.lang.String COMPONENT_TYPE_ATTRIBUTE
          The 'component-type' attribute of a Renderer definition.
static java.lang.String FACET_ELEMENT
          The <facet></facet> element.
static java.lang.String FACET_REF_ELEMENT
          The <facet-ref></facet-ref> element.
static java.lang.String FOR_CLASS_ATTRIBUTE
          The 'for-class' attribute of a Converter definition.
static java.lang.String ID_ATTRIBUTE
          The 'id' attribute of a bean definition.
static java.lang.String NAME_ATTRIBUTE
          The 'name' attribute of a bean definition.
static java.lang.String TYPE_ATTRIBUTE
          The 'type' attribute of a UIComponent definition.
 
Method Summary
static java.lang.Class createComponentClass(java.lang.String originalClassName, java.lang.Class targetSuperClass, ParserContext parserContext)
          Generates a subclass of the given ui component class name originalClassName with a special naming policy via CGLib.
static java.lang.Class createExtendedUIComponentClass(java.lang.String originalClassName, ParserContext parserContext)
          Generates a subclass of the given UIComponent class with name originalClassName which implements the interface JsfBeanDefinitionParserUtils.UIComponentExtension.
static java.lang.Class resolveBeanClass(org.w3c.dom.Element element, AbstractBeanDefinition bd, ParserContext parserContext)
          Determine the class of the wrapped bean of the given AbstractBeanDefinition bd, if the bean definition has a bean class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_ATTRIBUTE

public static final java.lang.String ID_ATTRIBUTE
The 'id' attribute of a bean definition.

See Also:
Constant Field Values

FOR_CLASS_ATTRIBUTE

public static final java.lang.String FOR_CLASS_ATTRIBUTE
The 'for-class' attribute of a Converter definition.

See Also:
Constant Field Values

CLASS_ATTRIBUTE

public static final java.lang.String CLASS_ATTRIBUTE
The 'class' attribute of a bean definition.

See Also:
Constant Field Values

NAME_ATTRIBUTE

public static final java.lang.String NAME_ATTRIBUTE
The 'name' attribute of a bean definition.

See Also:
Constant Field Values

TYPE_ATTRIBUTE

public static final java.lang.String TYPE_ATTRIBUTE
The 'type' attribute of a UIComponent definition.

See Also:
Constant Field Values

ATTRIBUTE_ELEMENT

public static final java.lang.String ATTRIBUTE_ELEMENT
The <attribute></attribute> element.

See Also:
Constant Field Values

COMPONENT_ELEMENT

public static final java.lang.String COMPONENT_ELEMENT
The <component></component> element.

See Also:
Constant Field Values

COMPONENT_REF_ELEMENT

public static final java.lang.String COMPONENT_REF_ELEMENT
The <component-ref></component-ref> element.

See Also:
Constant Field Values

FACET_ELEMENT

public static final java.lang.String FACET_ELEMENT
The <facet></facet> element.

See Also:
Constant Field Values

FACET_REF_ELEMENT

public static final java.lang.String FACET_REF_ELEMENT
The <facet-ref></facet-ref> element.

See Also:
Constant Field Values

COMPONENT_TYPE_ATTRIBUTE

public static final java.lang.String COMPONENT_TYPE_ATTRIBUTE
The 'component-type' attribute of a Renderer definition.

See Also:
Constant Field Values
Method Detail

createComponentClass

public static java.lang.Class createComponentClass(java.lang.String originalClassName,
                                                   java.lang.Class targetSuperClass,
                                                   ParserContext parserContext)
Generates a subclass of the given ui component class name originalClassName with a special naming policy via CGLib. Valid component types are Validator, UIComponent and Converter.

Parameters:
originalClassName - the original class name of the component
targetSuperClass - UIComponent.class, Converter.class or Validator.class
parserContext - the ParserContext
Returns:
the generated subclass with a special unique JSF-Spring name.

createExtendedUIComponentClass

public static java.lang.Class createExtendedUIComponentClass(java.lang.String originalClassName,
                                                             ParserContext parserContext)
Generates a subclass of the given UIComponent class with name originalClassName which implements the interface JsfBeanDefinitionParserUtils.UIComponentExtension.

Parameters:
originalClassName - th class name of the component
parserContext - the ParserContext
Returns:
the via CGLib generated extended class

resolveBeanClass

public static java.lang.Class resolveBeanClass(org.w3c.dom.Element element,
                                               AbstractBeanDefinition bd,
                                               ParserContext parserContext)
Determine the class of the wrapped bean of the given AbstractBeanDefinition bd, if the bean definition has a bean class.

Parameters:
element - the Element representing the bean definition
bd - the bean definition
parserContext - the ParserContext
Returns:
the resolved bean class or null if the bean defintion has no bean class.

JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG