svn commit: r1343174 - in /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang: MiniLangElement.java SimpleMethod.java method/MethodOperation.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1343174 - in /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang: MiniLangElement.java SimpleMethod.java method/MethodOperation.java

adrianc
Author: adrianc
Date: Mon May 28 09:30:49 2012
New Revision: 1343174

URL: http://svn.apache.org/viewvc?rev=1343174&view=rev
Log:
Mini-language JavaDocs. No functional change.

Modified:
    ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/MiniLangElement.java
    ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java
    ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/MethodOperation.java

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/MiniLangElement.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/MiniLangElement.java?rev=1343174&r1=1343173&r2=1343174&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/MiniLangElement.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/MiniLangElement.java Mon May 28 09:30:49 2012
@@ -24,7 +24,7 @@ import org.ofbiz.minilang.method.MethodC
 import org.w3c.dom.Element;
 
 /**
- * A single Mini-language element. This class is the superclass for all <code>Element</code> models.
+ * A single Mini-language element. This class is the superclass for all XML element models.
  */
 public class MiniLangElement {
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java?rev=1343174&r1=1343173&r2=1343174&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java Mon May 28 09:30:49 2012
@@ -59,7 +59,24 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 /**
- * Contains a block of Mini-language code.
+ * Implements the &lt;simple-method&gt; element.
+ * <p>
+ * The Mini-language script engine follows the
+ * <a href="http://en.wikipedia.org/wiki/Flyweight_pattern">flyweight</a>
+ * design pattern. Mini-language XML files are parsed twice - first into a W3C DOM
+ * tree, then the DOM tree is parsed into element model objects. Each XML element
+ * has a model class, and each model class has its own factory.
+ * </p>
+ * <p>
+ * Mini-language can be extended by:<br />
+ * <ul>
+ * <li>Creating model classes that extend {@link org.ofbiz.minilang.method.MethodOperation}</li>
+ * <li>Creating factories for the model classes that implement {@link org.ofbiz.minilang.method.MethodOperation.Factory}</li>
+ * <li>Create a service provider information file
+ * (see <a href="http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html" target="_blank">ServiceLoader</a>)
+ * for the factory classes</li>
+ * </ul>
+ * </p>
  */
 public final class SimpleMethod extends MiniLangElement {
 

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/MethodOperation.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/MethodOperation.java?rev=1343174&r1=1343173&r2=1343174&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/MethodOperation.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/MethodOperation.java Mon May 28 09:30:49 2012
@@ -29,7 +29,7 @@ import org.ofbiz.minilang.SimpleMethod;
 import org.w3c.dom.Element;
 
 /**
- * A single operation, does the specified operation on the given field
+ * An abstract class for Mini-language element models.
  */
 public abstract class MethodOperation extends MiniLangElement {
 
@@ -38,14 +38,22 @@ public abstract class MethodOperation ex
         super(element, simpleMethod);
     }
 
-    /** Execute the operation. Returns false if no further operations should be executed.
+    /**
+     * Executes the operation.
+     * Returns <code>true</code> if script execution should continue, or
+     * <code>false</code> if script execution should stop.
+     *
      * @throws MiniLangException */
     public abstract boolean exec(MethodContext methodContext) throws MiniLangException;
 
-    /** Create an expanded string representation of the operation, is for the current context */
+    /** Create a string representation of the operation, using the current context.
+     * <p><strong>Deprecated:</strong> No replacement.</p>
+     */
     public abstract String expandedString(MethodContext methodContext);
 
-    /** Create a raw string representation of the operation, would be similar to original XML */
+    /** Create a string representation of the operation - similar to the original XML.
+     * <p><strong>Deprecated:</strong> Use {@link #toString()}.</p>
+     */
     public abstract String rawString();
 
     @Retention(RetentionPolicy.RUNTIME)