org.ujac.print
Class DefaultTagBuilder

java.lang.Object
  extended by org.ujac.print.DefaultTagBuilder
All Implemented Interfaces:
TagBuilder

public class DefaultTagBuilder
extends Object
implements TagBuilder

Name: DefaultTagBuilder
Description: The default TagBuilder implementation.
builds a document tag by simply creating an instance of the specified class, which has to be a sub class of BaseDocumentTag of course.

Author:
lauerc

Field Summary
 
Fields inherited from interface org.ujac.print.TagBuilder
ATTR_TAG_NAME
 
Constructor Summary
DefaultTagBuilder(String name, Class clazz)
          Constructs a DefaultTagBuilder instance with specific attributes.
 
Method Summary
 BaseDocumentTag createTag(DocumentHandler documentHandler)
          Creates a new tag.
 Collection getAliases()
          Gets all registered aliases.
 String getName()
          Gets the name of the tags, this builder creates.
 void registerAlias(String alias)
          Registers an alias for this tag.
 void unregisterAlias(String alias)
          Unregisters an alias for this tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTagBuilder

public DefaultTagBuilder(String name,
                         Class clazz)
Constructs a DefaultTagBuilder instance with specific attributes.

Parameters:
name - The name of the tag.
clazz - The class of the tag for which to build instances.
Method Detail

getName

public String getName()
Description copied from interface: TagBuilder
Gets the name of the tags, this builder creates.

Specified by:
getName in interface TagBuilder
Returns:
The name of the tags, this builder creates.
See Also:
TagBuilder.getName()

createTag

public BaseDocumentTag createTag(DocumentHandler documentHandler)
                          throws TagInstantiationException
Description copied from interface: TagBuilder
Creates a new tag.

Specified by:
createTag in interface TagBuilder
Parameters:
documentHandler - The document handler for which to create the tag instance.
Returns:
The created tag.
Throws:
TagInstantiationException - In case the tag instantiation failed.
See Also:
TagBuilder.createTag(DocumentHandler)

registerAlias

public void registerAlias(String alias)
Registers an alias for this tag.

Specified by:
registerAlias in interface TagBuilder
Parameters:
alias - The alias to register.

unregisterAlias

public void unregisterAlias(String alias)
Unregisters an alias for this tag.

Specified by:
unregisterAlias in interface TagBuilder
Parameters:
alias - The alias to unregister.

getAliases

public Collection getAliases()
Gets all registered aliases.

Specified by:
getAliases in interface TagBuilder
Returns:
The registered aliases.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.