org.xmlecho.palomar.core
Class ECHOContextImpl

java.lang.Object
  extended byorg.xmlecho.palomar.dom.NodeBase
      extended byorg.xmlecho.palomar.dom.ParentNode
          extended byorg.xmlecho.palomar.dom.NamespacedNode
              extended byorg.xmlecho.palomar.dom.ElementNode
                  extended byorg.xmlecho.palomar.core.DOMElementImpl
                      extended byorg.xmlecho.palomar.core.ECHORequestImpl
                          extended byorg.xmlecho.palomar.core.ECHORequestServerSide
                              extended byorg.xmlecho.palomar.core.NullTransformImpl
                                  extended byorg.xmlecho.palomar.core.ECHOContextImpl
All Implemented Interfaces:
ECHOContext, ECHORequest, org.w3c.dom.Element, org.xmlecho.palomar.dom.ElementEx, org.w3c.dom.Node, org.xmlecho.palomar.dom.NodeEx, org.w3c.dom.NodeList, org.xmlecho.palomar.dom.XmlWritable

public class ECHOContextImpl
extends NullTransformImpl
implements ECHOContext

Provides context information for the evaluation of XML ECHO commands. ECHOContext objects provide the ECHO processor the ability to pass parameters to the "eval()" method of nested ECHORequest command implementations. ECHOContext objects may contain a handle to a "parent" Context. If the requested key is not found in the requested context, it will attempt to find it in the parent context


Field Summary
 
Fields inherited from class org.xmlecho.palomar.core.ECHORequestServerSide
_logger, _sec, DEBUG
 
Fields inherited from class org.xmlecho.palomar.dom.ElementNode
_namespaceURI, name
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
ECHOContextImpl()
          constructor with no arguments, a top-level context
ECHOContextImpl(ECHOContext parent)
          constructor with a parent context.
 
Method Summary
 void doneParse()
          throw the params into our internal dictionary by key
 ECHOContext extend()
           
 java.lang.Object get(java.lang.String key)
           
static java.lang.Object getParamBindingValue(org.w3c.dom.Element e, ECHOContext context)
           
 java.lang.Object getRaw(java.lang.String key)
           
static java.lang.String parseAttributeExpr(java.lang.String val, ECHOContext ctx)
           
 void put(java.lang.String key, java.lang.Object value)
          stores the value in the local context
 void putDefault(java.lang.String key, java.lang.Object value)
          stores the default value in the local context
 java.lang.Object remove(java.lang.String key)
          removes an object from the context.
 void sendStackTrace(org.xml.sax.ContentHandler target)
          Provides an XML representation of all the bindings in the context, including all the ancestor contexts
 void setParentContext(ECHOContext parent)
          for delegating lookups
 
Methods inherited from class org.xmlecho.palomar.core.NullTransformImpl
eval
 
Methods inherited from class org.xmlecho.palomar.core.ECHORequestServerSide
addAttribute, endElement, errorResponse, evalBody, evalCopy, extendContext, getItem, getNamespacePrefix, getSecurityService, getSubRequest, getUser, log, startElement, startElement, writeException, writeException
 
Methods inherited from class org.xmlecho.palomar.core.ECHORequestImpl
eval, getURI
 
Methods inherited from class org.xmlecho.palomar.dom.ElementNode
appendChild, cloneNode, getAppSelectVal, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getIdAttributeName, getIndexOf, getInheritedAttribute, getLanguage, getLastChild, getLength, getLocalName, getLocation, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTagName, getUserObject, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, insertBefore, isReadonly, isSupported, item, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeWhiteSpaces, replaceChild, setAppSelectVal, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttributeName, setLocation, setNamespaceURI, setNodeValue, setPrefix, setReadonly, setTag, setUserObject, supports, toString, trimToSize, write, writeChildrenXml, writeXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 
Methods inherited from interface org.xmlecho.palomar.dom.NodeEx
getAppSelectVal, getIndexOf, getInheritedAttribute, getLanguage, isReadonly, setAppSelectVal
 
Methods inherited from interface org.xmlecho.palomar.dom.XmlWritable
writeChildrenXml
 

Constructor Detail

ECHOContextImpl

public ECHOContextImpl()
constructor with no arguments, a top-level context


ECHOContextImpl

public ECHOContextImpl(ECHOContext parent)
constructor with a parent context.

Method Detail

extend

public ECHOContext extend()
Specified by:
extend in interface ECHOContext

get

public java.lang.Object get(java.lang.String key)
Specified by:
get in interface ECHOContext
Parameters:
key - the name of the requested value
Returns:
the value identified by key if the object is of type String, performs an expression evaluation of the string and returns the result of evaluation

parseAttributeExpr

public static java.lang.String parseAttributeExpr(java.lang.String val,
                                                  ECHOContext ctx)

getRaw

public java.lang.Object getRaw(java.lang.String key)
Parameters:
key - the name of the requested value
Returns:
the value identified by key if the object is of type String, performs an expression evaluation of the string and returns the result of evaluation

sendStackTrace

public void sendStackTrace(org.xml.sax.ContentHandler target)
                    throws org.xml.sax.SAXException
Provides an XML representation of all the bindings in the context, including all the ancestor contexts

Specified by:
sendStackTrace in interface ECHOContext
Throws:
org.xml.sax.SAXException

put

public void put(java.lang.String key,
                java.lang.Object value)
stores the value in the local context

Specified by:
put in interface ECHOContext

remove

public java.lang.Object remove(java.lang.String key)
removes an object from the context.

Specified by:
remove in interface ECHOContext

putDefault

public void putDefault(java.lang.String key,
                       java.lang.Object value)
stores the default value in the local context


setParentContext

public void setParentContext(ECHOContext parent)
for delegating lookups

Specified by:
setParentContext in interface ECHOContext

doneParse

public void doneParse()
throw the params into our internal dictionary by key


getParamBindingValue

public static java.lang.Object getParamBindingValue(org.w3c.dom.Element e,
                                                    ECHOContext context)