net.sf.jett.tag
Class TagLibraryRegistry

java.lang.Object
  extended by net.sf.jett.tag.TagLibraryRegistry

public class TagLibraryRegistry
extends java.lang.Object

A TagLibraryRegistry represents a registry for all TagLibraries containing Tags.

Author:
Randy Gettman

Constructor Summary
TagLibraryRegistry()
          Construct a TagLibraryRegistry.
 
Method Summary
 Tag createTag(TagParser parser, TagContext context, WorkbookContext workbookContext)
          Creates a Tag, looking in a specific namespace for a class matching a specific tag name.
 void registerTagLibrary(java.lang.String namespace, TagLibrary library)
          Add the given TagLibrary to the registry, associated with the given namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagLibraryRegistry

public TagLibraryRegistry()
Construct a TagLibraryRegistry.

Method Detail

registerTagLibrary

public void registerTagLibrary(java.lang.String namespace,
                               TagLibrary library)
Add the given TagLibrary to the registry, associated with the given namespace.

Parameters:
namespace - The namespace.
library - The TagLibrary to register.
Throws:
java.lang.IllegalArgumentException - If the namespace has already been registered.

createTag

public Tag createTag(TagParser parser,
                     TagContext context,
                     WorkbookContext workbookContext)
Creates a Tag, looking in a specific namespace for a class matching a specific tag name. The given TagParser supplies the namespace, the tag name, and the attributes. If found, this creates the Tag and gives it the given TagContext, else it returns null.

Parameters:
parser - A TagParser that has parsed tag text.
context - The TagContext.
workbookContext - The WorkbookContext.
Returns:
A new Tag, or null if it couldn't be created.
Throws:
TagParseException - If there was a problem instantiating the desired Tag.


Copyright © 2012-2013 Jett Team. All Rights Reserved.