Author: cziegeler
Date: Tue Jun 10 06:41:25 2008
New Revision: 666103
URL: http://svn.apache.org/viewvc?rev=666103&view=rev
Log:
Remove unused imports and fix some javadoc errors.
Modified:
incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/sling/MockSlingHttpServletRequest.java
incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/SessionPoolManager.java
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrItemResource.java
incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/helper/SlingLocatorFactory.java
incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/helper/SlingResourceLocator.java
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/issues/SLING457Test.java
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletAtCopyTest.java
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletAtMoveTest.java
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/RequestProperty.java
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingFileUploadHandler.java
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingPropertyValueHandler.java
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/CopyOperation.java
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/MoveOperation.java
incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceProvider.java
Modified:
incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/sling/MockSlingHttpServletRequest.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/sling/MockSlingHttpServletRequest.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/sling/MockSlingHttpServletRequest.java
(original)
+++
incubator/sling/trunk/commons/testing/src/main/java/org/apache/sling/commons/testing/sling/MockSlingHttpServletRequest.java
Tue Jun 10 06:41:25 2008
@@ -19,10 +19,8 @@
package org.apache.sling.commons.testing.sling;
import java.io.BufferedReader;
-import java.io.PrintWriter;
import java.security.Principal;
import java.util.Enumeration;
-import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
@@ -60,7 +58,7 @@
private boolean secure = false;
private MockResourceResolver mockResourceResolver;
-
+
private RequestProgressTracker mockRequestProgressTracker;
public static final String RESOURCE_TYPE = "foo/bar";
Modified:
incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
(original)
+++
incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
Tue Jun 10 06:41:25 2008
@@ -18,8 +18,6 @@
*/
package org.apache.sling.engine.impl.request;
-import static
org.apache.sling.jcr.resource.JcrResourceConstants.SLING_RESOURCE_SUPER_TYPE_PROPERTY;
-
import java.io.IOException;
import javax.servlet.RequestDispatcher;
@@ -155,7 +153,7 @@
private static final String UNSET_RESOURCE_SUPER_TYPE = "<unset>";
private final String resourceType;
-
+
private String resourceSuperType;
TypeOverwritingResourceWrapper(Resource delegatee, String
resourceType) {
Modified:
incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/SessionPoolManager.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/SessionPoolManager.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/SessionPoolManager.java
(original)
+++
incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/SessionPoolManager.java
Tue Jun 10 06:41:25 2008
@@ -80,7 +80,7 @@
/**
* @param credentials
* @param workspace
- * @return
+ * @return If the login is successful a new session.
* @throws LoginException
* @throws NoSuchWorkspaceException
* @throws RepositoryException
Modified:
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrItemResource.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrItemResource.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrItemResource.java
(original)
+++
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrItemResource.java
Tue Jun 10 06:41:25 2008
@@ -18,7 +18,6 @@
*/
package org.apache.sling.jcr.resource.internal.helper.jcr;
-import static
org.apache.sling.jcr.resource.JcrResourceConstants.SLING_RESOURCE_SUPER_TYPE_PROPERTY;
import static
org.apache.sling.jcr.resource.JcrResourceConstants.SLING_RESOURCE_TYPE_PROPERTY;
import java.util.Iterator;
Modified:
incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/helper/SlingLocatorFactory.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/helper/SlingLocatorFactory.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/helper/SlingLocatorFactory.java
(original)
+++
incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/helper/SlingLocatorFactory.java
Tue Jun 10 06:41:25 2008
@@ -37,7 +37,7 @@
"Request handle must not be null.");
}
-
+
// if href starts with the prefix, cut the prefix off the href
if (prefix != null && prefix.length() > 0) {
if (href.startsWith(prefix)) {
@@ -69,7 +69,7 @@
* workspace path and resource path, whithout modifying the specified
* Strings. Note, that it is expected that the resource path starts with
the
* given workspace path unless both values are <code>null</code>.
- *
+ *
* @param prefix
* @param workspacePath path or the workspace containing this resource or
* <code>null</code>.
@@ -85,17 +85,12 @@
/**
* Create a new <code>DavResourceLocator</code> from the specified prefix,
- * workspace path and resource path. If <code>isResourcePath</code> is set
- * to <code>false</code>, the given 'resourcePath' is converted by
- * calling [EMAIL PROTECTED] #getResourcePath(String, String)}. Otherwise
the same
- * restriction applies as for
- * [EMAIL PROTECTED] #createResourceLocator(String, String, String)}.
- *
+ * workspace path and resource path. I
+ *
* @param prefix
* @param workspacePath
- * @param path
+ * @param resourcePath
* @param isResourcePath
- * @return
* @see DavLocatorFactory#createResourceLocator(String, String, String,
* boolean)
*/
Modified:
incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/helper/SlingResourceLocator.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/helper/SlingResourceLocator.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/helper/SlingResourceLocator.java
(original)
+++
incubator/sling/trunk/jcr/webdav/src/main/java/org/apache/sling/jcr/webdav/impl/helper/SlingResourceLocator.java
Tue Jun 10 06:41:25 2008
@@ -54,7 +54,7 @@
/**
* Return the prefix used to build the href String. This includes the
* initial hrefPrefix as well a the path prefix.
- *
+ *
* @return prefix String used to build the href.
*/
public String getPrefix() {
@@ -65,7 +65,7 @@
* Returns the resource path which always starts with the workspace
* path, if a workspace resource exists. For the top most resource
* (request handle '/'), <code>null</code> is returned.
- *
+ *
* @return resource path or <code>null</code>
* @see org.apache.jackrabbit.webdav.DavResourceLocator#getResourcePath()
*/
@@ -76,7 +76,7 @@
/**
* Return the workspace path or <code>null</code> if this locator
* object represents the '/' request handle.
- *
+ *
* @return workspace path or <code>null</code>
* @see org.apache.jackrabbit.webdav.DavResourceLocator#getWorkspacePath()
*/
@@ -88,7 +88,7 @@
* Return the workspace name or <code>null</code> if this locator
* object represents the '/' request handle, which does not contain a
* workspace path.
- *
+ *
* @return workspace name or <code>null</code>
* @see org.apache.jackrabbit.webdav.DavResourceLocator#getWorkspaceName()
*/
@@ -99,7 +99,7 @@
/**
* Returns true if the specified locator object refers to a resource
* within the same workspace.
- *
+ *
* @param locator
* @return true if the workspace name obtained from the given locator
* refers to the same workspace as the workspace name of this
@@ -115,7 +115,7 @@
/**
* Returns true if the specified string equals to this workspace name or
* if both names are null.
- *
+ *
* @param workspaceName
* @return true if the workspace name is equal to this workspace name.
* @see DavResourceLocator#isSameWorkspace(String)
@@ -132,7 +132,7 @@
* starts with the workspace path). It assures a trailing '/' in case
* the href is used for collection. Note, that the resource path is
* [EMAIL PROTECTED] Text#escapePath(String) escaped}.
- *
+ *
* @param isCollection
* @return href String representing the text of the href element
* @see org.apache.jackrabbit.webdav.DavConstants#XML_HREF
@@ -144,7 +144,7 @@
/**
* Returns true if the 'workspacePath' field is <code>null</code>.
- *
+ *
* @return true if the 'workspacePath' field is <code>null</code>.
* @see org.apache.jackrabbit.webdav.DavResourceLocator#isRootLocation()
*/
@@ -154,7 +154,7 @@
/**
* Return the factory that created this locator.
- *
+ *
* @return factory
* @see org.apache.jackrabbit.webdav.DavResourceLocator#getFactory()
*/
@@ -163,9 +163,9 @@
}
/**
- * Uses [EMAIL PROTECTED] AbstractLocatorFactory#getRepositoryPath(String,
String)}
+ * Uses [EMAIL PROTECTED] #getResourcePath()}
* to build the repository path.
- *
+ *
* @see DavResourceLocator#getRepositoryPath()
*/
public String getRepositoryPath() {
@@ -178,7 +178,7 @@
* Computes the hash code from the href, that is built from the prefix,
* the workspace name and the resource path all of them representing
* final instance fields.
- *
+ *
* @return the hash code
*/
public int hashCode() {
@@ -188,7 +188,7 @@
/**
* Returns true, if the given object is a
* <code>SlingResourceLocator</code> with the same hash code.
- *
+ *
* @param obj the object to compare to
* @return <code>true</code> if the 2 objects are equal;
* <code>false</code> otherwise
Modified:
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/issues/SLING457Test.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/issues/SLING457Test.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/issues/SLING457Test.java
(original)
+++
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/issues/SLING457Test.java
Tue Jun 10 06:41:25 2008
@@ -21,11 +21,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.sling.api.SlingConstants;
-import org.apache.sling.api.resource.Resource;
-import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.commons.testing.integration.HttpTestBase;
-import org.apache.sling.servlets.post.SlingPostConstants;
public class SLING457Test extends HttpTestBase {
@@ -59,7 +55,7 @@
props.clear();
props.put("sling:resourceType", rtB);
contentUrl = testClient.createNode(HTTP_BASE_URL + rtX, props);
-
+
// create content node "x/image" of type rtB
String rtXImage = rtX + "/image";
props.clear();
@@ -76,7 +72,7 @@
testClient.delete(testRootUrl);
super.tearDown();
}
-
+
public void testCallFooHtml() throws Exception {
String url = contentUrl + ".foo.html";
String content = getContent(url, CONTENT_TYPE_HTML);
Modified:
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletAtCopyTest.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletAtCopyTest.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletAtCopyTest.java
(original)
+++
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletAtCopyTest.java
Tue Jun 10 06:41:25 2008
@@ -20,11 +20,7 @@
import java.util.HashMap;
import java.util.Map;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.sling.commons.testing.integration.HttpStatusCodeException;
import org.apache.sling.commons.testing.integration.HttpTestBase;
-import org.apache.sling.servlets.post.SlingPostConstants;
/** Test item copy support by @CopyFrom suffix (SLING-455) */
public class PostServletAtCopyTest extends HttpTestBase {
@@ -41,73 +37,73 @@
Map<String, String> props = new HashMap<String, String>();
props.put("text", "Hello");
testClient.createNode(HTTP_BASE_URL + testPath + "/src", props);
-
+
// assert content at source location
final String oldContent = getContent(HTTP_BASE_URL + testPath +
"/src.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", oldContent, "out.println(data.text)");
-
+
// create dest with text set from src/text
props.clear();
props.put("[EMAIL PROTECTED]", testPath + "/src");
testClient.createNode(HTTP_BASE_URL + testPath + "/dest", props);
-
+
// assert content at new location
String content = getContent(HTTP_BASE_URL + testPath +
"/dest.-1.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", content, "out.println(data.src.text)");
-
+
// assert content at old location
String contentOld = getContent(HTTP_BASE_URL + testPath +
"/src.-1.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", contentOld, "out.println(data.text)");
}
-
+
public void testCopyNodeRelative() throws IOException {
final String testPath = TEST_BASE_PATH + "/rel/" +
System.currentTimeMillis();
Map<String, String> props = new HashMap<String, String>();
props.put("text", "Hello");
testClient.createNode(HTTP_BASE_URL + testPath + "/src", props);
-
+
// assert content at source location
final String oldContent = getContent(HTTP_BASE_URL + testPath +
"/src.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", oldContent, "out.println(data.text)");
-
+
// create dest with text set from src/text
props.clear();
props.put("[EMAIL PROTECTED]", "../src");
testClient.createNode(HTTP_BASE_URL + testPath + "/dest", props);
-
+
// assert content at new location
String content = getContent(HTTP_BASE_URL + testPath +
"/dest.-1.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", content, "out.println(data.src.text)");
-
+
// assert content at old location
String contentOld = getContent(HTTP_BASE_URL + testPath +
"/src.-1.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", contentOld, "out.println(data.text)");
}
-
+
public void testCopyPropertyAbsolute() throws IOException {
final String testPath = TEST_BASE_PATH + "/abs/" +
System.currentTimeMillis();
Map<String, String> props = new HashMap<String, String>();
props.put("text", "Hello");
testClient.createNode(HTTP_BASE_URL + testPath + "/src", props);
-
+
// assert content at source location
final String oldContent = getContent(HTTP_BASE_URL + testPath +
"/src.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", oldContent, "out.println(data.text)");
-
+
// create dest with text set from src/text
props.clear();
props.put("[EMAIL PROTECTED]", testPath + "/src/text");
testClient.createNode(HTTP_BASE_URL + testPath + "/dest", props);
-
+
// assert content at new location
String content = getContent(HTTP_BASE_URL + testPath + "/dest.json",
CONTENT_TYPE_JSON);
assertJavascript("Hello", content, "out.println(data.text)");
-
+
// assert content at old location
String contentOld = getContent(HTTP_BASE_URL + testPath + "/src.json",
CONTENT_TYPE_JSON);
assertJavascript("Hello", contentOld, "out.println(data.text)");
}
-
+
public void testCopyPropertyRelative() throws IOException {
final String testPath = TEST_BASE_PATH + "/rel/" +
System.currentTimeMillis();
Map<String, String> props = new HashMap<String, String>();
@@ -117,16 +113,16 @@
// assert content at source location
final String oldContent = getContent(HTTP_BASE_URL + testPath +
"/src.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", oldContent, "out.println(data.text)");
-
+
// create dest with text set from src/text
props.clear();
props.put("[EMAIL PROTECTED]", "../src/text");
testClient.createNode(HTTP_BASE_URL + testPath + "/dest", props);
-
+
// assert content at new location
String content = getContent(HTTP_BASE_URL + testPath + "/dest.json",
CONTENT_TYPE_JSON);
assertJavascript("Hello", content, "out.println(data.text)");
-
+
// assert content at old location
String contentOld = getContent(HTTP_BASE_URL + testPath + "/src.json",
CONTENT_TYPE_JSON);
assertJavascript("Hello", contentOld, "out.println(data.text)");
Modified:
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletAtMoveTest.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletAtMoveTest.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletAtMoveTest.java
(original)
+++
incubator/sling/trunk/launchpad/webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletAtMoveTest.java
Tue Jun 10 06:41:25 2008
@@ -22,9 +22,7 @@
import javax.servlet.http.HttpServletResponse;
-import org.apache.sling.commons.testing.integration.HttpStatusCodeException;
import org.apache.sling.commons.testing.integration.HttpTestBase;
-import org.apache.sling.servlets.post.SlingPostConstants;
/** Test item move support by @MoveFrom suffix (SLING-455) */
public class PostServletAtMoveTest extends HttpTestBase {
@@ -41,70 +39,70 @@
Map<String, String> props = new HashMap<String, String>();
props.put("text", "Hello");
testClient.createNode(HTTP_BASE_URL + testPath + "/src", props);
-
+
// assert content at source location
final String oldContent = getContent(HTTP_BASE_URL + testPath +
"/src.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", oldContent, "out.println(data.text)");
-
+
// create dest with text set from src/text
props.clear();
props.put("[EMAIL PROTECTED]", testPath + "/src");
testClient.createNode(HTTP_BASE_URL + testPath + "/dest", props);
-
+
// assert content at new location
String content = getContent(HTTP_BASE_URL + testPath +
"/dest.-1.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", content, "out.println(data.src.text)");
-
+
// assert no content at old location
assertHttpStatus(HTTP_BASE_URL + testPath + "/src.json",
HttpServletResponse.SC_NOT_FOUND,
"Expected Not_Found for old content");
}
-
+
public void testMoveNodeRelative() throws IOException {
final String testPath = TEST_BASE_PATH + "/rel/" +
System.currentTimeMillis();
Map<String, String> props = new HashMap<String, String>();
props.put("text", "Hello");
testClient.createNode(HTTP_BASE_URL + testPath + "/src", props);
-
+
// assert content at source location
final String oldContent = getContent(HTTP_BASE_URL + testPath +
"/src.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", oldContent, "out.println(data.text)");
-
+
// create dest with text set from src/text
props.clear();
props.put("[EMAIL PROTECTED]", "../src");
testClient.createNode(HTTP_BASE_URL + testPath + "/dest", props);
-
+
// assert content at new location
String content = getContent(HTTP_BASE_URL + testPath +
"/dest.-1.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", content, "out.println(data.src.text)");
-
+
// assert no content at old location
assertHttpStatus(HTTP_BASE_URL + testPath + "/src.json",
HttpServletResponse.SC_NOT_FOUND,
"Expected Not_Found for old content");
}
-
+
public void testMovePropertyAbsolute() throws IOException {
final String testPath = TEST_BASE_PATH + "/abs/" +
System.currentTimeMillis();
Map<String, String> props = new HashMap<String, String>();
props.put("text", "Hello");
testClient.createNode(HTTP_BASE_URL + testPath + "/src", props);
-
+
// assert content at source location
final String oldContent = getContent(HTTP_BASE_URL + testPath +
"/src.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", oldContent, "out.println(data.text)");
-
+
// create dest with text set from src/text
props.clear();
props.put("[EMAIL PROTECTED]", testPath + "/src/text");
testClient.createNode(HTTP_BASE_URL + testPath + "/dest", props);
-
+
// assert content at new location
String content = getContent(HTTP_BASE_URL + testPath + "/dest.json",
CONTENT_TYPE_JSON);
assertJavascript("Hello", content, "out.println(data.text)");
-
+
// assert no content at old location
assertHttpStatus(HTTP_BASE_URL + testPath + "/src.json",
HttpServletResponse.SC_OK, "Expected source parent existing");
@@ -112,7 +110,7 @@
HttpServletResponse.SC_NOT_FOUND,
"Expected Not_Found for old content");
}
-
+
public void testMovePropertyRelative() throws IOException {
final String testPath = TEST_BASE_PATH + "/rel/" +
System.currentTimeMillis();
Map<String, String> props = new HashMap<String, String>();
@@ -122,16 +120,16 @@
// assert content at source location
final String oldContent = getContent(HTTP_BASE_URL + testPath +
"/src.json", CONTENT_TYPE_JSON);
assertJavascript("Hello", oldContent, "out.println(data.text)");
-
+
// create dest with text set from src/text
props.clear();
props.put("[EMAIL PROTECTED]", "../src/text");
testClient.createNode(HTTP_BASE_URL + testPath + "/dest", props);
-
+
// assert content at new location
String content = getContent(HTTP_BASE_URL + testPath + "/dest.json",
CONTENT_TYPE_JSON);
assertJavascript("Hello", content, "out.println(data.text)");
-
+
// assert no content at old location
assertHttpStatus(HTTP_BASE_URL + testPath + "/src.json",
HttpServletResponse.SC_OK, "Expected source parent existing");
Modified:
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/RequestProperty.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/RequestProperty.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/RequestProperty.java
(original)
+++
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/RequestProperty.java
Tue Jun 10 06:41:25 2008
@@ -112,7 +112,7 @@
/**
* Checks if this property provides any values. this is the case if one of
* the values is not empty or if the default handling is not 'ignore'
- *
+ *
* @return <code>true</code> if this property provides values
*/
public boolean providesValue() {
@@ -134,7 +134,7 @@
/**
* Returns the assembled string array out of the provided request values
and
* default values.
- *
+ *
* @return a String array or <code>null</code> if the property needs to be
* removed.
*/
@@ -171,7 +171,7 @@
/**
* Specifies whether this property should be deleted before any new content
* is to be set according to the values stored.
- *
+ *
* @param isDelete <code>true</code> if the repository item described by
* this is to be deleted before any other operation.
*/
@@ -191,8 +191,8 @@
* Sets the path of the repository item from which the content for this
* property is to be copied or moved. The path may be relative in which
case
* it will be resolved relative to the absolute path of this property.
- *
- * @param path The path of the repository item to get the content from
+ *
+ * @param sourcePath The path of the repository item to get the content
from
* @param isMove <code>true</code> if the source content is to be moved,
* otherwise the source content is copied from the repository
* item.
@@ -212,7 +212,7 @@
/**
* Returns <code>true</code> if the content of this property is to be set
* by moving content from another repository item.
- *
+ *
* @see #getRepositorySource()
*/
public boolean hasRepositoryMoveSource() {
@@ -222,7 +222,7 @@
/**
* Returns <code>true</code> if the content of this property is to be set
* by copying content from another repository item.
- *
+ *
* @see #getRepositorySource()
*/
public boolean hasRepositoryCopySource() {
@@ -232,7 +232,7 @@
/**
* Returns the absolute path of the repository item from which the content
* for this property is to be copied or moved.
- *
+ *
* @see #hasRepositoryCopySource()
* @see #hasRepositoryMoveSource()
* @see #setRepositorySource(String, boolean)
Modified:
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingFileUploadHandler.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingFileUploadHandler.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingFileUploadHandler.java
(original)
+++
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingFileUploadHandler.java
Tue Jun 10 06:41:25 2008
@@ -89,7 +89,7 @@
/**
* Constructs file upload handler
- * @param ctx the post processor
+ * @param servletCtx the post processor
*/
public SlingFileUploadHandler(ServletContext servletCtx) {
this.servletContext = servletCtx;
Modified:
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingPropertyValueHandler.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingPropertyValueHandler.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingPropertyValueHandler.java
(original)
+++
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/SlingPropertyValueHandler.java
Tue Jun 10 06:41:25 2008
@@ -56,7 +56,7 @@
* the post processor
*/
private final HtmlResponse response;
-
+
private final DateParser dateParser;
/**
@@ -66,7 +66,6 @@
/**
* Constructs a propert value handler
- * @param ctx the post processor
*/
public SlingPropertyValueHandler(DateParser dateParser, HtmlResponse
response) {
this.dateParser = dateParser;
Modified:
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/CopyOperation.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/CopyOperation.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/CopyOperation.java
(original)
+++
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/CopyOperation.java
Tue Jun 10 06:41:25 2008
@@ -22,10 +22,8 @@
import javax.jcr.Property;
import javax.jcr.PropertyIterator;
import javax.jcr.RepositoryException;
-import javax.jcr.Session;
import javax.jcr.nodetype.NodeType;
-import org.apache.sling.api.resource.ResourceUtil;
import org.apache.sling.api.servlets.HtmlResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -61,7 +59,7 @@
/**
* Copy the <code>src</code> item into the <code>dstParent</code> node.
* The name of the newly created item is set to <code>name</code>.
- *
+ *
* @param src The item to copy to the new location
* @param dstParent The node into which the <code>src</code> node is to be
* copied
@@ -89,7 +87,7 @@
* This method does a recursive (deep) copy of the subtree rooted at the
* source node to the destination. Any protected child nodes and and
* properties are not copied.
- *
+ *
* @param src The node to copy to the new location
* @param dstParent The node into which the <code>src</code> node is to be
* copied
@@ -137,7 +135,7 @@
* node. The name of the newly created property is set to
<code>name</code>.
* <p>
* If the source property is protected, this method does nothing.
- *
+ *
* @param src The property to copy to the new location
* @param dstParent The node into which the <code>src</code> property is
* to be copied
Modified:
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/MoveOperation.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/MoveOperation.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/MoveOperation.java
(original)
+++
incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/MoveOperation.java
Tue Jun 10 06:41:25 2008
@@ -21,8 +21,6 @@
import javax.jcr.Session;
import org.apache.sling.api.servlets.HtmlResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* The <code>MoveOperation</code> class implements the
@@ -47,7 +45,7 @@
String sourcePath = source.getPath();
String destPath = destParent + "/" + destName;
Session session = source.getSession();
-
+
if (session.itemExists(destPath)) {
session.getItem(destPath).remove();
}
Modified:
incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceProvider.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceProvider.java?rev=666103&r1=666102&r2=666103&view=diff
==============================================================================
---
incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceProvider.java
(original)
+++
incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceProvider.java
Tue Jun 10 06:41:25 2008
@@ -27,7 +27,6 @@
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceProvider;
import org.apache.sling.api.resource.ResourceResolver;
-import org.apache.sling.api.servlets.HttpConstants;
public class ServletResourceProvider implements ResourceProvider {