|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.jelly.TagSupport
net.sf.jguiraffe.gui.builder.di.tags.AbstractBeanTag
public abstract class AbstractBeanTag
An abstract base class for tag handler implementations that create bean providers.
This class provides some common functionality related to the creation and
management of objects. The features
implemented here include the following:
BeanProvider
store attribute is implemented for selecting the bean
store, in which to store the provider created by this tag. Alternatively the
tag can be nested inside a BeanStoreTag.createBeanProvider() method is declared. Here
concrete subclasses have to implement the creation of their bean provider.
| Field Summary |
|---|
| Fields inherited from class org.apache.commons.jelly.TagSupport |
|---|
body, context, hasTrimmed, parent, shouldTrim |
| Constructor Summary | |
|---|---|
AbstractBeanTag()
|
|
| Method Summary | |
|---|---|
protected abstract BeanProvider |
createBeanProvider()
Creates the bean provider defined by this tag. |
void |
doTag(org.apache.commons.jelly.XMLOutput output)
The main method of this tag. |
BeanStoreTag |
getBeanStoreTag()
Returns a reference to the enclosing BeanStoreTag. |
java.lang.String |
getName()
Returns the name of the managed bean definition. |
java.lang.String |
getStore()
Returns the name of the BeanStore, in which to place the
managed bean definition. |
DependencyTag |
getTargetDependency()
Returns the target dependency. |
boolean |
isAnonymous()
Returns a flag whether this tag declares an anonymous bean. |
protected void |
process()
Processes this tag after its body has been evaluated. |
protected void |
processBeforeBody()
Performs pre-processing before the body of this tag is evaluated. |
protected void |
setBeanStoreTag(BeanStoreTag beanStoreTag)
Sets the reference to the enclosing BeanStoreTag. |
void |
setStore(java.lang.String store)
Set method of the store attribute. |
protected void |
store(BeanProvider provider)
Stores the newly created BeanProvider in the correct bean
store. |
| Methods inherited from class org.apache.commons.jelly.TagSupport |
|---|
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractBeanTag()
| Method Detail |
|---|
public java.lang.String getName()
BeanProvider created by this tag is stored in a
BeanStore. In this base implementation the name is only
queried to distinguish whether this is a normal or an anonymous bean
definition. getName() always returns null here; if
derived classes support setting a name, they must override this method.
public java.lang.String getStore()
BeanStore, in which to place the
managed bean definition.
public void setStore(java.lang.String store)
store - the attribute's valuepublic BeanStoreTag getBeanStoreTag()
BeanStoreTag. This can
be null if there is no such tag.
public DependencyTag getTargetDependency()
public boolean isAnonymous()
public void doTag(org.apache.commons.jelly.XMLOutput output)
throws org.apache.commons.jelly.JellyTagException
output - the output object
org.apache.commons.jelly.JellyTagException - if an error occurs or the tag is incorrectly
usedprotected void setBeanStoreTag(BeanStoreTag beanStoreTag)
BeanStoreTag. This can
be null if this tag is not placed in the body of a bean store tag.
beanStoreTag - the enclosing BeanStoreTag
protected void processBeforeBody()
throws org.apache.commons.jelly.JellyTagException
doTag() method. It checks whether
this tag is nested inside a DependencyTag, which
will become the target dependency, i.e. if this is an anonymous bean
declaration, the target dependency will be initialized to point to this
bean.
org.apache.commons.jelly.JellyTagException - if no name is defined for this tag, but no
target dependency can be obtained or the target dependency is
already initialized
protected void process()
throws org.apache.commons.jelly.JellyTagException
org.apache.commons.jelly.JellyTagException - if the tag is incorrectly used
protected void store(BeanProvider provider)
throws org.apache.commons.jelly.JellyTagException
BeanProvider in the correct bean
store. This method is called by process() when a provider
could be successfully created.
provider - the newly created bean provider
org.apache.commons.jelly.JellyTagException - if an error occurs
protected abstract BeanProvider createBeanProvider()
throws org.apache.commons.jelly.JellyTagException
process(). A concrete subclass has to implement it and
return a BeanProvider, which will be stored in the selected
bean store.
org.apache.commons.jelly.JellyTagException - in case of an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||