Author: cziegeler
Date: Tue Jul 5 10:35:44 2016
New Revision: 1751437
URL: http://svn.apache.org/viewvc?rev=1751437&view=rev
Log:
SLING-5821 : Fix javadoc errors and warnings (WiP)
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryLanguageProvider.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java?rev=1751437&r1=1751436&r2=1751437&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java
Tue Jul 5 10:35:44 2016
@@ -142,6 +142,7 @@ public class ResourceMetadata extends Ha
/**
* Sets the {@link #CHARACTER_ENCODING} property to <code>encoding</code>
* if not <code>null</code>.
+ * @param encoding The encoding
*/
public void setCharacterEncoding(String encoding) {
if (encoding != null) {
@@ -153,6 +154,7 @@ public class ResourceMetadata extends Ha
* Returns the {@link #CHARACTER_ENCODING} property if not
<code>null</code>
* and a <code>String</code> instance. Otherwise <code>null</code> is
* returned.
+ * @return The character encoding
*/
public @CheckForNull String getCharacterEncoding() {
Object value = get(CHARACTER_ENCODING);
@@ -166,6 +168,7 @@ public class ResourceMetadata extends Ha
/**
* Sets the {@link #CONTENT_TYPE} property to <code>contentType</code> if
* not <code>null</code>.
+ * @param contentType The content type
*/
public void setContentType(String contentType) {
if (contentType != null) {
@@ -177,6 +180,7 @@ public class ResourceMetadata extends Ha
* Returns the {@link #CONTENT_TYPE} property if not <code>null</code> and
* a <code>String</code> instance. Otherwise <code>null</code> is
* returned.
+ * @return The content type
*/
public @CheckForNull String getContentType() {
Object value = get(CONTENT_TYPE);
@@ -190,6 +194,7 @@ public class ResourceMetadata extends Ha
/**
* Sets the {@link #CONTENT_LENGTH} property to <code>contentType</code>
* if not <code>null</code>.
+ * @param contentLength The content length
*/
public void setContentLength(long contentLength) {
if (contentLength > 0) {
@@ -200,6 +205,7 @@ public class ResourceMetadata extends Ha
/**
* Returns the {@link #CONTENT_LENGTH} property if not <code>null</code>
* and a <code>long</code>. Otherwise <code>-1</code> is returned.
+ * @return The content length
*/
public long getContentLength() {
Object value = get(CONTENT_LENGTH);
@@ -213,6 +219,7 @@ public class ResourceMetadata extends Ha
/**
* Sets the {@link #CREATION_TIME} property to <code>creationTime</code>
* if not negative.
+ * @param creationTime The creation time
*/
public void setCreationTime(long creationTime) {
if (creationTime >= 0) {
@@ -223,6 +230,7 @@ public class ResourceMetadata extends Ha
/**
* Returns the {@link #CREATION_TIME} property if not <code>null</code>
* and a <code>long</code>. Otherwise <code>-1</code> is returned.
+ * @return The creation time
*/
public long getCreationTime() {
Object value = get(CREATION_TIME);
@@ -236,6 +244,7 @@ public class ResourceMetadata extends Ha
/**
* Sets the {@link #MODIFICATION_TIME} property to
* <code>modificationTime</code> if not negative.
+ * @param modificationTime The modification time
*/
public void setModificationTime(long modificationTime) {
if (modificationTime >= 0) {
@@ -246,6 +255,7 @@ public class ResourceMetadata extends Ha
/**
* Returns the {@link #MODIFICATION_TIME} property if not <code>null</code>
* and a <code>long</code>. Otherwise <code>-1</code> is returned.
+ * @return The modification time
*/
public long getModificationTime() {
Object value = get(MODIFICATION_TIME);
@@ -259,6 +269,7 @@ public class ResourceMetadata extends Ha
/**
* Sets the {@link #RESOLUTION_PATH} property to
<code>resolutionPath</code>
* if not <code>null</code>.
+ * @param resolutionPath The resolution path
*/
public void setResolutionPath(String resolutionPath) {
if (resolutionPath != null) {
@@ -270,6 +281,7 @@ public class ResourceMetadata extends Ha
* Returns the {@link #RESOLUTION_PATH} property if not <code>null</code>
* and a <code>String</code> instance. Otherwise <code>null</code> is
* returned.
+ * @return The resolution path
*/
public @CheckForNull String getResolutionPath() {
Object value = get(RESOLUTION_PATH);
@@ -283,6 +295,7 @@ public class ResourceMetadata extends Ha
/**
* Sets the {@link #RESOLUTION_PATH_INFO} property to
* <code>resolutionPathInfo</code> if not <code>null</code>.
+ * @param resolutionPathInfo The resolution path info
*/
public void setResolutionPathInfo(String resolutionPathInfo) {
if (resolutionPathInfo != null) {
@@ -294,6 +307,7 @@ public class ResourceMetadata extends Ha
* Returns the {@link #RESOLUTION_PATH_INFO} property if not
* <code>null</code> and a <code>String</code> instance. Otherwise
* <code>null</code> is returned.
+ * @return The resolution path info
*/
public @CheckForNull String getResolutionPathInfo() {
Object value = get(RESOLUTION_PATH_INFO);
@@ -307,6 +321,7 @@ public class ResourceMetadata extends Ha
/**
* Sets the {@link #PARAMETER_MAP} property to
* <code>parameterMap</code> if not <code>null</code>.
+ * @param parameterMap The parameter map
*/
public void setParameterMap(Map<String, String> parameterMap) {
if (parameterMap != null) {
@@ -322,6 +337,7 @@ public class ResourceMetadata extends Ha
* Returns the {@link #PARAMETER_MAP} property if not
* <code>null</code> and a <code>Map</code> instance. Otherwise
* <code>null</code> is returned.
+ * @return The parameter map
*/
@SuppressWarnings("unchecked")
public @CheckForNull Map<String, String> getParameterMap() {
@@ -333,7 +349,7 @@ public class ResourceMetadata extends Ha
return null;
}
-
+
/**
* Make this object read-only. All method calls trying to modify this
object
* result in an exception!
@@ -375,11 +391,11 @@ public class ResourceMetadata extends Ha
this.checkReadOnly();
return super.remove(key);
}
-
+
protected void internalPut(@Nonnull String key, Object value) {
super.put(key, value);
}
-
+
@Override
public Object clone() {
ResourceMetadata result = (ResourceMetadata) super.clone();
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java?rev=1751437&r1=1751436&r2=1751437&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/scripting/SlingScriptHelper.java
Tue Jul 5 10:35:44 2016
@@ -264,6 +264,7 @@ public interface SlingScriptHelper {
* Same as {@link #forward(Resource,RequestDispatcherOptions)}, but using
* empty options.
*
+ * @param resource The resource to forward to.
* @throws org.apache.sling.api.SlingIOException Wrapping a
<code>IOException</code> thrown
* while handling the forward.
* @throws org.apache.sling.api.SlingServletException Wrapping a
<code>ServletException</code>
@@ -337,6 +338,7 @@ public interface SlingScriptHelper {
* <a
href="https://osgi.org/javadoc/r5/core/org/osgi/framework/BundleContext.html#getServiceReference(java.lang.Class)">
* BundleContext.getServiceReference(Class)</a>.</p>
* @param serviceType The type (interface) of the service.
+ * @param <ServiceType> The type (interface) of the service.
* @return The service instance, or {@code null} if no services are
registered which implement the specified class.
*/
@CheckForNull <ServiceType> ServiceType getService(@Nonnull
Class<ServiceType> serviceType);
@@ -351,6 +353,7 @@ public interface SlingScriptHelper {
* </p>
*
* @param serviceType The type (interface) of the service.
+ * @param <ServiceType> The type (interface) of the service.
* @param filter An optional filter (LDAP-like, see OSGi spec)
* @return An array of services objects or {@code null}.
* @throws InvalidServiceFilterSyntaxException If the <code>filter</code>
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java?rev=1751437&r1=1751436&r2=1751437&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/servlets/ServletResolver.java
Tue Jul 5 10:35:44 2016
@@ -36,7 +36,6 @@ import aQute.bnd.annotation.ProviderType
* Applications of the Sling Framework generally do not need the servlet
* resolver as resolution of the servlets to process requests and sub-requests
* through a <code>RequestDispatcher</code> is handled by the Sling Framework.
- * <p>
*/
@ProviderType
public interface ServletResolver {
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java?rev=1751437&r1=1751436&r2=1751437&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletRequestWrapper.java
Tue Jul 5 10:35:44 2016
@@ -44,7 +44,10 @@ import org.apache.sling.api.resource.Res
public class SlingHttpServletRequestWrapper extends HttpServletRequestWrapper
implements SlingHttpServletRequest {
- /** Create a wrapper for the supplied wrappedRequest */
+ /**
+ * Create a wrapper for the supplied wrappedRequest
+ * @param wrappedRequest The request.
+ */
public SlingHttpServletRequestWrapper(SlingHttpServletRequest
wrappedRequest) {
super(wrappedRequest);
}
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java?rev=1751437&r1=1751436&r2=1751437&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/wrappers/SlingHttpServletResponseWrapper.java
Tue Jul 5 10:35:44 2016
@@ -34,7 +34,10 @@ import org.apache.sling.api.SlingHttpSer
public class SlingHttpServletResponseWrapper extends HttpServletResponseWrapper
implements SlingHttpServletResponse {
- /** Create a wrapper for the supplied wrappedRequest */
+ /**
+ * Create a wrapper for the supplied wrappedRequest
+ * @param wrappedResponse The response
+ */
public SlingHttpServletResponseWrapper(SlingHttpServletResponse
wrappedResponse) {
super(wrappedResponse);
}
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java?rev=1751437&r1=1751436&r2=1751437&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
Tue Jul 5 10:35:44 2016
@@ -37,6 +37,7 @@ public interface ObserverConfiguration {
/**
* {@code true} if a listener is interested in external events.
+ * @return {@code true} if a listener is interested in external events.
*/
boolean includeExternal();
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryLanguageProvider.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryLanguageProvider.java?rev=1751437&r1=1751436&r2=1751437&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryLanguageProvider.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryLanguageProvider.java
Tue Jul 5 10:35:44 2016
@@ -43,6 +43,8 @@ public interface QueryLanguageProvider<T
/**
* The supported languages of the resource provider.
+ * @param ctx The resolve context
+ * @return The array of supported languages
*/
String[] getSupportedLanguages(@Nonnull ResolveContext<T> ctx);
@@ -57,6 +59,7 @@ public interface QueryLanguageProvider<T
* The result returned is then based on the <code>NodeIterator</code>
* provided by the query result.
*
+ * @param ctx The resolve context
* @param query The query string to use to find the resources.
* @param language The language in which the query is formulated.
* @return An <code>Iterator</code> of {@link Resource} objects matching
the
@@ -86,6 +89,7 @@ public interface QueryLanguageProvider<T
* converted into the respective Java object, such as <code>Boolean</code>
* for a value of property type <em>Boolean</em>.
*
+ * @param ctx The resolve context
* @param query The query string to use to find the resources.
* @param language The language in which the query is formulated.
* @return An <code>Iterator</code> of <code>Map</code> instances providing
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java?rev=1751437&r1=1751436&r2=1751437&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
Tue Jul 5 10:35:44 2016
@@ -552,6 +552,7 @@ public abstract class ResourceProvider<T
* it by setting the {@link #PROPERTY_MODIFIABLE} to the value {@code
true}.
*
* @param ctx The {@link ResolveContext}.
+ * @return {@code true} if there are pending changes.
*/
public boolean hasChanges(final @Nonnull ResolveContext<T> ctx) {
return false;
@@ -586,6 +587,7 @@ public abstract class ResourceProvider<T
* it by setting the {@link #PROPERTY_ADAPTABLE} to the value {@code true}.
*
* @param ctx The {@link ResolveContext}.
+ * @param <AdapterType> The generic type to which this resource is adapted
to.
* @param type The generic type to which this resource is adapted to.
* @return The adapter target or {@code null} if the provider cannot
* be adapt to the requested type.