Improved: refactor javadocs in OFBiz to be standards compliant
(OFBIZ-9144) This is the first commit to the above mentioned issue which fixes many javadoc errors dispersed through the different components. The fixes are not necessarily improvements to the javadocs but rather making them valid javadocs to prevent reporting errors from gradle git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1774154 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -33,7 +33,7 @@ package org.apache.ofbiz.base.metrics;
|
||||
* An object that tracks service metrics.
|
||||
* <p>This interface and its default implementation are based on the
|
||||
* <code>seda.sandstorm.internal.StageStats</code> class written by
|
||||
* Matt Welsh.</code>
|
||||
* Matt Welsh.
|
||||
* @see <a href="http://www.eecs.harvard.edu/~mdw/proj/seda/">SEDA</a>
|
||||
*/
|
||||
public interface Metrics {
|
||||
|
||||
@@ -51,15 +51,38 @@ public final class MetricsFactory {
|
||||
/**
|
||||
* Creates a <code>Metrics</code> instance based on <code>element</code> attributes.
|
||||
* If an instance with the same name already exists, it will be returned.
|
||||
* <p><strong>Element Attributes</strong>
|
||||
* <table border="1">
|
||||
* <tr><th>Attribute Name</th><th>Requirements</th><th>Description</th><th>Notes</th></tr>
|
||||
* <tr><td>name</td><td>Required</td><td>The metric name.</td><td> </td></tr>
|
||||
* <tr><td>estimation-size</td><td>Optional</td><td>Positive integer number of events to include in the metrics calculation.</td><td>Defaults to "100".</td></tr>
|
||||
* <tr><td>estimation-time</td><td>Optional</td><td>Positive integer number of milliseconds to include in the metrics calculation.</td><td>Defaults to "1000".</td></tr>
|
||||
* <tr><td>smoothing</td><td>Optional</td><td>Smoothing factor - used to smooth the differences between calculations.</td><td>A value of "1" disables smoothing. Defaults to "0.7".</td></tr>
|
||||
* <tr><td>threshold</td><td>Optional</td><td>The metric threshold. The meaning of the threshold is determined by client code.</td><td>Defaults to "0.0".</td></tr>
|
||||
* </table></p>
|
||||
* <caption><strong>Element Attributes</strong></caption>
|
||||
* <tr><th>Attribute Name</th><th>Requirements</th><th>Description</th><th>Notes</th></tr>
|
||||
* <tr>
|
||||
* <td>name</td>
|
||||
* <td>Required</td>
|
||||
* <td>The metric name.</td>
|
||||
* <td> </td>
|
||||
* <tr>
|
||||
* <td>estimation-size</td>
|
||||
* <td>Optional</td>
|
||||
* <td>Positive integer number of events to include in the metrics calculation.</td>
|
||||
* <td>Defaults to "100".</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>estimation-time</td>
|
||||
* <td>Optional</td>
|
||||
* <td>Positive integer number of milliseconds to include in the metrics calculation.</td>
|
||||
* <td>Defaults to "1000".</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>smoothing</td>
|
||||
* <td>Optional</td>
|
||||
* <td>Smoothing factor - used to smooth the differences between calculations.</td>
|
||||
* <td>A value of "1" disables smoothing. Defaults to "0.7".</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>threshold</td>
|
||||
* <td>Optional</td>
|
||||
* <td>The metric threshold. The meaning of the threshold is determined by client code.</td>
|
||||
* <td>Defaults to "0.0".</td></tr>
|
||||
* </table>
|
||||
*
|
||||
* @param element The element whose attributes will be used to create the <code>Metrics</code> instance
|
||||
* @return A <code>Metrics</code> instance based on <code>element</code> attributes
|
||||
|
||||
@@ -23,13 +23,13 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/**
|
||||
* An observable object.
|
||||
* <p>This class is similar to <code>java.util.Observable</code> but it has some differences:
|
||||
* <p>This class is similar to <code>java.util.Observable</code> but it has some differences:</p>
|
||||
* <ul>
|
||||
* <li>It has improved concurrency</li>
|
||||
* <li>It cannot be subclassed</li>
|
||||
* <li>The <code>notifyObservers</code> method does not clear the changed flag</li>
|
||||
* <li>Protected methods have been made public</li>
|
||||
* </ul></p>
|
||||
* <li>It has improved concurrency</li>
|
||||
* <li>It cannot be subclassed</li>
|
||||
* <li>The <code>notifyObservers</code> method does not clear the changed flag</li>
|
||||
* <li>Protected methods have been made public</li>
|
||||
* </ul>
|
||||
*
|
||||
*/
|
||||
public final class Observable {
|
||||
@@ -92,8 +92,10 @@ public final class Observable {
|
||||
* <p>Each <code>Observer</code> has its <code>update</code> method called with two
|
||||
* arguments: this observable object and <code>null</code>. In other
|
||||
* words, this method is equivalent to:
|
||||
* <blockquote><tt>
|
||||
* notifyObservers(null)</tt></blockquote></p>
|
||||
* </p>
|
||||
* <blockquote>
|
||||
* <tt>notifyObservers(null)</tt>
|
||||
* </blockquote>
|
||||
*
|
||||
*/
|
||||
public void notifyObservers() {
|
||||
|
||||
@@ -24,11 +24,14 @@ import java.util.Map;
|
||||
import javax.script.ScriptException;
|
||||
|
||||
/**
|
||||
* A script helper object. The OFBiz scripting framework will include an instance of this class in the script's bindings.
|
||||
* <p>The scripting language will determine how the helper is used. Most languages will access it as a variable:<br />
|
||||
* <code>partyValue = ofbiz.findOne("Party");</code><br />
|
||||
* while other languages might access it as a native method or function:<br />
|
||||
* <code>partyValue = findOne("Party");</code></p>
|
||||
* A script helper object. The OFBiz scripting framework will include an
|
||||
* instance of this class in the script's bindings.
|
||||
* <p>The scripting language will determine how the helper is used. Most
|
||||
* languages will access it as a variable:<br>
|
||||
* <code>partyValue = ofbiz.findOne("Party");</code><br>
|
||||
* while other languages might access it as a native method or function:<br>
|
||||
* <code>partyValue = findOne("Party");</code>
|
||||
* </p>
|
||||
*/
|
||||
public interface ScriptHelper {
|
||||
|
||||
|
||||
@@ -509,15 +509,17 @@ public class StringUtil {
|
||||
|
||||
/** Converts operator substitutions (@and, @or, etc) back to their original form.
|
||||
* <p>OFBiz script syntax provides special forms of common operators to make
|
||||
* it easier to embed logical expressions in XML:
|
||||
* it easier to embed logical expressions in XML</p>
|
||||
* <table border="1" cellpadding="2">
|
||||
* <tr><td><strong>@and</strong></td><td>&&</td></tr>
|
||||
* <tr><td><strong>@or</strong></td><td>||</td></tr>
|
||||
* <tr><td><strong>@gt</strong></td><td>></td></tr>
|
||||
* <tr><td><strong>@gteq</strong></td><td>>=</td></tr>
|
||||
* <tr><td><strong>@lt</strong></td><td><</td></tr>
|
||||
* <tr><td><strong>@lteq</strong></td><td><=</td></tr>
|
||||
* </table></p>
|
||||
* <caption>OFBiz XML operators</caption>
|
||||
* <tr><th>OFBiz operator</th><th>Substitution</th></tr>
|
||||
* <tr><td><strong>@and</strong></td><td>&&</td></tr>
|
||||
* <tr><td><strong>@or</strong></td><td>||</td></tr>
|
||||
* <tr><td><strong>@gt</strong></td><td>></td></tr>
|
||||
* <tr><td><strong>@gteq</strong></td><td>>=</td></tr>
|
||||
* <tr><td><strong>@lt</strong></td><td><</td></tr>
|
||||
* <tr><td><strong>@lteq</strong></td><td><=</td></tr>
|
||||
* </table>
|
||||
* @param expression The <code>String</code> to convert
|
||||
* @return The converted <code>String</code>
|
||||
*/
|
||||
|
||||
@@ -237,7 +237,10 @@ public class UtilCodec {
|
||||
|
||||
/**
|
||||
* Uses a black-list approach for necessary characters for HTML.
|
||||
* Does not allow various characters (after canonicalization), including "<", ">", "&" (if not followed by a space), and "%" (if not followed by a space).
|
||||
* <p>
|
||||
* Does not allow various characters (after canonicalization), including
|
||||
* "<", ">", "&" (if not followed by a space), and "%" (if not
|
||||
* followed by a space).
|
||||
*
|
||||
* @param value
|
||||
* @param errorMessageList
|
||||
|
||||
@@ -474,7 +474,10 @@ public final class UtilFormatOut {
|
||||
}
|
||||
|
||||
// ------------------- web encode handlers -------------------
|
||||
/** Encodes an HTTP URL query String, replacing characters used for other things in HTTP URL query strings, but not touching the separator characters '?', '=', and '&'
|
||||
/**
|
||||
* Encodes an HTTP URL query String, replacing characters used for other
|
||||
* things in HTTP URL query strings, but not touching the separator
|
||||
* characters '?', '=', and '&'
|
||||
* @param query The plain query String
|
||||
* @return The encoded String
|
||||
*/
|
||||
@@ -527,7 +530,8 @@ public final class UtilFormatOut {
|
||||
}
|
||||
|
||||
// ------------------- web encode handlers -------------------
|
||||
/** Encodes an XML string replacing the characters '<', '>', '"', ''', '&'
|
||||
/**
|
||||
* Encodes an XML string replacing the characters '<', '>', '"', ''', '&'
|
||||
* @param inString The plain value String
|
||||
* @return The encoded String
|
||||
*/
|
||||
|
||||
@@ -1216,9 +1216,13 @@ public final class UtilHttp {
|
||||
* the composite according to compositeType. For example, consider the following
|
||||
* form widget field,
|
||||
*
|
||||
* <field name="meetingDate">
|
||||
* <pre>
|
||||
* {@code
|
||||
* <field name="meetingDate">
|
||||
* <date-time type="timestamp" input-method="time-dropdown">
|
||||
* </field>
|
||||
* </field>
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* The result in HTML is three input boxes to input the date, hour and minutes separately.
|
||||
* The parameter names are named meetingDate_c_date, meetingDate_c_hour, meetingDate_c_minutes.
|
||||
|
||||
@@ -871,23 +871,26 @@ public final class UtilProperties implements Serializable {
|
||||
return propertiesNotFound.contains(createResourceName(resource, locale, removeExtension));
|
||||
}
|
||||
|
||||
/** Resolve a properties file URL.
|
||||
* <p>This method uses the following strategy:<br />
|
||||
/**
|
||||
* Resolve a properties file URL.
|
||||
* <p>This method uses the following strategy:</p>
|
||||
* <ul>
|
||||
* <li>Locate the XML file specified in <code>resource (MyProps.xml)</code></li>
|
||||
* <li>Locate the file that starts with the name specified in
|
||||
* <code>resource</code> and ends with the locale's string and
|
||||
* <code>.xml (MyProps_en.xml)</code></li>
|
||||
* <li>Locate the file that starts with the name specified in
|
||||
* <code>resource</code> and ends with the locale's string and
|
||||
* <code>.properties (MyProps_en.properties)</code></li>
|
||||
* <li>Locate the file that starts with the name specified in
|
||||
* <code>resource and ends with the locale's string (MyProps_en)</code></li>
|
||||
* <li>Locate the XML file specified in <code>resource (MyProps.xml)</code></li>
|
||||
* <li>Locate the file that starts with the name specified in
|
||||
* <code>resource</code> and ends with the locale's string and
|
||||
* <code>.xml (MyProps_en.xml)</code>
|
||||
* </li>
|
||||
* <li>Locate the file that starts with the name specified in
|
||||
* <code>resource</code> and ends with the locale's string and
|
||||
* <code>.properties (MyProps_en.properties)</code>
|
||||
* </li>
|
||||
* <li>Locate the file that starts with the name specified in
|
||||
* <code>resource and ends with the locale's string (MyProps_en)</code>
|
||||
* </li>
|
||||
* </ul>
|
||||
* <br />
|
||||
*
|
||||
* The <code>component://</code> protocol is supported in the
|
||||
* <code>resource</code> parameter.
|
||||
* </p>
|
||||
*
|
||||
* @param resource The resource to resolve
|
||||
* @param locale The desired locale
|
||||
@@ -961,22 +964,25 @@ public final class UtilProperties implements Serializable {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Convert XML property file to Properties instance. This method will convert
|
||||
/**
|
||||
* Convert XML property file to Properties instance. This method will convert
|
||||
* both the Java XML properties file format and the OFBiz custom XML
|
||||
* properties file format.
|
||||
* <p>
|
||||
* The format of the custom XML properties file is:<br />
|
||||
* <br />
|
||||
* <code>
|
||||
* <resource><br />
|
||||
* <property key="key"><br />
|
||||
* <value xml:lang="locale 1">Some value</value><br />
|
||||
* <value xml:lang="locale 2">Some value</value><br />
|
||||
* ...<br />
|
||||
* </property><br />
|
||||
* ...<br />
|
||||
* </resource><br /><br /></code> where <em>"locale 1", "locale 2"</em> are valid xml:lang values..
|
||||
* </p>
|
||||
*
|
||||
* <p>The format of the custom XML properties file is:</p>
|
||||
* <pre>
|
||||
* {@code
|
||||
* <resource>
|
||||
* <property key="key">
|
||||
* <value xml:lang="locale 1">Some value</value>
|
||||
* <value xml:lang="locale 2">Some value</value>
|
||||
* ...
|
||||
* </property>
|
||||
* ...
|
||||
* </resource>
|
||||
* }
|
||||
* </pre>
|
||||
* where <em>"locale 1", "locale 2"</em> are valid xml:lang values..
|
||||
*
|
||||
* @param in XML file InputStream
|
||||
* @param locale The desired locale
|
||||
|
||||
@@ -32,33 +32,33 @@ import com.ibm.icu.util.Calendar;
|
||||
* Utility methods for validating data, especially input.
|
||||
* See detailed description below.
|
||||
*
|
||||
* <br/> SUMMARY
|
||||
* <br/>
|
||||
* <br/> This is a set of meethods for validating input. Functions are provided to validate:
|
||||
* <br/> - U.S. and international phone/fax numbers
|
||||
* <br/> - U.S. ZIP codes(5 or 9 digit postal codes)
|
||||
* <br/> - U.S. Postal Codes(2 letter abbreviations for names of states)
|
||||
* <br/> - U.S. Social Security Numbers(abbreviated as SSNs)
|
||||
* <br/> - email addresses
|
||||
* <br/> - dates(entry of year, month, and day and validity of combined date)
|
||||
* <br/> - credit card numbers
|
||||
* <br/>
|
||||
* <br/> Supporting utility functions validate that:
|
||||
* <br/> - characters are Letter, Digit, or LetterOrDigit
|
||||
* <br/> - strings are a Signed, Positive, Negative, Nonpositive, or Nonnegative integer
|
||||
* <br/> - strings are a Float or a SignedFloat
|
||||
* <br/> - strings are Alphabetic, Alphanumeric, or Whitespace
|
||||
* <br/> - strings contain an integer within a specified range
|
||||
* <br/>
|
||||
* <br/> Other utility functions are provided to:
|
||||
* <br/> - remove from a string characters which are/are not in a "bag" of selected characters
|
||||
* <br/> - strip whitespace/leading whitespace from a string
|
||||
* <br/>
|
||||
* <br/> ==============================================================================
|
||||
* <br/> NOTE: This code was adapted from the Netscape JavaScript form validation code,
|
||||
* <br/> usually found in "FormChek.js". Credit card verification functions Originally
|
||||
* <br/> included as Starter Application 1.0.0 in LivePayment.
|
||||
* <br/> ==============================================================================
|
||||
* <br> SUMMARY
|
||||
* <br>
|
||||
* <br> This is a set of meethods for validating input. Functions are provided to validate:
|
||||
* <br> - U.S. and international phone/fax numbers
|
||||
* <br> - U.S. ZIP codes(5 or 9 digit postal codes)
|
||||
* <br> - U.S. Postal Codes(2 letter abbreviations for names of states)
|
||||
* <br> - U.S. Social Security Numbers(abbreviated as SSNs)
|
||||
* <br> - email addresses
|
||||
* <br> - dates(entry of year, month, and day and validity of combined date)
|
||||
* <br> - credit card numbers
|
||||
* <br>
|
||||
* <br> Supporting utility functions validate that:
|
||||
* <br> - characters are Letter, Digit, or LetterOrDigit
|
||||
* <br> - strings are a Signed, Positive, Negative, Nonpositive, or Nonnegative integer
|
||||
* <br> - strings are a Float or a SignedFloat
|
||||
* <br> - strings are Alphabetic, Alphanumeric, or Whitespace
|
||||
* <br> - strings contain an integer within a specified range
|
||||
* <br>
|
||||
* <br> Other utility functions are provided to:
|
||||
* <br> - remove from a string characters which are/are not in a "bag" of selected characters
|
||||
* <br> - strip whitespace/leading whitespace from a string
|
||||
* <br>
|
||||
* <br> ==============================================================================
|
||||
* <br> NOTE: This code was adapted from the Netscape JavaScript form validation code,
|
||||
* <br> usually found in "FormChek.js". Credit card verification functions Originally
|
||||
* <br> included as Starter Application 1.0.0 in LivePayment.
|
||||
* <br> ==============================================================================
|
||||
*/
|
||||
public final class UtilValidate {
|
||||
|
||||
@@ -389,7 +389,10 @@ public final class UtilValidate {
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns true if string s is an integer > 0. NOTE: using the Java Long object for greatest precision */
|
||||
/**
|
||||
* Returns true if string s is an integer > 0.
|
||||
* NOTE: using the Java Long object for greatest precision
|
||||
*/
|
||||
public static boolean isPositiveInteger(String s) {
|
||||
if (isEmpty(s)) return defaultEmptyOK;
|
||||
|
||||
@@ -403,7 +406,9 @@ public final class UtilValidate {
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns true if string s is an integer >= 0. */
|
||||
/**
|
||||
* Returns true if string s is an integer >= 0
|
||||
*/
|
||||
public static boolean isNonnegativeInteger(String s) {
|
||||
if (isEmpty(s)) return defaultEmptyOK;
|
||||
|
||||
@@ -417,7 +422,9 @@ public final class UtilValidate {
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns true if string s is an integer < 0. */
|
||||
/**
|
||||
* Returns true if string s is an integer < 0
|
||||
*/
|
||||
public static boolean isNegativeInteger(String s) {
|
||||
if (isEmpty(s)) return defaultEmptyOK;
|
||||
|
||||
@@ -431,7 +438,9 @@ public final class UtilValidate {
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns true if string s is an integer <= 0. */
|
||||
/**
|
||||
* Returns true if string s is an integer <= 0
|
||||
*/
|
||||
public static boolean isNonpositiveInteger(String s) {
|
||||
if (isEmpty(s)) return defaultEmptyOK;
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ import com.thoughtworks.xstream.io.HierarchicalStreamReader;
|
||||
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
|
||||
|
||||
/**
|
||||
* Utilities methods to simplify dealing with JAXP & DOM XML parsing
|
||||
* Utilities methods to simplify dealing with JAXP and DOM XML parsing
|
||||
*
|
||||
*/
|
||||
public final class UtilXml {
|
||||
|
||||
Reference in New Issue
Block a user