Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.jcorporate.expresso.core.security.filters
Class FilterTreeNode  view FilterTreeNode download FilterTreeNode.java

java.lang.Object
  extended bycom.jcorporate.expresso.core.security.filters.FilterTreeNode
All Implemented Interfaces:
java.io.Serializable

public class FilterTreeNode
extends java.lang.Object
implements java.io.Serializable

This class provides a "filter parse tree" interface to the system. It is a dual action object, it's a union of a node, and a leaf. Thus allowing us to play with TreeMap/HashMap quickly.

Please Note: This class is unsynchronized for performance reasons, please be careful when using in a multi-threaded environment outisde of the Filter class.


Field Summary
private  java.lang.String replacementString
           
private  java.util.HashMap subnodes
           
 
Constructor Summary
FilterTreeNode()
           
 
Method Summary
 void dumpNode()
          Dumps a printout of the node and subnodes to System.out
 void dumpNode(org.apache.log4j.Category log)
          Dumps the contents of the tree to the log.
 void dumpNode(com.jcorporate.expresso.kernel.util.FastStringBuffer stringBuffer, int depth)
          Dumps the contents of the tree to the log.
 java.lang.String getReplacementString()
           
 FilterTreeNode getSubnode(com.jcorporate.expresso.core.misc.ReusableChar key)
           
private  void padWithTabs(com.jcorporate.expresso.kernel.util.FastStringBuffer stringBuffer, int numTabs)
          Formatter helping function to pad in for each node.
 void setReplacementString(java.lang.String newReplacementString)
          Should be only called be the parse tree builder Set the replacement string that corresponds to this node
 void setSubnode(com.jcorporate.expresso.core.misc.ReusableChar key, FilterTreeNode newSubnode)
          Set a subnode based upon the character key.
 boolean subnodeExists(com.jcorporate.expresso.core.misc.ReusableChar key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

replacementString

private java.lang.String replacementString

subnodes

private java.util.HashMap subnodes
Constructor Detail

FilterTreeNode

public FilterTreeNode()
Method Detail

getReplacementString

public java.lang.String getReplacementString()

setReplacementString

public void setReplacementString(java.lang.String newReplacementString)
                          throws java.lang.Exception
Should be only called be the parse tree builder Set the replacement string that corresponds to this node


setSubnode

public void setSubnode(com.jcorporate.expresso.core.misc.ReusableChar key,
                       FilterTreeNode newSubnode)
                throws java.lang.Exception
Set a subnode based upon the character key. Should be only called by the parse tree builder.


subnodeExists

public boolean subnodeExists(com.jcorporate.expresso.core.misc.ReusableChar key)

getSubnode

public FilterTreeNode getSubnode(com.jcorporate.expresso.core.misc.ReusableChar key)

dumpNode

public void dumpNode(org.apache.log4j.Category log)
Dumps the contents of the tree to the log. (ie dumps this node and all subnodes.


dumpNode

public void dumpNode()
Dumps a printout of the node and subnodes to System.out


dumpNode

public void dumpNode(com.jcorporate.expresso.kernel.util.FastStringBuffer stringBuffer,
                     int depth)
Dumps the contents of the tree to the log. uses depth to format how many tabs in


padWithTabs

private void padWithTabs(com.jcorporate.expresso.kernel.util.FastStringBuffer stringBuffer,
                         int numTabs)
Formatter helping function to pad in for each node.