cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r388025 [1/2] - in /cocoon/branches/BRANCH_2_1_X: legal/ src/blocks/eventcache/java/org/apache/cocoon/samples/ src/blocks/webdav/java/org/apache/cocoon/components/webdav/ src/blocks/webdav/java/org/apache/cocoon/components/webdav/impl/ src/...
Date Thu, 23 Mar 2006 04:14:39 GMT
Author: crossley
Date: Wed Mar 22 20:14:36 2006
New Revision: 388025

URL: http://svn.apache.org/viewcvs?rev=388025&view=rev
Log:
Do 'svn propset svn:eol-style native' and remove dos line-endings.

Modified:
    cocoon/branches/BRANCH_2_1_X/legal/easymock-1.1.jar.license.html   (contents, props changed)
    cocoon/branches/BRANCH_2_1_X/src/blocks/eventcache/java/org/apache/cocoon/samples/EventAwareReader.java   (contents, props changed)
    cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/WebDAVEventFactory.java   (contents, props changed)
    cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/impl/DefaultWebDAVEventFactory.java   (contents, props changed)
    cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/transformation/WebDAVTransformer.java   (contents, props changed)
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java   (contents, props changed)
    cocoon/branches/BRANCH_2_1_X/src/jdk1.3/java/org/apache/cocoon/transformation/EncodeURLTransformer.java   (contents, props changed)
    cocoon/branches/BRANCH_2_1_X/src/jdk1.4/java/org/apache/cocoon/transformation/EncodeURLTransformer.java   (contents, props changed)
    cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/acting/LocaleActionTestCase.xtest   (contents, props changed)

Modified: cocoon/branches/BRANCH_2_1_X/legal/easymock-1.1.jar.license.html
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/legal/easymock-1.1.jar.license.html?rev=388025&r1=388024&r2=388025&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/legal/easymock-1.1.jar.license.html (original)
+++ cocoon/branches/BRANCH_2_1_X/legal/easymock-1.1.jar.license.html Wed Mar 22 20:14:36 2006
@@ -2,11 +2,11 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 
-<head>
-<title>EasyMock License</title>
-<link rel="stylesheet" href="easymock.css" />
-</head>
-
+<head>
+<title>EasyMock License</title>
+<link rel="stylesheet" href="easymock.css" />
+</head>
+
 <body><div class="bodywidth">
 
 <h2>
@@ -26,5 +26,5 @@
 </p>
 
 </div>
-</body>
+</body>
 </html>

Propchange: cocoon/branches/BRANCH_2_1_X/legal/easymock-1.1.jar.license.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/eventcache/java/org/apache/cocoon/samples/EventAwareReader.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/eventcache/java/org/apache/cocoon/samples/EventAwareReader.java?rev=388025&r1=388024&r2=388025&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/eventcache/java/org/apache/cocoon/samples/EventAwareReader.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/eventcache/java/org/apache/cocoon/samples/EventAwareReader.java Wed Mar 22 20:14:36 2006
@@ -1,61 +1,61 @@
-/*
- * Copyright 1999-2006 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.samples;
-
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.caching.validity.EventValidity;
-import org.apache.cocoon.caching.validity.NamedEvent;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.reading.ResourceReader;
-import org.apache.excalibur.source.SourceValidity;
-
-/**
- * @author Max Pfingsthorn (mpfingsthorn@hippo.nl)
- *
- */
-public class EventAwareReader extends ResourceReader {
-
-	public void generate() throws IOException, ProcessingException {
-		try {
-			long DELAY_SECS = this.parameters.getParameterAsLong("DELAY_SECS", 2);
-			Thread.sleep(DELAY_SECS * 1000L);
-        } catch (InterruptedException ie) {
-          // Not much that can be done...
-        }
-		super.generate();
-	}
-	
-	public Serializable getKey() {
-        final Request request = ObjectModelHelper.getRequest(this.objectModel);
-        // for our test, pages having the same value of "pageKey" will share
-        // the same cache location
-        String key = request.getParameter("pageKey") ;
-        return ((key==null||"".equals(key)) ? "foo" : key);
-    }
-	
-	public SourceValidity getValidity() {
-        final Request request = ObjectModelHelper.getRequest(this.objectModel);
-        String key = request.getParameter("pageKey") ;
-        return new EventValidity(
-                   new NamedEvent(
-                       (key==null||"".equals(key)) ? "foo" : key));
-    }
-
-}
+/*
+ * Copyright 1999-2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.samples;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.caching.validity.EventValidity;
+import org.apache.cocoon.caching.validity.NamedEvent;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.reading.ResourceReader;
+import org.apache.excalibur.source.SourceValidity;
+
+/**
+ * @author Max Pfingsthorn (mpfingsthorn@hippo.nl)
+ *
+ */
+public class EventAwareReader extends ResourceReader {
+
+	public void generate() throws IOException, ProcessingException {
+		try {
+			long DELAY_SECS = this.parameters.getParameterAsLong("DELAY_SECS", 2);
+			Thread.sleep(DELAY_SECS * 1000L);
+        } catch (InterruptedException ie) {
+          // Not much that can be done...
+        }
+		super.generate();
+	}
+	
+	public Serializable getKey() {
+        final Request request = ObjectModelHelper.getRequest(this.objectModel);
+        // for our test, pages having the same value of "pageKey" will share
+        // the same cache location
+        String key = request.getParameter("pageKey") ;
+        return ((key==null||"".equals(key)) ? "foo" : key);
+    }
+	
+	public SourceValidity getValidity() {
+        final Request request = ObjectModelHelper.getRequest(this.objectModel);
+        String key = request.getParameter("pageKey") ;
+        return new EventValidity(
+                   new NamedEvent(
+                       (key==null||"".equals(key)) ? "foo" : key));
+    }
+
+}

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/eventcache/java/org/apache/cocoon/samples/EventAwareReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/WebDAVEventFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/WebDAVEventFactory.java?rev=388025&r1=388024&r2=388025&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/WebDAVEventFactory.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/WebDAVEventFactory.java Wed Mar 22 20:14:36 2006
@@ -1,31 +1,31 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.components.webdav;
-
-import org.apache.cocoon.caching.validity.Event;
-import org.apache.cocoon.caching.validity.EventFactory;
-import org.apache.commons.httpclient.HttpURL;
-
-/**
- * Factory interface for constructing Event objects for webdav resources 
- */
-public interface WebDAVEventFactory extends EventFactory {
-	
-	public static final String ROLE = WebDAVEventFactory.class.getName();
-
-	public Event createEvent(String url);
-	public Event createEvent(HttpURL url);
-}
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.components.webdav;
+
+import org.apache.cocoon.caching.validity.Event;
+import org.apache.cocoon.caching.validity.EventFactory;
+import org.apache.commons.httpclient.HttpURL;
+
+/**
+ * Factory interface for constructing Event objects for webdav resources 
+ */
+public interface WebDAVEventFactory extends EventFactory {
+	
+	public static final String ROLE = WebDAVEventFactory.class.getName();
+
+	public Event createEvent(String url);
+	public Event createEvent(HttpURL url);
+}

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/WebDAVEventFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/impl/DefaultWebDAVEventFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/impl/DefaultWebDAVEventFactory.java?rev=388025&r1=388024&r2=388025&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/impl/DefaultWebDAVEventFactory.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/impl/DefaultWebDAVEventFactory.java Wed Mar 22 20:14:36 2006
@@ -1,99 +1,99 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.components.webdav.impl;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.caching.validity.Event;
-import org.apache.cocoon.caching.validity.NameValueEvent;
-import org.apache.cocoon.components.webdav.WebDAVEventFactory;
-import org.apache.commons.httpclient.HttpURL;
-
-/**
- * Default implementation
- */
-public class DefaultWebDAVEventFactory extends AbstractLogEnabled implements
-		WebDAVEventFactory, Configurable {
-
-	protected static final String HOST_CONFIG_ELEM = "host";
-	protected static final String PORT_CONFIG_ELEM = "port";
-	
-	private String host = "localhost";
-	private int port = 60000;
-	
-	public void configure(Configuration config) throws ConfigurationException {
-		host = config.getChild(HOST_CONFIG_ELEM).getValue(host);
-		port = config.getChild(PORT_CONFIG_ELEM).getValueAsInteger(port);
-	}
-
-	public Event createEvent(String url) {
-		
-		// it might only be the path, supplement with host/port
-		if(url.startsWith("/")) {
-			return createEvent(host, port, url);
-		}
-		
-		try {
-			HttpURL newurl = new HttpURL(url);
-			
-			return createEvent(newurl);
-			
-		} catch (Exception e) {
-			if(getLogger().isErrorEnabled())
-    			getLogger().error("Invalid URI, can't create event object!",e);
-		}
-		return null;
-	}
-
-	// optimization for preparsed httpclient url
-	public Event createEvent(HttpURL url) {
-		Event event = null;
-		try {
-    		String host = url.getHost();
-    		int port = url.getPort();
-    		String path = url.getEscapedPathQuery();
-    		
-    		event = createEvent(host, port, path);
-    		
-    		if(getLogger().isDebugEnabled())
-    			getLogger().debug("Created event for url: "+event.toString());
-    	
-    	} catch (Exception e) {
-    		if(getLogger().isErrorEnabled())
-    			getLogger().error("could not create Event!",e);
-    	}
-    	return event;
-	}
-
-	public Event createEvent(Parameters params) throws ParameterException {
-		return createEvent( params.getParameter("host"), 
-				params.getParameterAsInteger("port"), 
-				params.getParameter("path"));
-	}
-	
-	protected Event createEvent(String host, int port, String path) {
-		
-		if(path.endsWith("/"))
-			path = path.substring(0,path.length()-1);
-		
-		return new NameValueEvent("webdav", host+"|"+port+"|"+path);
-	}
-
-}
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.components.webdav.impl;
+
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.avalon.framework.parameters.ParameterException;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.caching.validity.Event;
+import org.apache.cocoon.caching.validity.NameValueEvent;
+import org.apache.cocoon.components.webdav.WebDAVEventFactory;
+import org.apache.commons.httpclient.HttpURL;
+
+/**
+ * Default implementation
+ */
+public class DefaultWebDAVEventFactory extends AbstractLogEnabled implements
+		WebDAVEventFactory, Configurable {
+
+	protected static final String HOST_CONFIG_ELEM = "host";
+	protected static final String PORT_CONFIG_ELEM = "port";
+	
+	private String host = "localhost";
+	private int port = 60000;
+	
+	public void configure(Configuration config) throws ConfigurationException {
+		host = config.getChild(HOST_CONFIG_ELEM).getValue(host);
+		port = config.getChild(PORT_CONFIG_ELEM).getValueAsInteger(port);
+	}
+
+	public Event createEvent(String url) {
+		
+		// it might only be the path, supplement with host/port
+		if(url.startsWith("/")) {
+			return createEvent(host, port, url);
+		}
+		
+		try {
+			HttpURL newurl = new HttpURL(url);
+			
+			return createEvent(newurl);
+			
+		} catch (Exception e) {
+			if(getLogger().isErrorEnabled())
+    			getLogger().error("Invalid URI, can't create event object!",e);
+		}
+		return null;
+	}
+
+	// optimization for preparsed httpclient url
+	public Event createEvent(HttpURL url) {
+		Event event = null;
+		try {
+    		String host = url.getHost();
+    		int port = url.getPort();
+    		String path = url.getEscapedPathQuery();
+    		
+    		event = createEvent(host, port, path);
+    		
+    		if(getLogger().isDebugEnabled())
+    			getLogger().debug("Created event for url: "+event.toString());
+    	
+    	} catch (Exception e) {
+    		if(getLogger().isErrorEnabled())
+    			getLogger().error("could not create Event!",e);
+    	}
+    	return event;
+	}
+
+	public Event createEvent(Parameters params) throws ParameterException {
+		return createEvent( params.getParameter("host"), 
+				params.getParameterAsInteger("port"), 
+				params.getParameter("path"));
+	}
+	
+	protected Event createEvent(String host, int port, String path) {
+		
+		if(path.endsWith("/"))
+			path = path.substring(0,path.length()-1);
+		
+		return new NameValueEvent("webdav", host+"|"+port+"|"+path);
+	}
+
+}

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/webdav/impl/DefaultWebDAVEventFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/transformation/WebDAVTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/transformation/WebDAVTransformer.java?rev=388025&r1=388024&r2=388025&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/transformation/WebDAVTransformer.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/transformation/WebDAVTransformer.java Wed Mar 22 20:14:36 2006
@@ -1,406 +1,406 @@
-/*
- * Copyright 1999-2006 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.transformation;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.io.UnsupportedEncodingException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.xml.transform.OutputKeys;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.caching.CacheableProcessingComponent;
-import org.apache.cocoon.caching.validity.EventValidity;
-import org.apache.cocoon.components.webdav.WebDAVEventFactory;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.xml.AttributesImpl;
-import org.apache.cocoon.xml.IncludeXMLConsumer;
-import org.apache.cocoon.xml.XMLUtils;
-import org.apache.commons.httpclient.Credentials;
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpState;
-import org.apache.commons.httpclient.HttpURL;
-import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.apache.excalibur.source.SourceValidity;
-import org.apache.excalibur.source.impl.validity.AggregatedValidity;
-import org.apache.excalibur.xmlizer.XMLizer;
-import org.apache.webdav.lib.methods.HttpRequestBodyMethodBase;
-import org.w3c.dom.DocumentFragment;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * A general purpose, low level webdav transformer. Sends http requests defined in xml
- * directly to the server and returns the response to the processing stream.
- * 
- * For a more high level approach, use WebDAVSource (GET/PUT/PROPPATCH) and DASLTransformer (SEARCH).
- * 
- * 
- * 
- */
-public class WebDAVTransformer extends AbstractSAXTransformer 
-implements Disposable, CacheableProcessingComponent {
-	
-    // ---------------------------------------------------- Constants
-
-    private static final String WEBDAV_SCHEME = "webdav://";
-    private static final String HTTP_SCHEME= "http://";
-    
-    private static final String NS_URI = "http://cocoon.apache.org/webdav/1.0";
-    private static final String NS_PREFIX = "webdav:";
-    
-    private static final String REQUEST_TAG = "request";
-    private static final String METHOD_ATTR = "method";
-    private static final String TARGET_ATTR = "target";
-    
-    private static final String HEADER_TAG = "header";
-    private static final String NAME_ATTR = "name";
-    private static final String VALUE_ATTR = "value";
-    
-    private static final String BODY_TAG = "body";
-    
-    private static final String RESPONSE_TAG = "response";
-    private static final String STATUS_TAG = "status";
-    private static final String CODE_ATTR = "code";
-    private static final String MSG_ATTR = "msg";
-
-    private static HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager());
-
-    // ---------------------------------------------------- Member variables
-
-    private HttpState m_state = null;
-
-    private String m_method = null;
-	private String m_target = null;
-    private Map m_headers = null;
-
-    private WebDAVEventFactory m_eventfactory = null;
-
-    private DocumentFragment m_requestdocument = null;
-
-    private AggregatedValidity m_validity = null;
-
-    // ---------------------------------------------------- Lifecycle
-
-    public WebDAVTransformer() {
-        super.defaultNamespaceURI = "DAV:";
-    }
-
-    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) 
-    throws ProcessingException, SAXException, IOException {
-        super.setup(resolver, objectModel, src, par);
-
-        m_state = new HttpState();
-        
-        if(null != par.getParameter("username", null)) {
-        	m_state.setCredentials(null, null, new UsernamePasswordCredentials(
-        			par.getParameter("username", ""),
-        			par.getParameter("password", ""))
-        			);
-        }
-
-        if(m_eventfactory == null) {
-        	try {
-        		m_eventfactory = (WebDAVEventFactory)manager.lookup(WebDAVEventFactory.ROLE);
-        	} catch (ServiceException e) {
-				// ignore, no eventcaching configured
-        		m_eventfactory = null;
-			}
-        }
-    }
-    
-    /**
-     * Helper method to do event caching
-     * 
-     * @param methodurl The url to create the EventValidity for
-     * @return an EventValidity object or null
-     */
-    private SourceValidity makeWebdavEventValidity(HttpURL methodurl) {
-    	
-    	if (m_eventfactory == null) {
-    		return null;
-    	}
-    	
-    	SourceValidity evalidity = null;
-    	try {
-    		
-    		evalidity = new EventValidity(m_eventfactory.createEvent(methodurl));
-    		
-    		if(getLogger().isDebugEnabled())
-    			getLogger().debug("Created eventValidity for webdav request: "+evalidity);
-    	
-    	} catch (Exception e) {
-    		if(getLogger().isErrorEnabled())
-    			getLogger().error("could not create EventValidity!",e);
-    	}
-    	return evalidity;
-    }
-    
-    public void recycle() {
-        super.recycle();
-
-        m_method = null;
-        m_target = null;
-        m_validity = null;
-        m_requestdocument = null;
-    }
-    
-    public void dispose() {
-        recycle();
-
-        manager = null;
-    }
-
-    // ---------------------------------------------------- Transformer
-
-    public void startElement(String uri, String name, String raw, Attributes atts) 
-    throws SAXException {
-        if (name.equals(REQUEST_TAG) && uri.equals(NS_URI)) {
-            m_headers = new HashMap();
-            if ((m_method = atts.getValue(METHOD_ATTR)) == null) {
-                final String msg = "The <request> element must contain a \"method\" attribute";
-                throw new IllegalStateException(msg);
-            }
-            if ((m_target = atts.getValue(TARGET_ATTR)) == null) {
-                throw new IllegalStateException("The <request> element must contain a \"target\" attribute");
-            }
-            if (m_target.startsWith(WEBDAV_SCHEME)) {
-                m_target = HTTP_SCHEME + m_target.substring(WEBDAV_SCHEME.length());
-            }
-            else {
-                throw new SAXException("Illegal value for target, must be an http:// or webdav:// URL");
-            }
-        }
-        else if (name.equals(HEADER_TAG) && uri.equals(NS_URI)) {
-            final String hname = atts.getValue(NAME_ATTR);
-            if (hname == null) {
-                throw new SAXException("The <header> element requires a \"name\" attribute");
-            }
-            final String value = atts.getValue(VALUE_ATTR);
-            if (value == null) {
-                throw new SAXException("The <header> element requires a \"value\" attribute");
-            }
-            m_headers.put(hname, value);
-        }
-        else if (name.equals(BODY_TAG) && uri.equals(NS_URI)) {
-            startRecording();
-        }
-        else {
-            super.startElement(uri, name, raw, atts);
-        }
-	}
-    
-    public void endElement(String uri, String name, String raw) 
-    throws SAXException {
-        if (name.equals(REQUEST_TAG) && uri.equals(NS_URI)) {
-            
-            try {
-	            HttpURL url = new HttpURL(m_target);
-	            if(url.getUser() != null && !"".equals(url.getUser())) {
-		            m_state.setCredentials(null, new UsernamePasswordCredentials(
-		                    url.getUser(),
-		                    url.getPassword()));
-	            }
-	            m_target = url.getURI();
-	            
-	            if (m_validity != null) {
-	                m_validity.add(makeWebdavEventValidity(url));
-	            }
-	            
-            } catch (Exception e) {
-				//ignore
-			}
-            
-            // create method
-            WebDAVRequestMethod method = new WebDAVRequestMethod(m_target, m_method);
-            
-            try {
-                // add request headers
-                Iterator headers = m_headers.entrySet().iterator();
-                while (headers.hasNext()) {
-                    Map.Entry header = (Map.Entry) headers.next();
-                    method.addRequestHeader((String) header.getKey(), (String) header.getValue());
-                }
-
-                Properties props = XMLUtils.createPropertiesForXML(false);
-                props.put(OutputKeys.ENCODING, "ISO-8859-1");
-                String body = XMLUtils.serializeNode(m_requestdocument, props);
-                // set request body
-                method.setRequestBody(body.getBytes("ISO-8859-1"));
-                
-                // execute the request
-                executeRequest(method);
-            } catch (ProcessingException e) {
-				if(getLogger().isErrorEnabled()) {
-					getLogger().debug("Couldn't read request from sax stream",e);
-				}
-				throw new SAXException("Couldn't read request from sax stream",e);
-			} catch (UnsupportedEncodingException e) {
-				if(getLogger().isErrorEnabled()) {
-					getLogger().debug("ISO-8859-1 encoding not present",e);
-				}
-				throw new SAXException("ISO-8859-1 encoding not present",e);
-			}
-            finally {
-                method.releaseConnection();
-                m_headers = null;
-            }
-        }
-        else if (name.equals(HEADER_TAG) && uri.equals(NS_URI)) {
-            // dont do anything
-        }
-        else if (name.equals(BODY_TAG) && uri.equals(NS_URI)) {
-        	m_requestdocument = super.endRecording();
-        }
-        else {
-            super.endElement(uri, name, raw);
-        }
-    }
-    
-    private void executeRequest(WebDAVRequestMethod method) throws SAXException {
-        try {
-            client.executeMethod(method.getHostConfiguration(), method, m_state);
-            
-            super.contentHandler.startPrefixMapping("webdav", NS_URI);
-            
-            // start <response>
-            AttributesImpl atts = new AttributesImpl();
-            atts.addCDATAAttribute(TARGET_ATTR, m_target);
-            atts.addCDATAAttribute(METHOD_ATTR, m_method);
-            super.contentHandler.startElement(NS_URI, RESPONSE_TAG, NS_PREFIX + RESPONSE_TAG, atts);
-            atts.clear();
-            
-            // <status>
-            atts.addCDATAAttribute(CODE_ATTR, String.valueOf(method.getStatusCode()));
-            atts.addCDATAAttribute(MSG_ATTR, method.getStatusText());
-            super.contentHandler.startElement(NS_URI, STATUS_TAG, NS_PREFIX + STATUS_TAG, atts);
-            atts.clear();
-            super.contentHandler.endElement(NS_URI, STATUS_TAG, NS_PREFIX + STATUS_TAG);
-            
-            // <header>s
-            Header[] headers = method.getResponseHeaders();
-            for (int i = 0; i < headers.length; i++) {
-                atts.addCDATAAttribute(NAME_ATTR, headers[i].getName());
-                atts.addCDATAAttribute(VALUE_ATTR, headers[i].getValue());
-                super.contentHandler.startElement(NS_URI, HEADER_TAG, NS_PREFIX + HEADER_TAG, atts);
-                atts.clear();
-                super.contentHandler.endElement(NS_URI, HEADER_TAG, NS_PREFIX + HEADER_TAG);
-            }
-            
-            // response <body>
-            final InputStream in = method.getResponseBodyAsStream();
-            if (in != null) {
-                String mimeType = null;
-                Header header = method.getResponseHeader("Content-Type");
-                if (header != null) {
-                    mimeType = header.getValue();
-                    int pos = mimeType.indexOf(';');
-                    if (pos != -1) {
-                        mimeType = mimeType.substring(0, pos);
-                    }
-                }
-                if (mimeType != null && mimeType.equals("text/xml")) {
-                    super.contentHandler.startElement(NS_URI, BODY_TAG, NS_PREFIX + BODY_TAG, atts);
-                    IncludeXMLConsumer consumer = new IncludeXMLConsumer(super.contentHandler);
-                    XMLizer xmlizer = null;
-                    try {
-                        xmlizer = (XMLizer) manager.lookup(XMLizer.ROLE);
-                        xmlizer.toSAX(in, mimeType, m_target, consumer);
-                    } catch (ServiceException ce) {
-                        throw new SAXException("Missing service dependency: " + XMLizer.ROLE, ce);
-                    } finally {
-                        manager.release(xmlizer);
-                    }
-                    super.contentHandler.endElement(NS_URI, BODY_TAG, NS_PREFIX + BODY_TAG);
-                }
-            }
-                
-            // end <response>
-            super.contentHandler.endElement(NS_URI, RESPONSE_TAG, NS_PREFIX + RESPONSE_TAG);
-            
-            super.contentHandler.endPrefixMapping(NS_URI);
-        }
-        catch (HttpException e) {
-            throw new SAXException("Error executing WebDAV request." + " Server responded " 
-                + e.getReasonCode() + " (" + e.getReason() + ") - " + e.getMessage(), e);
-        }
-        catch (IOException e) {
-            throw new SAXException("Error executing WebDAV request", e);
-        }
-    }
-
-    // ---------------------------------------------------- CacheableProcessingComponent
-
-    public Serializable getKey() {
-        if (m_state == null) {
-            return "WebDAVTransformer";
-        }
-        final StringBuffer key = new StringBuffer();
-        // get the credentials
-        final Credentials credentials = m_state.getCredentials(null, null);
-        if (credentials != null) {
-            if (credentials instanceof UsernamePasswordCredentials) {
-                key.append(((UsernamePasswordCredentials) credentials).getUserName());
-            }
-            else {
-                key.append(credentials.toString());
-            }
-        }
-        return key.toString();
-    }
-
-    public SourceValidity getValidity() {
-    	
-        // dont do any caching when no event caching is set up
-    	if (m_eventfactory == null) {
-    		return null;
-    	}
-    	
-        if (m_validity == null) {
-            m_validity = new AggregatedValidity();
-        }
-        return m_validity;
-    }
-
-    // ---------------------------------------------------- Implementation
-
-    private static class WebDAVRequestMethod extends HttpRequestBodyMethodBase {
-
-        private String m_name;
-
-        private WebDAVRequestMethod(String uri, String name) {
-            super(uri);
-            m_name = name;
-        }
-
-		public String getName() {
-			return m_name;
-		}
-
-    }
-    
-}
+/*
+ * Copyright 1999-2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.transformation;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.xml.transform.OutputKeys;
+
+import org.apache.avalon.framework.activity.Disposable;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.caching.CacheableProcessingComponent;
+import org.apache.cocoon.caching.validity.EventValidity;
+import org.apache.cocoon.components.webdav.WebDAVEventFactory;
+import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.xml.AttributesImpl;
+import org.apache.cocoon.xml.IncludeXMLConsumer;
+import org.apache.cocoon.xml.XMLUtils;
+import org.apache.commons.httpclient.Credentials;
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.HttpState;
+import org.apache.commons.httpclient.HttpURL;
+import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.excalibur.source.SourceValidity;
+import org.apache.excalibur.source.impl.validity.AggregatedValidity;
+import org.apache.excalibur.xmlizer.XMLizer;
+import org.apache.webdav.lib.methods.HttpRequestBodyMethodBase;
+import org.w3c.dom.DocumentFragment;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * A general purpose, low level webdav transformer. Sends http requests defined in xml
+ * directly to the server and returns the response to the processing stream.
+ * 
+ * For a more high level approach, use WebDAVSource (GET/PUT/PROPPATCH) and DASLTransformer (SEARCH).
+ * 
+ * 
+ * 
+ */
+public class WebDAVTransformer extends AbstractSAXTransformer 
+implements Disposable, CacheableProcessingComponent {
+	
+    // ---------------------------------------------------- Constants
+
+    private static final String WEBDAV_SCHEME = "webdav://";
+    private static final String HTTP_SCHEME= "http://";
+    
+    private static final String NS_URI = "http://cocoon.apache.org/webdav/1.0";
+    private static final String NS_PREFIX = "webdav:";
+    
+    private static final String REQUEST_TAG = "request";
+    private static final String METHOD_ATTR = "method";
+    private static final String TARGET_ATTR = "target";
+    
+    private static final String HEADER_TAG = "header";
+    private static final String NAME_ATTR = "name";
+    private static final String VALUE_ATTR = "value";
+    
+    private static final String BODY_TAG = "body";
+    
+    private static final String RESPONSE_TAG = "response";
+    private static final String STATUS_TAG = "status";
+    private static final String CODE_ATTR = "code";
+    private static final String MSG_ATTR = "msg";
+
+    private static HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager());
+
+    // ---------------------------------------------------- Member variables
+
+    private HttpState m_state = null;
+
+    private String m_method = null;
+	private String m_target = null;
+    private Map m_headers = null;
+
+    private WebDAVEventFactory m_eventfactory = null;
+
+    private DocumentFragment m_requestdocument = null;
+
+    private AggregatedValidity m_validity = null;
+
+    // ---------------------------------------------------- Lifecycle
+
+    public WebDAVTransformer() {
+        super.defaultNamespaceURI = "DAV:";
+    }
+
+    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) 
+    throws ProcessingException, SAXException, IOException {
+        super.setup(resolver, objectModel, src, par);
+
+        m_state = new HttpState();
+        
+        if(null != par.getParameter("username", null)) {
+        	m_state.setCredentials(null, null, new UsernamePasswordCredentials(
+        			par.getParameter("username", ""),
+        			par.getParameter("password", ""))
+        			);
+        }
+
+        if(m_eventfactory == null) {
+        	try {
+        		m_eventfactory = (WebDAVEventFactory)manager.lookup(WebDAVEventFactory.ROLE);
+        	} catch (ServiceException e) {
+				// ignore, no eventcaching configured
+        		m_eventfactory = null;
+			}
+        }
+    }
+    
+    /**
+     * Helper method to do event caching
+     * 
+     * @param methodurl The url to create the EventValidity for
+     * @return an EventValidity object or null
+     */
+    private SourceValidity makeWebdavEventValidity(HttpURL methodurl) {
+    	
+    	if (m_eventfactory == null) {
+    		return null;
+    	}
+    	
+    	SourceValidity evalidity = null;
+    	try {
+    		
+    		evalidity = new EventValidity(m_eventfactory.createEvent(methodurl));
+    		
+    		if(getLogger().isDebugEnabled())
+    			getLogger().debug("Created eventValidity for webdav request: "+evalidity);
+    	
+    	} catch (Exception e) {
+    		if(getLogger().isErrorEnabled())
+    			getLogger().error("could not create EventValidity!",e);
+    	}
+    	return evalidity;
+    }
+    
+    public void recycle() {
+        super.recycle();
+
+        m_method = null;
+        m_target = null;
+        m_validity = null;
+        m_requestdocument = null;
+    }
+    
+    public void dispose() {
+        recycle();
+
+        manager = null;
+    }
+
+    // ---------------------------------------------------- Transformer
+
+    public void startElement(String uri, String name, String raw, Attributes atts) 
+    throws SAXException {
+        if (name.equals(REQUEST_TAG) && uri.equals(NS_URI)) {
+            m_headers = new HashMap();
+            if ((m_method = atts.getValue(METHOD_ATTR)) == null) {
+                final String msg = "The <request> element must contain a \"method\" attribute";
+                throw new IllegalStateException(msg);
+            }
+            if ((m_target = atts.getValue(TARGET_ATTR)) == null) {
+                throw new IllegalStateException("The <request> element must contain a \"target\" attribute");
+            }
+            if (m_target.startsWith(WEBDAV_SCHEME)) {
+                m_target = HTTP_SCHEME + m_target.substring(WEBDAV_SCHEME.length());
+            }
+            else {
+                throw new SAXException("Illegal value for target, must be an http:// or webdav:// URL");
+            }
+        }
+        else if (name.equals(HEADER_TAG) && uri.equals(NS_URI)) {
+            final String hname = atts.getValue(NAME_ATTR);
+            if (hname == null) {
+                throw new SAXException("The <header> element requires a \"name\" attribute");
+            }
+            final String value = atts.getValue(VALUE_ATTR);
+            if (value == null) {
+                throw new SAXException("The <header> element requires a \"value\" attribute");
+            }
+            m_headers.put(hname, value);
+        }
+        else if (name.equals(BODY_TAG) && uri.equals(NS_URI)) {
+            startRecording();
+        }
+        else {
+            super.startElement(uri, name, raw, atts);
+        }
+	}
+    
+    public void endElement(String uri, String name, String raw) 
+    throws SAXException {
+        if (name.equals(REQUEST_TAG) && uri.equals(NS_URI)) {
+            
+            try {
+	            HttpURL url = new HttpURL(m_target);
+	            if(url.getUser() != null && !"".equals(url.getUser())) {
+		            m_state.setCredentials(null, new UsernamePasswordCredentials(
+		                    url.getUser(),
+		                    url.getPassword()));
+	            }
+	            m_target = url.getURI();
+	            
+	            if (m_validity != null) {
+	                m_validity.add(makeWebdavEventValidity(url));
+	            }
+	            
+            } catch (Exception e) {
+				//ignore
+			}
+            
+            // create method
+            WebDAVRequestMethod method = new WebDAVRequestMethod(m_target, m_method);
+            
+            try {
+                // add request headers
+                Iterator headers = m_headers.entrySet().iterator();
+                while (headers.hasNext()) {
+                    Map.Entry header = (Map.Entry) headers.next();
+                    method.addRequestHeader((String) header.getKey(), (String) header.getValue());
+                }
+
+                Properties props = XMLUtils.createPropertiesForXML(false);
+                props.put(OutputKeys.ENCODING, "ISO-8859-1");
+                String body = XMLUtils.serializeNode(m_requestdocument, props);
+                // set request body
+                method.setRequestBody(body.getBytes("ISO-8859-1"));
+                
+                // execute the request
+                executeRequest(method);
+            } catch (ProcessingException e) {
+				if(getLogger().isErrorEnabled()) {
+					getLogger().debug("Couldn't read request from sax stream",e);
+				}
+				throw new SAXException("Couldn't read request from sax stream",e);
+			} catch (UnsupportedEncodingException e) {
+				if(getLogger().isErrorEnabled()) {
+					getLogger().debug("ISO-8859-1 encoding not present",e);
+				}
+				throw new SAXException("ISO-8859-1 encoding not present",e);
+			}
+            finally {
+                method.releaseConnection();
+                m_headers = null;
+            }
+        }
+        else if (name.equals(HEADER_TAG) && uri.equals(NS_URI)) {
+            // dont do anything
+        }
+        else if (name.equals(BODY_TAG) && uri.equals(NS_URI)) {
+        	m_requestdocument = super.endRecording();
+        }
+        else {
+            super.endElement(uri, name, raw);
+        }
+    }
+    
+    private void executeRequest(WebDAVRequestMethod method) throws SAXException {
+        try {
+            client.executeMethod(method.getHostConfiguration(), method, m_state);
+            
+            super.contentHandler.startPrefixMapping("webdav", NS_URI);
+            
+            // start <response>
+            AttributesImpl atts = new AttributesImpl();
+            atts.addCDATAAttribute(TARGET_ATTR, m_target);
+            atts.addCDATAAttribute(METHOD_ATTR, m_method);
+            super.contentHandler.startElement(NS_URI, RESPONSE_TAG, NS_PREFIX + RESPONSE_TAG, atts);
+            atts.clear();
+            
+            // <status>
+            atts.addCDATAAttribute(CODE_ATTR, String.valueOf(method.getStatusCode()));
+            atts.addCDATAAttribute(MSG_ATTR, method.getStatusText());
+            super.contentHandler.startElement(NS_URI, STATUS_TAG, NS_PREFIX + STATUS_TAG, atts);
+            atts.clear();
+            super.contentHandler.endElement(NS_URI, STATUS_TAG, NS_PREFIX + STATUS_TAG);
+            
+            // <header>s
+            Header[] headers = method.getResponseHeaders();
+            for (int i = 0; i < headers.length; i++) {
+                atts.addCDATAAttribute(NAME_ATTR, headers[i].getName());
+                atts.addCDATAAttribute(VALUE_ATTR, headers[i].getValue());
+                super.contentHandler.startElement(NS_URI, HEADER_TAG, NS_PREFIX + HEADER_TAG, atts);
+                atts.clear();
+                super.contentHandler.endElement(NS_URI, HEADER_TAG, NS_PREFIX + HEADER_TAG);
+            }
+            
+            // response <body>
+            final InputStream in = method.getResponseBodyAsStream();
+            if (in != null) {
+                String mimeType = null;
+                Header header = method.getResponseHeader("Content-Type");
+                if (header != null) {
+                    mimeType = header.getValue();
+                    int pos = mimeType.indexOf(';');
+                    if (pos != -1) {
+                        mimeType = mimeType.substring(0, pos);
+                    }
+                }
+                if (mimeType != null && mimeType.equals("text/xml")) {
+                    super.contentHandler.startElement(NS_URI, BODY_TAG, NS_PREFIX + BODY_TAG, atts);
+                    IncludeXMLConsumer consumer = new IncludeXMLConsumer(super.contentHandler);
+                    XMLizer xmlizer = null;
+                    try {
+                        xmlizer = (XMLizer) manager.lookup(XMLizer.ROLE);
+                        xmlizer.toSAX(in, mimeType, m_target, consumer);
+                    } catch (ServiceException ce) {
+                        throw new SAXException("Missing service dependency: " + XMLizer.ROLE, ce);
+                    } finally {
+                        manager.release(xmlizer);
+                    }
+                    super.contentHandler.endElement(NS_URI, BODY_TAG, NS_PREFIX + BODY_TAG);
+                }
+            }
+                
+            // end <response>
+            super.contentHandler.endElement(NS_URI, RESPONSE_TAG, NS_PREFIX + RESPONSE_TAG);
+            
+            super.contentHandler.endPrefixMapping(NS_URI);
+        }
+        catch (HttpException e) {
+            throw new SAXException("Error executing WebDAV request." + " Server responded " 
+                + e.getReasonCode() + " (" + e.getReason() + ") - " + e.getMessage(), e);
+        }
+        catch (IOException e) {
+            throw new SAXException("Error executing WebDAV request", e);
+        }
+    }
+
+    // ---------------------------------------------------- CacheableProcessingComponent
+
+    public Serializable getKey() {
+        if (m_state == null) {
+            return "WebDAVTransformer";
+        }
+        final StringBuffer key = new StringBuffer();
+        // get the credentials
+        final Credentials credentials = m_state.getCredentials(null, null);
+        if (credentials != null) {
+            if (credentials instanceof UsernamePasswordCredentials) {
+                key.append(((UsernamePasswordCredentials) credentials).getUserName());
+            }
+            else {
+                key.append(credentials.toString());
+            }
+        }
+        return key.toString();
+    }
+
+    public SourceValidity getValidity() {
+    	
+        // dont do any caching when no event caching is set up
+    	if (m_eventfactory == null) {
+    		return null;
+    	}
+    	
+        if (m_validity == null) {
+            m_validity = new AggregatedValidity();
+        }
+        return m_validity;
+    }
+
+    // ---------------------------------------------------- Implementation
+
+    private static class WebDAVRequestMethod extends HttpRequestBodyMethodBase {
+
+        private String m_name;
+
+        private WebDAVRequestMethod(String uri, String name) {
+            super(uri);
+            m_name = name;
+        }
+
+		public String getName() {
+			return m_name;
+		}
+
+    }
+    
+}

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/transformation/WebDAVTransformer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java?rev=388025&r1=388024&r2=388025&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java Wed Mar 22 20:14:36 2006
@@ -1,93 +1,93 @@
-/*
- * Copyright 1999-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.components.flow;
-
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Access to continuation data for monitoring applications
- */
-public class WebContinuationDataBean {
-
-    private static final String TYPE_JAVAFLOW = "javaflow";
-    private static final String TYPE_FLOWSCRIPT = "flowscript";
-    private static final String HAS_EXPIRED_NO = "no";
-    private static final String HAS_EXPIRED_YES = "yes";
-
-    private WebContinuation wc;
-    private SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
-    private List _children = new ArrayList();
-
-    public WebContinuationDataBean(WebContinuation wc) {
-        this.wc = wc;
-        for (Iterator it = wc.getChildren().iterator(); it.hasNext();) {
-            WebContinuationDataBean child = new WebContinuationDataBean(
-                    (WebContinuation) it.next());
-            this._children.add(child);
-        }
-    }
-
-    public String getId() {
-        return wc.getId();
-    }
-
-    public String getLastAccessTime() {
-        return formatter.format(new Date(wc.getLastAccessTime()));
-    }
-
-    public String getInterpreterId() {
-        return wc.getInterpreterId();
-    }
-
-    public String getTimeToLiveInMinutes() {
-        return Long.toString(wc.getTimeToLive() / 1000 / 60);
-    }
-
-    public String getTimeToLive() {
-        return Long.toString(wc.getTimeToLive());
-    }
-
-    public String getExpireTime() {
-        return formatter.format(new Date(wc.getLastAccessTime()
-                + wc.getTimeToLive()));
-    }
-
-    public String hasExpired() {
-        if ((wc.getLastAccessTime() + wc.getTimeToLive()) < System
-                .currentTimeMillis()) {
-            return HAS_EXPIRED_YES;
-        }
-        return HAS_EXPIRED_NO;
-
-    }
-
-    public String getType() {
-        if (wc.getUserObject().getClass().getName().indexOf(
-                "FOM_WebContinuation") > -1) {
-            return TYPE_FLOWSCRIPT;
-        }
-        return TYPE_JAVAFLOW;
-    }
-
-    public List get_children() {
-        return this._children;
-    }
-
-}
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.components.flow;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Access to continuation data for monitoring applications
+ */
+public class WebContinuationDataBean {
+
+    private static final String TYPE_JAVAFLOW = "javaflow";
+    private static final String TYPE_FLOWSCRIPT = "flowscript";
+    private static final String HAS_EXPIRED_NO = "no";
+    private static final String HAS_EXPIRED_YES = "yes";
+
+    private WebContinuation wc;
+    private SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
+    private List _children = new ArrayList();
+
+    public WebContinuationDataBean(WebContinuation wc) {
+        this.wc = wc;
+        for (Iterator it = wc.getChildren().iterator(); it.hasNext();) {
+            WebContinuationDataBean child = new WebContinuationDataBean(
+                    (WebContinuation) it.next());
+            this._children.add(child);
+        }
+    }
+
+    public String getId() {
+        return wc.getId();
+    }
+
+    public String getLastAccessTime() {
+        return formatter.format(new Date(wc.getLastAccessTime()));
+    }
+
+    public String getInterpreterId() {
+        return wc.getInterpreterId();
+    }
+
+    public String getTimeToLiveInMinutes() {
+        return Long.toString(wc.getTimeToLive() / 1000 / 60);
+    }
+
+    public String getTimeToLive() {
+        return Long.toString(wc.getTimeToLive());
+    }
+
+    public String getExpireTime() {
+        return formatter.format(new Date(wc.getLastAccessTime()
+                + wc.getTimeToLive()));
+    }
+
+    public String hasExpired() {
+        if ((wc.getLastAccessTime() + wc.getTimeToLive()) < System
+                .currentTimeMillis()) {
+            return HAS_EXPIRED_YES;
+        }
+        return HAS_EXPIRED_NO;
+
+    }
+
+    public String getType() {
+        if (wc.getUserObject().getClass().getName().indexOf(
+                "FOM_WebContinuation") > -1) {
+            return TYPE_FLOWSCRIPT;
+        }
+        return TYPE_JAVAFLOW;
+    }
+
+    public List get_children() {
+        return this._children;
+    }
+
+}

Propchange: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message