You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2008/02/18 16:47:48 UTC
svn commit: r628785 - in /incubator/sling/trunk:
api/src/main/java/org/apache/sling/api/adapter/
api/src/main/java/org/apache/sling/api/request/
api/src/main/java/org/apache/sling/api/resource/
api/src/main/java/org/apache/sling/api/scripting/ api/src/...
Author: cziegeler
Date: Mon Feb 18 07:47:41 2008
New Revision: 628785
URL: http://svn.apache.org/viewvc?rev=628785&view=rev
Log:
Clean up javadocs.
Modified:
incubator/sling/trunk/api/src/main/java/org/apache/sling/api/adapter/AdapterFactory.java
incubator/sling/trunk/api/src/main/java/org/apache/sling/api/adapter/AdapterManager.java
incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestDispatcherOptions.java
incubator/sling/trunk/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java
incubator/sling/trunk/api/src/main/java/org/apache/sling/api/scripting/SlingScript.java
incubator/sling/trunk/api/src/main/java/org/apache/sling/api/wrappers/SlingRequestPaths.java
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/SyntheticResource.java
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourcePathIterator.java
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/loader/Loader.java
Modified: incubator/sling/trunk/api/src/main/java/org/apache/sling/api/adapter/AdapterFactory.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/api/src/main/java/org/apache/sling/api/adapter/AdapterFactory.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/api/src/main/java/org/apache/sling/api/adapter/AdapterFactory.java (original)
+++ incubator/sling/trunk/api/src/main/java/org/apache/sling/api/adapter/AdapterFactory.java Mon Feb 18 07:47:41 2008
@@ -66,8 +66,8 @@
* Note that the <code>adaptable</code> object is not required to
* implement the <code>Adaptable</code> interface, though most of the time
* this method is called by means of calling the
- * {@link SlingAdaptable#adaptTo(Class)} method.
- *
+ * {@link org.apache.sling.adapter.SlingAdaptable#adaptTo(Class)} method.
+ *
* @param <AdapterType> The generic type of the adapter (target) type.
* @param adaptable The object to adapt to the adapter type.
* @param type The type to which the object is to be adapted.
Modified: incubator/sling/trunk/api/src/main/java/org/apache/sling/api/adapter/AdapterManager.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/api/src/main/java/org/apache/sling/api/adapter/AdapterManager.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/api/src/main/java/org/apache/sling/api/adapter/AdapterManager.java (original)
+++ incubator/sling/trunk/api/src/main/java/org/apache/sling/api/adapter/AdapterManager.java Mon Feb 18 07:47:41 2008
@@ -22,7 +22,7 @@
* The <code>AdapterManager</code> defines the service interface for a manager
* for object adaption. The adapter manager coordinates the registered
* {@link AdapterFactory} services on behalf of clients wishing to adapt objects
- * to other types. One such client is the {@link SlingAdaptable} class, which
+ * to other types. One such client is the {@link org.apache.sling.adapter.SlingAdaptable} class, which
* uses the implementation of this bundle to adapt "itself".
* <p>
* This interface is not intended to be implemented by clients.
@@ -36,7 +36,7 @@
* The <code>adaptable</code> object may be any non-<code>null</code>
* object and is not required to implement the <code>Adaptable</code>
* interface.
- *
+ *
* @param <AdapterType> The generic type of the adapter (target) type.
* @param adaptable The object to adapt to the adapter type.
* @param type The type to which the object is to be adapted.
Modified: incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestDispatcherOptions.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestDispatcherOptions.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestDispatcherOptions.java (original)
+++ incubator/sling/trunk/api/src/main/java/org/apache/sling/api/request/RequestDispatcherOptions.java Mon Feb 18 07:47:41 2008
@@ -23,7 +23,7 @@
/**
* <code>RequestDispatcherOptions</code> are used in the
- * {@link SlingHttpServletRequest#getRequestDispatcher(org.apache.sling.api.resource.Resource, RequestDispatcherOptions)}
+ * {@link org.apache.sling.api.SlingHttpServletRequest#getRequestDispatcher(org.apache.sling.api.resource.Resource, RequestDispatcherOptions)}
* method, to give more control on some aspects of the include/forward
* mechanism. Typical use cases include:
* <ul>
@@ -85,7 +85,7 @@
* value. Hence a <code>RequestDispatcherOptions</code> object is created
* from the name value pair list.</li>
* </ul>
- *
+ *
* @param options The options to set.
*/
public RequestDispatcherOptions(String options) {
Modified: incubator/sling/trunk/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java (original)
+++ incubator/sling/trunk/api/src/main/java/org/apache/sling/api/resource/ResourceProvider.java Mon Feb 18 07:47:41 2008
@@ -51,14 +51,14 @@
/**
* Returns a resource from this resource provider or <code>null</code> if
* the resource provider cannot find it. The path should have one of the
- * {@link #getRoots()} strings as its prefix.
+ * {@link #ROOTS} strings as its prefix.
* <p>
* This method is called to resolve a resource for the given request. The
* properties of the request, such as request parameters, may be use to
* parametrize the resource resolution. An example of such parametrization
* is support for a JSR-311 style resource provider to support the
* parametrized URL patterns.
- *
+ *
* @param resourceResolver The {@link ResourceResolver} to which the
* returned {@link Resource} is attached.
* @return <code>null</code> If this provider does not have a resource for
@@ -72,8 +72,8 @@
/**
* Returns a resource from this resource provider or <code>null</code> if
* the resource provider cannot find it. The path should have one of the
- * {@link #getRoots()} strings as its prefix.
- *
+ * {@link #ROOTS} strings as its prefix.
+ *
* @param resourceResolver The {@link ResourceResolver} to which the
* returned {@link Resource} is attached.
* @return <code>null</code> If this provider does not have a resource for
@@ -91,7 +91,7 @@
* <p>
* This method is only called for resource providers whose root path list
* contains an entry which is a prefix for the path of the parent resource.
- *
+ *
* @param parent The {@link Resource Resource} whose children are requested.
* @return An <code>Iterator</code> of {@link Resource} objects or
* <code>null</code> if the resource provider has no children for
Modified: incubator/sling/trunk/api/src/main/java/org/apache/sling/api/scripting/SlingScript.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/api/src/main/java/org/apache/sling/api/scripting/SlingScript.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/api/src/main/java/org/apache/sling/api/scripting/SlingScript.java (original)
+++ incubator/sling/trunk/api/src/main/java/org/apache/sling/api/scripting/SlingScript.java Mon Feb 18 07:47:41 2008
@@ -28,10 +28,8 @@
* method.
* <p>
* Objects implementing this interface are returned by the
- * {@link SlingScriptResolver#resolveScript(org.apache.sling.api.SlingHttpServletRequest)}
- * and
* {@link SlingScriptResolver#findScript(org.apache.sling.api.resource.ResourceResolver, String)}
- * methods.
+ * method.
*/
public interface SlingScript {
Modified: incubator/sling/trunk/api/src/main/java/org/apache/sling/api/wrappers/SlingRequestPaths.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/api/src/main/java/org/apache/sling/api/wrappers/SlingRequestPaths.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/api/src/main/java/org/apache/sling/api/wrappers/SlingRequestPaths.java (original)
+++ incubator/sling/trunk/api/src/main/java/org/apache/sling/api/wrappers/SlingRequestPaths.java Mon Feb 18 07:47:41 2008
@@ -23,7 +23,7 @@
/**
* This class is not a "wrapper" per se, but computes the correct path info,
* request URI, etc. for included requests. When including a request via
- * {@link RequestDispatcher}, the Servlet API specifies that target paths of
+ * {@link javax.servlet.RequestDispatcher}, the Servlet API specifies that target paths of
* the included request are available as request attributes.
* Request.getPathInfo(), for example will return the value for the including
* request, *not* for the included one.
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/SyntheticResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/SyntheticResource.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/SyntheticResource.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/SyntheticResource.java Mon Feb 18 07:47:41 2008
@@ -27,8 +27,6 @@
* <code>Resource</code> interface which may be used to provide a resource
* object which has no related repository item.
* <p>
- * Clients may call the {@link #setRawData(Object)} and
- * {@link #setObject(Object)} method as appropriate.
* TODO: a similar interface exists in microsling, we might want to
* consolidate (see SLING-129).
*/
@@ -73,7 +71,7 @@
public ResourceResolver getResourceResolver() {
return null;
}
-
+
public <Type> Type adaptTo(Class<Type> type) {
return null;
}
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java Mon Feb 18 07:47:41 2008
@@ -18,8 +18,6 @@
*/
package org.apache.sling.jcr.resource.internal;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
import java.security.AccessControlException;
import java.util.Collections;
import java.util.HashMap;
@@ -52,8 +50,7 @@
/**
* The <code>JcrResourceResolver</code> class implements the Sling
- * <code>ResourceResolver</code> and <code>ResourceResolver</code>
- * interfaces and in addition is a {@link PathMapper}. Instances of this class
+ * <code>ResourceResolver</code> interface. Instances of this class
* are retrieved through the
* {@link org.apache.sling.jcr.resource.JcrResourceResolverFactory#getResourceResolver(Session)}
* method.
@@ -329,7 +326,7 @@
/**
* Creates a JcrNodeResource with the given path if existing
- *
+ *
* @throws AccessControlException If an item exists but this manager has no
* read access
*/
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java Mon Feb 18 07:47:41 2008
@@ -170,9 +170,6 @@
/**
* Returns a new <code>ResourceResolve</code> for the given session. Note
* that each call to this method returns a new resource manager instance.
- * The resource manager returned also implements the
- * {@link org.apache.sling.jcr.resource.PathResolver} interface to which it
- * may be cast.
*/
public ResourceResolver getResourceResolver(Session session) {
JcrResourceProviderEntry sessionRoot = new JcrResourceProviderEntry(
@@ -355,8 +352,6 @@
componentContext.getBundleContext().addBundleListener(this);
try {
- Session session = getAdminSession(null);
-
Bundle[] bundles = componentContext.getBundleContext().getBundles();
for (Bundle bundle : bundles) {
if (bundle.getState() == Bundle.ACTIVE) {
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourcePathIterator.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourcePathIterator.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourcePathIterator.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourcePathIterator.java Mon Feb 18 07:47:41 2008
@@ -19,8 +19,6 @@
import java.util.Iterator;
import java.util.NoSuchElementException;
-import org.apache.sling.api.servlets.HttpConstants;
-
/**
* Iterate over the the HTTP request path by creating shorter segments of that
* path using "." as a separator.
@@ -42,11 +40,9 @@
/**
* Creates a new instance iterating over the given path
- *
+ *
* @param path The path to iterate over. If this is empty or
* <code>null</code> this iterator will not return anything.
- * @param httpMethod The HTTP request method causing this iterator to be
- * created.
*/
public ResourcePathIterator(String path) {
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/ResourceProviderEntry.java Mon Feb 18 07:47:41 2008
@@ -22,6 +22,7 @@
import java.util.SortedSet;
import java.util.TreeSet;
+import org.apache.sling.api.SlingException;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceProvider;
import org.apache.sling.api.resource.ResourceResolver;
@@ -56,7 +57,7 @@
/**
* Creates an instance of this class with the given path relative to the
* parent resource provider entry, encapsulating the given ResourceProvider.
- *
+ *
* @param path The relative path supported by the provider
* @param provider The resource provider to encapsulate by this entry.
*/
@@ -68,7 +69,7 @@
* Creates an instance of this class with the given path relative to the
* parent resource provider entry, encapsulating the given ResourceProvider,
* and a number of inital child entries.
- *
+ *
* @param path The relative path supported by the provider
* @param provider The resource provider to encapsulate by this entry.
*/
@@ -103,11 +104,11 @@
* Returns the resource with the given path or <code>null</code> if
* neither the resource provider of this entry nor the resource provider of
* any of the child entries can provide the resource.
- *
+ *
* @param path The path to the resource to return.
* @return The resource for the path or <code>null</code> if no resource
* can be found.
- * @throws SlingException if an error occurrs trying to access an existing
+ * @throws org.apache.sling.api.SlingException if an error occurrs trying to access an existing
* resource.
*/
public Resource getResource(ResourceResolver resourceResolver, String path) {
@@ -122,7 +123,7 @@
* This method implements the {@link #getResource(String)} method
* recursively calling itself on any child provide entries matching the
* path.
- *
+ *
* @param path The path to the resource to return relative to the parent
* resource provider entry, which called this method.
* @param fullPath The actual path to the resource as provided to the
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java Mon Feb 18 07:47:41 2008
@@ -18,6 +18,7 @@
*/
package org.apache.sling.jcr.resource.internal.helper.jcr;
+import java.security.AccessControlException;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -115,7 +116,7 @@
* given path. If no item exists at that path or the item does not have
* read-access for the session of this resolver, <code>null</code> is
* returned.
- *
+ *
* @param path The absolute path
* @return The <code>Resource</code> for the item at the given path.
* @throws RepositoryException If an error occurrs accessingor checking the
@@ -149,13 +150,13 @@
* Checks whether the item exists and this content manager's session has
* read access to the item. If the item does not exist, access control is
* ignored by this method and <code>false</code> is returned.
- *
+ *
* @param path The path to the item to check
* @return <code>true</code> if the item exists and this content manager's
* session has read access. If the item does not exist,
* <code>false</code> is returned ignoring access control.
* @throws RepositoryException
- * @throws AccessControlException If the item really exists but this content
+ * @throws java.security.AccessControlException If the item really exists but this content
* manager's session has no read access to it.
*/
public boolean itemExists(String path) throws RepositoryException {
@@ -171,7 +172,7 @@
* @param path
* @param actions
* @throws RepositoryException
- * @throws AccessControlException if this manager does not have the
+ * @throws java.security.AccessControlException if this manager does not have the
* permission for the listed action(s).
*/
protected void checkPermission(String path, String actions)
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/loader/Loader.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/loader/Loader.java?rev=628785&r1=628784&r2=628785&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/loader/Loader.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/loader/Loader.java Mon Feb 18 07:47:41 2008
@@ -20,7 +20,6 @@
import static javax.jcr.ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW;
-import java.awt.image.ImagingOpException;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
@@ -38,7 +37,6 @@
import java.util.Set;
import java.util.StringTokenizer;
-import javax.jcr.ImportUUIDBehavior;
import javax.jcr.InvalidSerializedDataException;
import javax.jcr.Item;
import javax.jcr.Node;
@@ -285,16 +283,16 @@
NodeReader nodeReader;
if (nodeXML.getPath().toLowerCase().endsWith(EXT_JCR_XML)) {
return importSystemView(parent, name, nodeXML);
-
+
} else if (nodeXML.getPath().toLowerCase().endsWith(EXT_XML)) {
nodeReader = this.getXmlReader();
-
+
} else if (nodeXML.getPath().toLowerCase().endsWith(EXT_JSON)) {
nodeReader = this.getJsonReader();
-
+
} else if (nodeXML.getPath().toLowerCase().endsWith(EXT_XJSON)) {
nodeReader = this.getXJsonReader();
-
+
} else {
// cannot find out the type
return null;
@@ -473,7 +471,7 @@
* encoding. In this case, this method decodes the name using the
* <code>java.netURLDecoder</code> class with the <i>UTF-8</i> character
* encoding.
- *
+ *
* @param path The path from which to extract the name part.
* @return The URL decoded name part.
*/
@@ -568,7 +566,7 @@
* Import the XML file as JCR system or document view import. If the XML
* file is not a valid system or document view export/import file,
* <code>false</code> is returned.
- *
+ *
* @param parent The parent node below which to import
* @param nodeXML The URL to the XML file to import
* @return <code>true</code> if the import succeeds, <code>false</code>
@@ -589,7 +587,7 @@
name, nodeXML);
return parent.getNode(name);
}
-
+
ins = nodeXML.openStream();
Session session = parent.getSession();
session.importXML(parent.getPath(), ins, IMPORT_UUID_CREATE_NEW);
@@ -625,7 +623,7 @@
}
}
-
+
private String toPlainName(String name) {
int diff;
if (name.endsWith(EXT_JCR_XML)) {
@@ -639,7 +637,7 @@
} else {
return name;
}
-
+
return name.substring(0, name.length() - diff);
}
}