You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2019/08/29 14:07:52 UTC
svn commit: r1866075 - in /jackrabbit/branches/2.16: ./
jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
Author: reschke
Date: Thu Aug 29 14:07:52 2019
New Revision: 1866075
URL: http://svn.apache.org/viewvc?rev=1866075&view=rev
Log:
JCR-4438: jcr-webdav: AbstractLocatorFactory - fix Javadoc and add trace logging (merged r1859563 into 2.16)
Modified:
jackrabbit/branches/2.16/ (props changed)
jackrabbit/branches/2.16/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
Propchange: jackrabbit/branches/2.16/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 29 14:07:52 2019
@@ -1,3 +1,3 @@
/jackrabbit/branches/JCR-2272:1173165-1176545
/jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1816227,1817094,1817097-1817098,1817100,1817113,1817201,1817213,1817341,1817373,1817377,1818586,1819269,1819271,1819839,1819849,1820119,1820133,1820294,1820573,1820675,1820753,1821247,1821475,1821597,1821705,1821880,1822643,1822863,1822947,1822950,1824756,1824763-1824764,1824771,1824876,1826154,1826178,1826230,1826647,1826940,1826964,1828213,1830107,1830201,1830540,1830753,1830814,1830878,1830951,1831182,1831854,1831860,1832058,1832090,1832177,1833374,1833835,1833891,1834008,1834308,1834315,1834401,1834418,1834424,1834673,1834922,1835445,1835448,1835459,1836341,1836349,1836620,1836722,1836729,1836731,1836733,1836773,1836776,1836778,1836794,1836800,1839647,1839910,1839924,1839931,1839937,1839945,1839964,1839966,1840007,1840027,1841459,1841858,1841865,1841916-1841917,1841924,1843392,1843995,1844000,1844014,1844030,1844036,1844067,1844252,1846665,1846896,1847167,1850224,1851360,1851369,1851372,1851380,1851384,1851904,1851946,1851953,1851961,1852417,1853927,1854018,185
6855,1856969,1857631,1857721,1859534,1859633
+/jackrabbit/trunk:1816227,1817094,1817097-1817098,1817100,1817113,1817201,1817213,1817341,1817373,1817377,1818586,1819269,1819271,1819839,1819849,1820119,1820133,1820294,1820573,1820675,1820753,1821247,1821475,1821597,1821705,1821880,1822643,1822863,1822947,1822950,1824756,1824763-1824764,1824771,1824876,1826154,1826178,1826230,1826647,1826940,1826964,1828213,1830107,1830201,1830540,1830753,1830814,1830878,1830951,1831182,1831854,1831860,1832058,1832090,1832177,1833374,1833835,1833891,1834008,1834308,1834315,1834401,1834418,1834424,1834673,1834922,1835445,1835448,1835459,1836341,1836349,1836620,1836722,1836729,1836731,1836733,1836773,1836776,1836778,1836794,1836800,1839647,1839910,1839924,1839931,1839937,1839945,1839964,1839966,1840007,1840027,1841459,1841858,1841865,1841916-1841917,1841924,1843392,1843995,1844000,1844014,1844030,1844036,1844067,1844252,1846665,1846896,1847167,1850224,1851360,1851369,1851372,1851380,1851384,1851904,1851946,1851953,1851961,1852417,1853927,1854018,185
6855,1856969,1857631,1857721,1859534,1859563,1859633
Modified: jackrabbit/branches/2.16/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.16/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java?rev=1866075&r1=1866074&r2=1866075&view=diff
==============================================================================
--- jackrabbit/branches/2.16/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java (original)
+++ jackrabbit/branches/2.16/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java Thu Aug 29 14:07:52 2019
@@ -21,9 +21,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * <code>AbstractLocatorFactory</code> is an implementation of the DavLocatorFactory
- * interface that defines how a given uri is split to workspace path an
- * resource path and how it's implementation of <code>DavResourceLocator</code>
+ * {@code AbstractLocatorFactory} is an implementation of the DavLocatorFactory
+ * interface that defines how a given URI is split to workspace path and
+ * resource path and how it's implementation of {@code DavResourceLocator}
* builds the href. In contrast, the conversion from repository path to
* resource path and vice versa is left to subclasses.
*/
@@ -37,7 +37,7 @@ public abstract class AbstractLocatorFac
* Create a new factory
*
* @param pathPrefix Prefix, that needs to be removed in order to retrieve
- * the path of the repository item from a given <code>DavResourceLocator</code>.
+ * the path of the repository item from a given {@code DavResourceLocator}.
*/
public AbstractLocatorFactory(String pathPrefix) {
this.pathPrefix = pathPrefix;
@@ -45,12 +45,12 @@ public abstract class AbstractLocatorFac
//--------------------------------------------------< DavLocatorFactory >---
/**
- * Create a new <code>DavResourceLocator</code>. Any leading prefix and
+ * Create a new {@code DavResourceLocator}. Any leading prefix and
* path-prefix (as defined with the constructor) are removed from the
* given request handle. The same applies for trailing '/'. The remaining
* String is called the 'resource handle' and it's first segment is treated
- * as workspace name. If resource handle (and therefore workspace name
- * are missing, both values are set to <code>null</code>.
+ * as workspace name. If resource handle (and therefore workspace name)
+ * are missing, both values are set to {@code null}.
* <p>
* Examples:
*
@@ -76,13 +76,13 @@ public abstract class AbstractLocatorFac
* -> href = http://www.foo.bar/pathPrefix/wspName/anypath
* </pre>
*
- * NOTE: If the given href is an absolute uri it must start with the
+ * NOTE: If the given href is an absolute URI it must start with the
* specified prefix.
*
* @param prefix
* @param href
- * @return a new <code>DavResourceLocator</code>
- * @throws IllegalArgumentException if the given href is <code>null</code>
+ * @return a new {@code DavResourceLocator}
+ * @throws IllegalArgumentException if the given href is {@code null}
*/
public DavResourceLocator createResourceLocator(String prefix, String href) {
if (href == null) {
@@ -132,6 +132,8 @@ public abstract class AbstractLocatorFac
}
}
+ log.trace("createResourceLocator: prefix='" + prefix + "' href='" + href + "' -> prefix='" + b.toString()
+ + "' workspacePath='" + workspacePath + "' resourcePath='" + resourcePath + "'");
return new DavResourceLocatorImpl(b.toString(), workspacePath, resourcePath, this);
}
@@ -145,17 +147,17 @@ public abstract class AbstractLocatorFac
}
/**
- * Create a new <code>DavResourceLocator</code> from the specified prefix,
+ * Create a new {@code DavResourceLocator} from the specified prefix,
* workspace path and resource path, without 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>.
+ * given workspace path unless both values are {@code null}.
*
* @param prefix
* @param workspacePath path or the workspace containing this resource or
- * <code>null</code>.
- * @param resourcePath Path of the resource or <code>null</code>. Any non
+ * {@code null}.
+ * @param resourcePath Path of the resource or {@code null}. Any non
* null value must start with the specified workspace path.
- * @return a new <code>DavResourceLocator</code>
+ * @return a new {@code DavResourceLocator}
* @see DavLocatorFactory#createResourceLocator(String, String, String)
*/
public DavResourceLocator createResourceLocator(String prefix, String workspacePath, String resourcePath) {
@@ -163,9 +165,9 @@ public abstract class AbstractLocatorFac
}
/**
- * 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
+ * Create a new {@code DavResourceLocator} from the specified prefix,
+ * workspace path and resource path. If {@code isResourcePath} is set
+ * to {@code false}, the given 'resourcePath' is converted by calling
* {@link #getResourcePath(String, String)}. Otherwise the same restriction
* applies as for {@link #createResourceLocator(String, String, String)}.
*
@@ -204,8 +206,8 @@ public abstract class AbstractLocatorFac
//--------------------------------------------------------< DavResource >---
/**
- * Private inner class <code>DavResourceLocatorImpl</code> implementing
- * the <code>DavResourceLocator</code> interface.
+ * Private inner class {@code DavResourceLocatorImpl} implementing
+ * the {@code DavResourceLocator} interface.
*/
private class DavResourceLocatorImpl implements DavResourceLocator {
@@ -217,7 +219,7 @@ public abstract class AbstractLocatorFac
private final String href;
/**
- * Create a new <code>DavResourceLocatorImpl</code>.
+ * Create a new {@code DavResourceLocatorImpl}.
*
* @param prefix
* @param workspacePath
@@ -260,9 +262,9 @@ public abstract class AbstractLocatorFac
/**
* 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.
+ * (request handle '/'), {@code null} is returned.
*
- * @return resource path or <code>null</code>
+ * @return resource path or {@code null}
* @see org.apache.jackrabbit.webdav.DavResourceLocator#getResourcePath()
*/
public String getResourcePath() {
@@ -270,10 +272,10 @@ public abstract class AbstractLocatorFac
}
/**
- * Return the workspace path or <code>null</code> if this locator object
+ * Return the workspace path or {@code null} if this locator object
* represents the '/' request handle.
*
- * @return workspace path or <code>null</code>
+ * @return workspace path or {@code null}
* @see org.apache.jackrabbit.webdav.DavResourceLocator#getWorkspacePath()
*/
public String getWorkspacePath() {
@@ -281,11 +283,11 @@ public abstract class AbstractLocatorFac
}
/**
- * Return the workspace name or <code>null</code> if this locator object
+ * Return the workspace name or {@code null} if this locator object
* represents the '/' request handle, which does not contain a workspace
* path.
*
- * @return workspace name or <code>null</code>
+ * @return workspace name or {@code null}
* @see org.apache.jackrabbit.webdav.DavResourceLocator#getWorkspaceName()
*/
public String getWorkspaceName() {
@@ -337,9 +339,9 @@ public abstract class AbstractLocatorFac
}
/**
- * Returns true if the 'workspacePath' field is <code>null</code>.
+ * Returns true if the 'workspacePath' field is {@code null}.
*
- * @return true if the 'workspacePath' field is <code>null</code>.
+ * @return true if the 'workspacePath' field is {@code null}.
* @see org.apache.jackrabbit.webdav.DavResourceLocator#isRootLocation()
*/
public boolean isRootLocation() {
@@ -379,12 +381,12 @@ public abstract class AbstractLocatorFac
}
/**
- * Returns true, if the given object is a <code>DavResourceLocatorImpl</code>
+ * Returns true, if the given object is a {@code DavResourceLocatorImpl}
* 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
+ * @return {@code true} if the 2 objects are equal;
+ * {@code false} otherwise
*/
@Override
public boolean equals(Object obj) {