uk.co.lakesidetech.spxforms.web.bind.xforms.action
Class InsertXFormAction

java.lang.Object
  extended byuk.co.lakesidetech.spxforms.web.bind.xforms.action.InsertXFormAction
All Implemented Interfaces:
IXFormAction

public class InsertXFormAction
extends java.lang.Object
implements IXFormAction

Author:
Stuart Eccles

Constructor Summary
InsertXFormAction()
           
 
Method Summary
 void doAction(org.apache.commons.jxpath.JXPathContext jxpathcontext, java.lang.Object instance)
           
 org.w3c.dom.Node findNthChildNS(org.w3c.dom.Node contextNode, java.lang.String nsuri, java.lang.String tag, int idx)
          find the nth child in a parent for a namespace uri and local name part (equals "/tagName[idx]" in xpath)
 boolean isNodeInNS(org.w3c.dom.Node nodeToCompare, java.lang.String nsuri, java.lang.String tagName)
           
 void setParameters(java.util.Map parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertXFormAction

public InsertXFormAction()
Method Detail

setParameters

public void setParameters(java.util.Map parameters)
Specified by:
setParameters in interface IXFormAction
Parameters:
parameters -
See Also:
uk.co.lakesidetech.spxforms.web.bind.xforms.IXFormAction#setParameters(java.util.Map)

doAction

public void doAction(org.apache.commons.jxpath.JXPathContext jxpathcontext,
                     java.lang.Object instance)
Specified by:
doAction in interface IXFormAction
Parameters:
jxpathcontext -
instance -
See Also:
uk.co.lakesidetech.spxforms.web.bind.xforms.IXFormAction#doAction(org.apache.commons.jxpath.JXPathContext, java.lang.Object)

findNthChildNS

public org.w3c.dom.Node findNthChildNS(org.w3c.dom.Node contextNode,
                                       java.lang.String nsuri,
                                       java.lang.String tag,
                                       int idx)
find the nth child in a parent for a namespace uri and local name part (equals "/tagName[idx]" in xpath)

Parameters:
contextNode - the parent to search the child in
nsuri - the namespace uri of the child node
tag - the local name part of the child node
idx - the index to use (starting at one)
Returns:
the found child casted to Element or null if no such child was found.

isNodeInNS

public boolean isNodeInNS(org.w3c.dom.Node nodeToCompare,
                          java.lang.String nsuri,
                          java.lang.String tagName)