com.raritantechnologies.utils.tree.filter
Class CopyAttributesFilter

java.lang.Object
  extended bycom.raritantechnologies.utils.tree.filter.CopyAttributesFilter
All Implemented Interfaces:
IConfigurable, ITreeFilter, ITreeNodeFilter

public class CopyAttributesFilter
extends java.lang.Object
implements ITreeFilter, ITreeNodeFilter

Adds one or more fixed attributes to a TreeNode.

XML Configuration Template:
   <TreeNodeFilter class="com.raritantechnologies.utils.tree.filter.CopyAttributesFilter" >

     <!-- One or more Attribute tags: Attribute copy mode can be multi-value OR append OR prepend -->
     <Attribute name="[ source attribute ]" copyTo="[ destination attribute ]" 
                   multiple="[ true|false(default) ]"
                   append="[ true|false(default)  - if true, source attribute is appended to destination attribute ]"
                   prepend="[ true|false(default) - if true, source attribute is prepended to destination attribute ]" />

     <Attribute etc... />

     <!-- Can invoke a StringFilter prior to copying -->
     <Attribute name="[ source attribute ]" copyTo="[ destination attribute ]" 
                   multiple="[ true|false(default) ]"
                   append="[ true|false(default)  - if true, source attribute is appended to destination attribute ]"
                   prepend="[ true|false(default) - if true, source attribute is prepended to destination attribute ]" >

       <StringFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]" >

       </StringFilter>
     </Attribute>

   </TreeNodeFilter>
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Field Summary
 
Fields inherited from interface com.raritantechnologies.utils.tree.ITreeFilter
TEMPLATE
 
Fields inherited from interface com.raritantechnologies.utils.tree.filter.ITreeNodeFilter
TEMPLATE
 
Constructor Summary
CopyAttributesFilter()
           
 
Method Summary
 TreeNode filterNode(TreeNode treeNode, RaritanPageContext pageContext)
           
 TreeNode filterNode(TreeNode node, TreeRoot sourceTree, RaritanPageContext rpc)
           
 TreeRoot filterTree(TreeRoot tree, RaritanPageContext rpc)
          Filter (prune, add, modify etc.) a Tree object.
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyAttributesFilter

public CopyAttributesFilter()
Method Detail

filterTree

public TreeRoot filterTree(TreeRoot tree,
                           RaritanPageContext rpc)
Description copied from interface: ITreeFilter
Filter (prune, add, modify etc.) a Tree object.

Specified by:
filterTree in interface ITreeFilter

filterNode

public TreeNode filterNode(TreeNode node,
                           TreeRoot sourceTree,
                           RaritanPageContext rpc)
Specified by:
filterNode in interface ITreeFilter

filterNode

public TreeNode filterNode(TreeNode treeNode,
                           RaritanPageContext pageContext)
Specified by:
filterNode in interface ITreeNodeFilter

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable