You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2016/09/05 11:50:53 UTC

svn commit: r1759238 - in /sling/trunk/bundles/scripting/sightly: compiler/ compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/ compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/commands/ engine/ engine/src/main/java/or...

Author: radu
Date: Mon Sep  5 11:50:53 2016
New Revision: 1759238

URL: http://svn.apache.org/viewvc?rev=1759238&view=rev
Log:
trivial: corrected JavaDoc

Modified:
    sling/trunk/bundles/scripting/sightly/compiler/pom.xml
    sling/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/RuntimeFunction.java
    sling/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/commands/CommandStream.java
    sling/trunk/bundles/scripting/sightly/engine/pom.xml
    sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/ResourceResolution.java
    sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/SightlyJavaCompilerService.java
    sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/compiled/SourceIdentifier.java
    sling/trunk/bundles/scripting/sightly/java-compiler/pom.xml
    sling/trunk/bundles/scripting/sightly/java-compiler/src/main/java/org/apache/sling/scripting/sightly/java/compiler/RenderUnit.java
    sling/trunk/bundles/scripting/sightly/java-compiler/src/main/java/org/apache/sling/scripting/sightly/pojo/Use.java

Modified: sling/trunk/bundles/scripting/sightly/compiler/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/sightly/compiler/pom.xml?rev=1759238&r1=1759237&r2=1759238&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/sightly/compiler/pom.xml (original)
+++ sling/trunk/bundles/scripting/sightly/compiler/pom.xml Mon Sep  5 11:50:53 2016
@@ -117,14 +117,6 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <stylesheet>maven</stylesheet>
-                    <excludePackageNames>*.impl:*.internal:${site.javadoc.exclude}</excludePackageNames>
-                </configuration>
-            </plugin>
-            <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
                 <version>3.0.3</version>
@@ -147,22 +139,6 @@
     </build>
 
     <!-- ======================================================================= -->
-    <!-- R E P O R T I N G                                                       -->
-    <!-- ======================================================================= -->
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <stylesheet>maven</stylesheet>
-                    <excludePackageNames>*.impl:*.internal:${site.javadoc.exclude}</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </reporting>
-
-    <!-- ======================================================================= -->
     <!-- D E P E N D E N C I E S                                                 -->
     <!-- ======================================================================= -->
     <dependencies>

Modified: sling/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/RuntimeFunction.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/RuntimeFunction.java?rev=1759238&r1=1759237&r2=1759238&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/RuntimeFunction.java (original)
+++ sling/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/RuntimeFunction.java Mon Sep  5 11:50:53 2016
@@ -36,12 +36,11 @@ public final class RuntimeFunction {
      * <p>
      *     The name of the {@link org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall} function that will process string
      *     formatting. The function will receive the following parameters:
-     *
-     *     <ol>
-     *         <li>the format String (e.g. 'Hello {0}, welcome to {1}')</li>
-     *         <li>an array of objects that will replace the format placeholders</li>
-     *     </ol>
      * </p>
+     * <ol>
+     *     <li>the format String (e.g. 'Hello {0}, welcome to {1}')</li>
+     *     <li>an array of objects that will replace the format placeholders</li>
+     * </ol>
      * <p>
      *     For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#122-format.
      * </p>
@@ -52,15 +51,14 @@ public final class RuntimeFunction {
      * <p>
      *     The name of the {@link org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall} function that will process
      *     i18n. The function will receive the following parameters:
-     *
-     *     <ol>
-     *         <li>the String to translate</li>
-     *         <li>optional: locale information</li>
-     *         <li>optional: hint information</li>
-     *         <li>optional (not part of the specification): basename information; for more details see
-     *         {@link java.util.ResourceBundle#getBundle(String, Locale)}</li>
-     *     </ol>
      * </p>
+     * <ol>
+     *     <li>the String to translate</li>
+     *     <li>optional: locale information</li>
+     *     <li>optional: hint information</li>
+     *     <li>optional (not part of the specification): basename information; for more details see
+     *     {@link java.util.ResourceBundle#getBundle(String, Locale)}</li>
+     * </ol>
      * <p>
      *     For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#123-i18n.
      * </p>
@@ -71,12 +69,11 @@ public final class RuntimeFunction {
      * <p>
      *     The name of the {@link org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall} function that will process
      *     join operations on arrays. The function will receive the following parameters:
-     *
-     *     <ol>
-     *         <li>the array of objects to join (e.g. [1, 2, 3])</li>
-     *         <li>the join string (e.g. ';')</li>
-     *     </ol>
      * </p>
+     * <ol>
+     *     <li>the array of objects to join (e.g. [1, 2, 3])</li>
+     *     <li>the join string (e.g. ';')</li>
+     * </ol>
      * <p>
      *     For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#124-array-join.
      * </p>
@@ -87,12 +84,11 @@ public final class RuntimeFunction {
      * <p>
      *     The name of the {@link org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall} function that will provide
      *     URI manipulation support. The function will receive the following parameters:
-     *
-     *     <ol>
-     *         <li>optional: a URI string to process</li>
-     *         <li>optional: a Map containing URI manipulation options</li>
-     *     </ol>
      * </p>
+     * <ol>
+     *     <li>optional: a URI string to process</li>
+     *     <li>optional: a Map containing URI manipulation options</li>
+     * </ol>
      * <p>
      *     For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#125-uri-manipulation.
      * </p>
@@ -103,12 +99,11 @@ public final class RuntimeFunction {
      * <p>
      *     The name of the {@link org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall} function that will provide
      *     XSS escaping and filtering support. The function will receive the following parameters:
-     *
-     *     <ol>
-     *         <li>the original string to escape / filter</li>
-     *         <li>the context to be applied - see {@link org.apache.sling.scripting.sightly.compiler.expression.MarkupContext}</li>
-     *     </ol>
      * </p>
+     * <ol>
+     *     <li>the original string to escape / filter</li>
+     *     <li>the context to be applied - see {@link org.apache.sling.scripting.sightly.compiler.expression.MarkupContext}</li>
+     * </ol>
      * <p>
      *     For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#121-display-context.
      * </p>
@@ -119,12 +114,11 @@ public final class RuntimeFunction {
      * <p>
      *     The name of the {@link org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall} function that will perform
      *     script execution delegation. The function will receive the following parameters:
-     *
-     *     <ol>
-     *         <li>optional: the relative or absolute path of the script to execute</li>
-     *         <li>optional: a Map of options to perform script include processing</li>
-     *     </ol>
      * </p>
+     * <ol>
+     *     <li>optional: the relative or absolute path of the script to execute</li>
+     *     <li>optional: a Map of options to perform script include processing</li>
+     * </ol>
      * <p>
      *     For more details about the supported options check
      *     https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#228-include.
@@ -136,12 +130,11 @@ public final class RuntimeFunction {
      * <p>
      *     The name of the {@link org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall} function that will perform
      *     resource inclusion in the rendering process. The function will receive the following parameters:
-     *
-     *     <ol>
-     *         <li>optional: a relative or absolute path of the resource to be included</li>
-     *         <li>optional: a Map containing the resource processing options</li>
-     *     </ol>
      * </p>
+     * <ol>
+     *     <li>optional: a relative or absolute path of the resource to be included</li>
+     *     <li>optional: a Map containing the resource processing options</li>
+     * </ol>
      * <p>
      *     For more details about the supported options check
      *     https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#229-resource.
@@ -153,12 +146,11 @@ public final class RuntimeFunction {
      * <p>
      *     The name of the {@link org.apache.sling.scripting.sightly.compiler.expression.nodes.RuntimeCall} function that will provide
      *     the support for loading Use-API objects. The function will receive the following parameters:
-     *
-     *     <ol>
-     *         <li>an identifier that allows to discover the Use-API object that needs to be loaded</li>
-     *         <li>optional: a Map of the arguments that are passed to the Use-API object for initialisation or to provide context</li>
-     *     </ol>
      * </p>
+     * <ol>
+     *     <li>an identifier that allows to discover the Use-API object that needs to be loaded</li>
+     *     <li>optional: a Map of the arguments that are passed to the Use-API object for initialisation or to provide context</li>
+     * </ol>
      * <p>
      *     For more details check https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/1.2/SPECIFICATION.md#221-use.
      * </p>

Modified: sling/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/commands/CommandStream.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/commands/CommandStream.java?rev=1759238&r1=1759237&r2=1759238&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/commands/CommandStream.java (original)
+++ sling/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/commands/CommandStream.java Mon Sep  5 11:50:53 2016
@@ -27,20 +27,23 @@ import org.osgi.annotation.versioning.Pr
  *     This interface defines a stream to which {@link Command}s are pushed during the compilation of a HTL script by the {@link
  *     org.apache.sling.scripting.sightly.compiler.SightlyCompiler}. Depending on how a consumer wants to use the stream there are several
  *     options:
- *      <ul>
- *          <li>if the stream needs to be consumed immediately then a {@link CommandHandler} can be attached to the stream; the stream,
- *          in turn, will notify the handler for every command that has been pushed;</li>
- *          <li>if the stream can be consumed after the actual compilation there's no need to attach a {@link CommandHandler}, as the
- *          {@link Command}s that were written to the stream can be replayed in the exact order in which they have been pushed.</li>
- *      </ul>
  * </p>
+ * <ul>
+ *     <li>if the stream needs to be consumed immediately then a {@link CommandHandler} can be attached to the stream; the stream,
+ *     in turn, will notify the handler for every command that has been pushed;</li>
+ *     <li>if the stream can be consumed after the actual compilation there's no need to attach a {@link CommandHandler}, as the
+ *     {@link Command}s that were written to the stream can be replayed in the exact order in which they have been pushed.</li>
+ * </ul>
  */
 @ProviderType
 public interface CommandStream {
 
     /**
-     * Registers a listening {@link CommandHandler} to the stream. The {@link CommandHandler} will be notified for every new {@link Command}
+     * Registers a listening {@link CommandHandler} to the stream. The {@link CommandHandler} will be notified for every new {@link
+     * Command}
      * pushed to this stream.
+     *
+     * @param handler the handler to attach to this stream
      */
     void addHandler(CommandHandler handler);
 

Modified: sling/trunk/bundles/scripting/sightly/engine/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/sightly/engine/pom.xml?rev=1759238&r1=1759237&r2=1759238&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/sightly/engine/pom.xml (original)
+++ sling/trunk/bundles/scripting/sightly/engine/pom.xml Mon Sep  5 11:50:53 2016
@@ -82,14 +82,6 @@
                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <stylesheet>maven</stylesheet>
-                    <excludePackageNames>*.impl:*.internal:${site.javadoc.exclude}</excludePackageNames>
-                </configuration>
-            </plugin>
-            <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
                 <version>3.0.3</version>
@@ -112,22 +104,6 @@
     </build>
 
     <!-- ======================================================================= -->
-    <!-- R E P O R T I N G                                                       -->
-    <!-- ======================================================================= -->
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <stylesheet>maven</stylesheet>
-                    <excludePackageNames>*.impl:*.internal:${site.javadoc.exclude}</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </reporting>
-
-    <!-- ======================================================================= -->
     <!-- D E P E N D E N C I E S                                                 -->
     <!-- ======================================================================= -->
     <dependencies>

Modified: sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/ResourceResolution.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/ResourceResolution.java?rev=1759238&r1=1759237&r2=1759238&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/ResourceResolution.java (original)
+++ sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/ResourceResolution.java Mon Sep  5 11:50:53 2016
@@ -26,7 +26,7 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.api.resource.ResourceUtil;
 
 /**
- * Utility class which used by the HTL engine &amp; extensions to resolve resources.
+ * Utility class which is used by the HTL engine &amp; extensions to resolve resources.
  */
 public final class ResourceResolution {
 

Modified: sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/SightlyJavaCompilerService.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/SightlyJavaCompilerService.java?rev=1759238&r1=1759237&r2=1759238&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/SightlyJavaCompilerService.java (original)
+++ sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/SightlyJavaCompilerService.java Mon Sep  5 11:50:53 2016
@@ -80,6 +80,7 @@ public class SightlyJavaCompilerService
      * compilation. In case the requested class does not denote a fully qualified classname, this service will try to find the class through
      * Sling's servlet resolution mechanism and compile the class on-the-fly if required.
      *
+     * @param renderContext the render context
      * @param className     name of class to use for object instantiation
      * @return object instance of the requested class
      */

Modified: sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/compiled/SourceIdentifier.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/compiled/SourceIdentifier.java?rev=1759238&r1=1759237&r2=1759238&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/compiled/SourceIdentifier.java (original)
+++ sling/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/compiled/SourceIdentifier.java Mon Sep  5 11:50:53 2016
@@ -249,7 +249,10 @@ public class SourceIdentifier implements
     }
 
     /**
-     * Test whether the argument is a Java keyword
+     * Test whether the argument is a Java keyword.
+     *
+     * @param key the String to test
+     * @return {@code true} if the String is a Java keyword, {@code false} otherwise
      */
     public static boolean isJavaKeyword(String key) {
         return javaKeywords.contains(key);

Modified: sling/trunk/bundles/scripting/sightly/java-compiler/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/sightly/java-compiler/pom.xml?rev=1759238&r1=1759237&r2=1759238&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/sightly/java-compiler/pom.xml (original)
+++ sling/trunk/bundles/scripting/sightly/java-compiler/pom.xml Mon Sep  5 11:50:53 2016
@@ -82,14 +82,6 @@
                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <stylesheet>maven</stylesheet>
-                    <excludePackageNames>*.impl:*.internal:${site.javadoc.exclude}</excludePackageNames>
-                </configuration>
-            </plugin>
-            <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
                 <version>3.0.3</version>
@@ -111,22 +103,6 @@
     </build>
 
     <!-- ======================================================================= -->
-    <!-- R E P O R T I N G                                                       -->
-    <!-- ======================================================================= -->
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <stylesheet>maven</stylesheet>
-                    <excludePackageNames>*.impl:*.internal:${site.javadoc.exclude}</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </reporting>
-
-    <!-- ======================================================================= -->
     <!-- D E P E N D E N C I E S                                                 -->
     <!-- ======================================================================= -->
     <dependencies>

Modified: sling/trunk/bundles/scripting/sightly/java-compiler/src/main/java/org/apache/sling/scripting/sightly/java/compiler/RenderUnit.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/sightly/java-compiler/src/main/java/org/apache/sling/scripting/sightly/java/compiler/RenderUnit.java?rev=1759238&r1=1759237&r2=1759238&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/sightly/java-compiler/src/main/java/org/apache/sling/scripting/sightly/java/compiler/RenderUnit.java (original)
+++ sling/trunk/bundles/scripting/sightly/java-compiler/src/main/java/org/apache/sling/scripting/sightly/java/compiler/RenderUnit.java Mon Sep  5 11:50:53 2016
@@ -39,6 +39,7 @@ public abstract class RenderUnit impleme
     /**
      * Render the main script template
      *
+     * @param out           the {@link PrintWriter} to which the commands are written
      * @param renderContext the rendering context
      * @param arguments     the arguments for this unit
      */

Modified: sling/trunk/bundles/scripting/sightly/java-compiler/src/main/java/org/apache/sling/scripting/sightly/pojo/Use.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/sightly/java-compiler/src/main/java/org/apache/sling/scripting/sightly/pojo/Use.java?rev=1759238&r1=1759237&r2=1759238&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/sightly/java-compiler/src/main/java/org/apache/sling/scripting/sightly/pojo/Use.java (original)
+++ sling/trunk/bundles/scripting/sightly/java-compiler/src/main/java/org/apache/sling/scripting/sightly/pojo/Use.java Mon Sep  5 11:50:53 2016
@@ -33,12 +33,12 @@ public interface Use {
 
     /**
      * <p>
-     * Called to initialize the Java object with the current Java Scripting API bindings.
+     *     Called to initialize the Java object with the current Java Scripting API bindings.
+     * </p>
+     * <p>
+     *     This method is called only if the object has been instantiated by HTL as part of processing the {@code data-sly-use}
+     *     attribute. The Java Scripting API bindings provide all the global variables known to a script being executed.
      * </p>
-     * <p/>
-     * This method is called only if the object has been instantiated by HTL as part of processing the {@code data-sly-use}
-     * attribute. The Java Scripting API bindings provide all the global variables known to a script being executed.
-     * <p/>
      *
      * @param bindings The Java Scripting API bindings.
      */