jacquard 1.12.0 by The Web Engineering Factory and Toolworks

uk.co.weft.domutil
Class InvariantTextGenerator

java.lang.Object
  extended byuk.co.weft.htform.ResourceConsumerImpl
      extended byuk.co.weft.domutil.NodeGeneratorImpl
          extended byuk.co.weft.domutil.MaybeParseGenerator
              extended byuk.co.weft.domutil.ElementGenerator
                  extended byuk.co.weft.domutil.InvariantTextGenerator
All Implemented Interfaces:
NodeGenerator, ResourceConsumer

public class InvariantTextGenerator
extends ElementGenerator

A generator which always (modulo i18n changes) generates the same text, irrespective of the context

Version:
$Revision: 1.2.4.1 $
Author:
$author$

Field Summary
protected  java.lang.String cssClass
          the CSS class name I will use
protected  java.lang.String invariantContent
          the content which I will invariably generate
 
Fields inherited from class uk.co.weft.domutil.ElementGenerator
childrenAndContent, generators, keyname, mapping, storename, token
 
Fields inherited from class uk.co.weft.domutil.MaybeParseGenerator
embeddedMarkup
 
Fields inherited from class uk.co.weft.domutil.NodeGeneratorImpl
debug, name, namespaceURI
 
Fields inherited from class uk.co.weft.htform.ResourceConsumerImpl
resourceBundleName
 
Fields inherited from interface uk.co.weft.domutil.NodeGenerator
NAMESPACEURIMAGICTOKEN
 
Fields inherited from interface uk.co.weft.htform.ResourceConsumer
RESOURCEBUNDLEMAGICTOKEN
 
Constructor Summary
InvariantTextGenerator(java.lang.String content)
          Creates a new InvariantGenerator object.
 
Method Summary
 Node generate(Document doc, Context c)
          Generate a text element
 
Methods inherited from class uk.co.weft.domutil.ElementGenerator
addGenerator, doinit, fetchDetail, generate, generate, getTokenValue, init, register, setChildrenAndContent
 
Methods inherited from class uk.co.weft.domutil.MaybeParseGenerator
allowEmbeddedMarkup, maybeParse
 
Methods inherited from class uk.co.weft.domutil.NodeGeneratorImpl
getName, getNamespaceURI, setDebug, setNamespaceURI
 
Methods inherited from class uk.co.weft.htform.ResourceConsumerImpl
getContextOrResource, getResource, getResourceOrContext, getResourceString, grs, grs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.co.weft.domutil.NodeGenerator
getName, getNamespaceURI, setDebug
 

Field Detail

invariantContent

protected java.lang.String invariantContent
the content which I will invariably generate


cssClass

protected java.lang.String cssClass
the CSS class name I will use

Constructor Detail

InvariantTextGenerator

public InvariantTextGenerator(java.lang.String content)
Creates a new InvariantGenerator object.

Parameters:
content - the content of the element I will generate
Method Detail

generate

public Node generate(Document doc,
                     Context c)
              throws GenerationException,
                     DOMException
Generate a text element

Specified by:
generate in interface NodeGenerator
Overrides:
generate in class ElementGenerator
Parameters:
doc - the document within which the element is generated
c - the context in which the element is generated
Returns:
the generated element
Throws:
GenerationException - shouldn't happen
DOMException - if the underlying DOM implementeation throws and exception

jacquard 1.12.0 by The Web Engineering Factory and Toolworks