1 16 package org.apache.cocoon.webapps.session.context; 17 18 import java.io.IOException ; 19 import java.io.Serializable ; 20 21 import org.w3c.dom.DocumentFragment ; 22 import org.w3c.dom.Node ; 23 import org.w3c.dom.NodeList ; 24 25 import org.xml.sax.SAXException ; 26 import org.xml.sax.ContentHandler ; 27 import org.xml.sax.ext.LexicalHandler ; 28 import org.apache.excalibur.source.SourceParameters; 29 import org.apache.cocoon.ProcessingException; 30 31 44 public interface SessionContext 45 extends Serializable { 46 47 51 void setup(String value, String loadResource, String saveResource); 52 53 56 String getName(); 57 58 64 DocumentFragment getXML(String path) 65 throws ProcessingException ; 66 67 74 void setXML(String path, DocumentFragment fragment) 75 throws ProcessingException; 76 77 85 void appendXML(String path, DocumentFragment fragment) 86 throws ProcessingException; 87 88 94 void removeXML(String path) 95 throws ProcessingException; 96 97 104 void setAttribute(String key, Object value) 105 throws ProcessingException; 106 107 111 Object getAttribute(String key) 112 throws ProcessingException; 113 114 119 Object getAttribute(String key, Object defaultObject) 120 throws ProcessingException; 121 122 126 Node getSingleNode(String path) 127 throws ProcessingException; 128 129 132 NodeList getNodeList(String path) 133 throws ProcessingException; 134 135 138 void setNode(String path, Node node) 139 throws ProcessingException; 140 141 146 String getValueOfNode(String path) 147 throws ProcessingException; 148 149 154 void setValueOfNode(String path, String value) 155 throws ProcessingException; 156 157 164 boolean streamXML(String path, 165 ContentHandler contentHandler, 166 LexicalHandler lexicalHandler) 167 throws SAXException , ProcessingException; 168 169 174 void loadXML(String path, 175 SourceParameters parameters) 176 throws SAXException , ProcessingException, IOException ; 177 178 183 void saveXML(String path, 184 SourceParameters parameters) 185 throws SAXException , ProcessingException, IOException ; 186 } 187 | Popular Tags |