org.jostraca.transform
Class TextualTransformSupport

java.lang.Object
  extended byorg.jostraca.transform.TextualTransformSupport
All Implemented Interfaces:
TextualTransform
Direct Known Subclasses:
AppendNewLineTransform, CollapseWhiteSpaceTransform, CropTransform, CStringEscapeTransform, ExpressionElementTransform, HTMLEscapeTransform, IdentityTransform, InsertSectionTransform, JavaStringEscapeTransform, OneLineTransform, PerlStringEscapeTransform, RebolStringEscapeTransform, RemoveExtraWhiteSpace, RemoveFirstBlankLineTransform, ReplaceTransform, ScriptElementTransform, SimpleIndentTransform, TextElementTransform, TrimTransform

public abstract class TextualTransformSupport
extends java.lang.Object
implements TextualTransform

Abstract class providing a support implementation of TextualTransform. Subclass to implement a TextualTransform.


Field Summary
protected  java.util.Hashtable iAttributes
           
protected  boolean iNeedsReparse
           
protected  java.lang.String iOpenScriptMarker
           
 
Fields inherited from interface org.jostraca.transform.TextualTransform
ATTR_sectionset, ATTR_unit_attr, ATTR_unit_origin, ATTR_unit_set, NEWLINE
 
Constructor Summary
TextualTransformSupport()
           
 
Method Summary
 boolean checkForReparse(java.lang.String pContent)
          Repares needed if pContent contains open script marker (default: <%)
 java.lang.String getName()
          Name of the transform
 boolean needsReparse()
          Request a reparse of the From text, as a script marker was inserted
 void setParameters(PropertySet pPropertySet)
          Set the parameters, if any, that this transform uses.
 void setParameters(PropertySet pPropertySet, java.util.Hashtable pAttributes)
          Set the parameters, if any, that this transform uses.
protected  void setParametersImpl(PropertySet pPropertySet)
           
abstract  java.lang.String transform(java.lang.String pFrom)
          Transform the supplied String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iNeedsReparse

protected boolean iNeedsReparse

iOpenScriptMarker

protected java.lang.String iOpenScriptMarker

iAttributes

protected java.util.Hashtable iAttributes
Constructor Detail

TextualTransformSupport

public TextualTransformSupport()
Method Detail

transform

public abstract java.lang.String transform(java.lang.String pFrom)
                                    throws TransformException
Description copied from interface: TextualTransform
Transform the supplied String. Return Standard.EMPTY as default in case of failure.

Specified by:
transform in interface TextualTransform
Parameters:
pFrom - String to transform. Assume non null.
Throws:
TransformException
See Also:
TextualTransform

setParameters

public void setParameters(PropertySet pPropertySet)
                   throws TransformException
Description copied from interface: TextualTransform
Set the parameters, if any, that this transform uses. Throw org.jostraca.transform.TextualTransformException if parameters are invalid.

Specified by:
setParameters in interface TextualTransform
Parameters:
pPropertySet - Parameters are taken from this PropertySet. Assume non null.
Throws:
TransformException
See Also:
TextualTransform

setParameters

public void setParameters(PropertySet pPropertySet,
                          java.util.Hashtable pAttributes)
                   throws TransformException
Description copied from interface: TextualTransform
Set the parameters, if any, that this transform uses. Throw org.jostraca.transform.TextualTransformException if parameters are invalid.

Specified by:
setParameters in interface TextualTransform
Parameters:
pPropertySet - parameters are taken from this PropertySet. Assume non null.
pAttributes - arbitrary parameter objects
Throws:
TransformException
See Also:
TextualTransform

needsReparse

public boolean needsReparse()
Description copied from interface: TextualTransform
Request a reparse of the From text, as a script marker was inserted

Specified by:
needsReparse in interface TextualTransform

getName

public java.lang.String getName()
Description copied from interface: TextualTransform
Name of the transform

Specified by:
getName in interface TextualTransform

checkForReparse

public boolean checkForReparse(java.lang.String pContent)
Repares needed if pContent contains open script marker (default: <%)


setParametersImpl

protected void setParametersImpl(PropertySet pPropertySet)
                          throws TransformException
Throws:
TransformException


Copyright © 2000-2002 Richard Rodger