Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.jelly.impl
Class DynamicTagLibrary

    java.lang.Object
      org.apache.commons.jelly.TagLibrary
          org.apache.commons.jelly.impl.DynamicTagLibrary

    public class DynamicTagLibrary

extends TagLibrary

`DynamicTagLibrary` represents a TagLibrary which gets created by running a Jelly script.

Version:
  $Revision: 155420 $
Author:
  James Strachan

Constructor Summary
`DynamicTagLibrary()`
`DynamicTagLibrary(java.lang.String uri)`

Method Summary
`Tag` | `createTag(java.lang.String name, org.xml.sax.Attributes attributes)` Creates a new Tag for the given tag name if it exists
`TagScript` | `createTagScript(java.lang.String name, org.xml.sax.Attributes attributes)` Creates a new script to execute the given tag name and attributes
`DynamicTagLibrary` | `find(java.lang.String name)` Returns the tag library instance which contains the named tag.
`Script` | `getDynamicTag(java.lang.String name)` Returns the script associated with the given tag name
`TagLibrary` | `getParent()` Returns the parent library which will be used to resolve unknown tags.
`java.lang.String` | `getUri()`
`void` | `registerBeanTag(java.lang.String name, TagFactory factory)` Creates a new Jelly Bean Tag with the given name
`void` | `registerDynamicTag(java.lang.String name, Script template)` Creates a new tag with the given name and template
`void` | `setParent(TagLibrary parent)` Sets the parent to inherit tags from that are not defined in this library.
`void` | `setUri(java.lang.String uri)`

Methods inherited from class org.apache.commons.jelly.TagLibrary
`createExpression, getExpressionFactory, getTagClasses, registerTag, registerTagFactory`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DynamicTagLibrary

    public DynamicTagLibrary()

### DynamicTagLibrary

    public DynamicTagLibrary(java.lang.String uri)

Method Detail

### createTagScript

    public TagScript createTagScript(java.lang.String name,
                                     org.xml.sax.Attributes attributes)
                              throws JellyException

  Creates a new script to execute the given tag name and attributes

  Overrides:
    `createTagScript` in class `TagLibrary`
  Throws:
    `JellyException`

### createTag

    public Tag createTag(java.lang.String name,
                         org.xml.sax.Attributes attributes)
                  throws JellyException

  Creates a new Tag for the given tag name if it exists

  Overrides:
    `createTag` in class `TagLibrary`
  Throws:
    `JellyException`

### registerDynamicTag

    public void registerDynamicTag(java.lang.String name,
                                   Script template)

  Creates a new tag with the given name and template

### registerBeanTag

    public void registerBeanTag(java.lang.String name,
                                TagFactory factory)

  Creates a new Jelly Bean Tag with the given name

### getDynamicTag

    public Script getDynamicTag(java.lang.String name)

  Returns the script associated with the given tag name

  Parameters:
    `name` - The tag name
  Returns:
    The script associated with `name`, or `null` if the tag doesn't exist or isn't a script

### find

    public DynamicTagLibrary find(java.lang.String name)

  Returns the tag library instance which contains the named tag.

  If the tag is not registered within this library, the set of parent libraries will be searched.

  Parameters:
    `name` - The tag name
  Returns:
    The tag library containing the named tag, or `null` if the tag is not registered.

### getUri

    public java.lang.String getUri()

### setUri

    public void setUri(java.lang.String uri)

### getParent

    public TagLibrary getParent()

  Returns the parent library which will be used to resolve unknown tags.

  Returns:
    TagLibrary

### setParent

    public void setParent(TagLibrary parent)

  Sets the parent to inherit tags from that are not defined in this library.

  Parameters:
    `parent` - The parent to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2005 Apache Software Foundation. All Rights Reserved.