1 16 package org.apache.cocoon.environment.wrapper; 17 18 import java.io.IOException ; 19 import java.io.OutputStream ; 20 import java.net.MalformedURLException ; 21 import java.util.Enumeration ; 22 import java.util.Map ; 23 24 import org.apache.cocoon.ProcessingException; 25 import org.apache.cocoon.components.treeprocessor.sitemap.MountNode; 26 import org.apache.cocoon.environment.Environment; 27 import org.apache.cocoon.environment.Source; 28 import org.xml.sax.SAXException ; 29 30 44 public class MutableEnvironmentFacade implements Environment { 45 46 private EnvironmentWrapper env; 47 48 public MutableEnvironmentFacade(EnvironmentWrapper env) { 49 this.env = env; 50 env.setAttribute(MountNode.COCOON_PASS_THROUGH, Boolean.FALSE); 54 } 55 56 public EnvironmentWrapper getDelegate() { 57 return this.env; 58 } 59 60 public void setDelegate(EnvironmentWrapper env) { 61 this.env = env; 62 } 63 64 public void setURI(String prefix, String uri) { 67 this.env.setURI(prefix, uri); 68 } 69 70 public void setOutputStream(OutputStream os) { 71 this.env.setOutputStream(os); 72 } 73 74 public String getRedirectURL() { 76 return this.env.getRedirectURL(); 77 } 78 79 public void reset() { 80 this.env.reset(); 81 } 82 84 87 public String getURI() { 88 return env.getURI(); 89 } 90 91 94 public String getURIPrefix() { 95 return env.getURIPrefix(); 96 } 97 98 101 public String getRootContext() { 102 return env.getRootContext(); 103 } 104 105 108 public String getContext() { 109 return env.getContext(); 110 } 111 112 115 public String getView() { 116 return env.getView(); 117 } 118 119 122 public String getAction() { 123 return env.getAction(); 124 } 125 126 129 public void setContext(String prefix, String uri, String context) { 130 env.setContext(prefix, uri, context); 131 } 132 133 136 public void changeContext(String uriprefix, String context) throws Exception { 137 env.changeContext(uriprefix, context); 138 } 139 140 143 public void redirect(boolean sessionmode, String url) throws IOException { 144 env.redirect(sessionmode, url); 145 } 146 147 150 public void setContentType(String mimeType) { 151 env.setContentType(mimeType); 152 } 153 154 157 public String getContentType() { 158 return env.getContentType(); 159 } 160 161 164 public void setContentLength(int length) { 165 env.setContentLength(length); 166 } 167 168 171 public void setStatus(int statusCode) { 172 env.setStatus(statusCode); 173 } 174 175 178 public OutputStream getOutputStream() throws IOException { 179 return env.getOutputStream(); 180 } 181 182 185 public OutputStream getOutputStream(int bufferSize) throws IOException { 186 return env.getOutputStream(bufferSize); 187 } 188 189 192 public Map getObjectModel() { 193 return env.getObjectModel(); 194 } 195 196 199 public boolean isResponseModified(long lastModified) { 200 return env.isResponseModified(lastModified); 201 } 202 203 206 public void setResponseIsNotModified() { 207 env.setResponseIsNotModified(); 208 } 209 210 213 public void setAttribute(String name, Object value) { 214 env.setAttribute(name, value); 215 } 216 217 220 public Object getAttribute(String name) { 221 return env.getAttribute(name); 222 } 223 224 227 public void removeAttribute(String name) { 228 env.removeAttribute(name); 229 } 230 231 234 public Enumeration getAttributeNames() { 235 return env.getAttributeNames(); 236 } 237 238 241 public boolean tryResetResponse() throws IOException { 242 return env.tryResetResponse(); 243 } 244 245 248 public void commitResponse() throws IOException { 249 env.commitResponse(); 250 } 251 252 255 public void startingProcessing() { 256 env.startingProcessing(); 257 } 258 259 262 public void finishingProcessing() { 263 env.finishingProcessing(); 264 } 265 266 269 public boolean isExternal() { 270 return env.isExternal(); 271 } 272 273 276 public boolean isInternalRedirect() { 277 return env.isInternalRedirect(); 278 } 279 280 283 public Source resolve(String systemID) 284 throws ProcessingException, SAXException , IOException { 285 return env.resolve(systemID); 286 } 287 288 291 public org.apache.excalibur.source.Source resolveURI(String arg0) 292 throws MalformedURLException , IOException { 293 return env.resolveURI(arg0); 294 } 295 296 299 public org.apache.excalibur.source.Source resolveURI(String arg0, String arg1, Map arg2) 300 throws MalformedURLException , IOException { 301 return env.resolveURI(arg0, arg1, arg2); 302 } 303 304 307 public void release(org.apache.excalibur.source.Source arg0) { 308 env.release(arg0); 309 } 310 } 311 | Popular Tags |