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 2016/07/08 13:32:28 UTC
svn commit: r1751906 - in /sling/trunk/bundles/servlets/post: pom.xml
src/main/java/org/apache/sling/servlets/post/AbstractPostOperation.java
src/main/java/org/apache/sling/servlets/post/SlingPostProcessor.java
Author: cziegeler
Date: Fri Jul 8 13:32:28 2016
New Revision: 1751906
URL: http://svn.apache.org/viewvc?rev=1751906&view=rev
Log:
Fix some javadoc problems
Modified:
sling/trunk/bundles/servlets/post/pom.xml
sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/AbstractPostOperation.java
sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/SlingPostProcessor.java
Modified: sling/trunk/bundles/servlets/post/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/pom.xml?rev=1751906&r1=1751905&r2=1751906&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/post/pom.xml (original)
+++ sling/trunk/bundles/servlets/post/pom.xml Fri Jul 8 13:32:28 2016
@@ -89,23 +89,17 @@
</excludes>
</configuration>
</plugin>
- </plugins>
- </build>
- <reporting>
- <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
- <!-- No javadocs -->
<excludePackageNames>
org.apache.sling.servlets.post.impl
</excludePackageNames>
</configuration>
</plugin>
</plugins>
- </reporting>
-
+ </build>
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
Modified: sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/AbstractPostOperation.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/AbstractPostOperation.java?rev=1751906&r1=1751905&r2=1751906&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/AbstractPostOperation.java (original)
+++ sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/AbstractPostOperation.java Fri Jul 8 13:32:28 2016
@@ -64,6 +64,7 @@ public abstract class AbstractPostOperat
* @param request the request to operate on
* @param response The <code>PostResponse</code> to record execution
* progress.
+ * @param processors The array of processors
*/
public void run(final SlingHttpServletRequest request,
final PostResponse response,
@@ -181,6 +182,8 @@ public abstract class AbstractPostOperat
/**
* Get the versioning configuration.
+ * @param request The http request
+ * @return The versioning configuration
*/
protected VersioningConfiguration getVersioningConfiguration(SlingHttpServletRequest request) {
VersioningConfiguration versionableConfiguration =
@@ -190,6 +193,8 @@ public abstract class AbstractPostOperat
/**
* Check if checkin should be skipped
+ * @param request The http request
+ * @return {@code true} if checkin should be skipped
*/
protected boolean isSkipCheckin(SlingHttpServletRequest request) {
return !getVersioningConfiguration(request).isAutoCheckin();
@@ -197,6 +202,8 @@ public abstract class AbstractPostOperat
/**
* Check whether changes should be written back
+ * @param request The http request
+ * @return {@code true} If session handling should be skipped
*/
protected boolean isSkipSessionHandling(SlingHttpServletRequest request) {
return Boolean.parseBoolean((String) request.getAttribute(SlingPostConstants.ATTR_SKIP_SESSION_HANDLING)) == true;
@@ -204,6 +211,9 @@ public abstract class AbstractPostOperat
/**
* Check whether commit to the resource resolver should be called.
+ * @param session The JCR session
+ * @param request The http request
+ * @return {@code true} if a save is required.
*/
protected boolean isSessionSaveRequired(Session session, SlingHttpServletRequest request)
throws RepositoryException {
@@ -213,6 +223,9 @@ public abstract class AbstractPostOperat
/**
* Remove the workspace name, if any, from the start of the path and validate that the
* session's workspace name matches the path workspace name.
+ * @param path The path
+ * @param session The JCR session
+ * @return The path without the workspace
*/
protected String removeAndValidateWorkspace(String path, Session session) throws RepositoryException {
final int wsSepPos = path.indexOf(":/");
@@ -233,6 +246,8 @@ public abstract class AbstractPostOperat
* <p>
* This method may be overwritten by extension if the operation has
* different requirements on path processing.
+ * @param request The http request
+ * @return The item path
*/
protected String getItemPath(SlingHttpServletRequest request) {
return request.getResource().getPath();
@@ -266,6 +281,7 @@ public abstract class AbstractPostOperat
* Returns an external form of the given path prepending the context path
* and appending a display extension.
*
+ * @param request The http request
* @param path the path to externalize
* @return the url
*/
@@ -290,6 +306,7 @@ public abstract class AbstractPostOperat
/**
* Resolves the given path with respect to the current root path.
*
+ * @param absPath The absolute base path
* @param relPath the path to resolve
* @return the given path if it starts with a '/'; a resolved path
* otherwise.
@@ -311,6 +328,9 @@ public abstract class AbstractPostOperat
* considered as providing content to be stored. Otherwise all parameters
* not starting with the command prefix <code>:</code> are considered as
* parameters to be stored.
+ *
+ * @param request The http request
+ * @return If a prefix is required.
*/
protected final boolean requireItemPathPrefix(
SlingHttpServletRequest request) {
@@ -332,6 +352,9 @@ public abstract class AbstractPostOperat
* {@link SlingPostConstants#ITEM_PREFIX_RELATIVE_CURRENT <code>./</code>},
* {@link SlingPostConstants#ITEM_PREFIX_RELATIVE_PARENT <code>../</code>}
* and {@link SlingPostConstants#ITEM_PREFIX_ABSOLUTE <code>/</code>}.
+ *
+ * @param name The name
+ * @return {@code true} if the name has a prefix
*/
protected boolean hasItemPathPrefix(String name) {
return name.startsWith(SlingPostConstants.ITEM_PREFIX_ABSOLUTE)
@@ -345,7 +368,9 @@ public abstract class AbstractPostOperat
* before child node A | after A | after child node A | last | after all
* nodes | N | at a specific position, N being an integer </xmp>
*
+ * @param request The http request
* @param item node to order
+ * @param changes The list of modifications
* @throws RepositoryException if an error occurs
*/
protected void orderNode(SlingHttpServletRequest request, Item item,
Modified: sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/SlingPostProcessor.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/SlingPostProcessor.java?rev=1751906&r1=1751905&r2=1751906&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/SlingPostProcessor.java (original)
+++ sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/SlingPostProcessor.java Fri Jul 8 13:32:28 2016
@@ -42,6 +42,7 @@ public interface SlingPostProcessor {
* and add a {@link Modification} object to the changes list.
* @param request The current request.
* @param changes The list of changes for this request.
+ * @throws Exception If an error occurs.
*/
void process(SlingHttpServletRequest request, List<Modification> changes)
throws Exception;