You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2014/11/22 14:45:16 UTC
svn commit: r1641063 - in /jmeter/trunk/src:
components/org/apache/jmeter/assertions/ core/org/apache/jmeter/control/
core/org/apache/jmeter/gui/tree/ core/org/apache/jmeter/gui/util/
Author: fschumacher
Date: Sat Nov 22 13:45:15 2014
New Revision: 1641063
URL: http://svn.apache.org/r1641063
Log:
Bug 57193: Add param and return tags to javadoc
Bugzilla Id: 57193
Modified:
jmeter/trunk/src/components/org/apache/jmeter/assertions/HTMLAssertion.java
jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java
jmeter/trunk/src/components/org/apache/jmeter/assertions/XPathAssertion.java
jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeModel.java
jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java
jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java
Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/HTMLAssertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/HTMLAssertion.java?rev=1641063&r1=1641062&r2=1641063&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/HTMLAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/HTMLAssertion.java Sat Nov 22 13:45:15 2014
@@ -258,6 +258,9 @@ public class HTMLAssertion extends Abstr
* Sets the doctype setting
*
* @param inDoctype
+ * The doctype to be set. If <code>doctype</code> is
+ * <code>null</code> or a blank string, {@link HTMLAssertion#DEFAULT_DOCTYPE} will be
+ * used
*/
public void setDoctype(String inDoctype) {
if ((inDoctype == null) || (inDoctype.trim().equals(""))) {
@@ -268,9 +271,9 @@ public class HTMLAssertion extends Abstr
}
/**
- * Sets if errors shoud be tracked only
+ * Sets if errors should be tracked only
*
- * @param inErrorsOnly
+ * @param inErrorsOnly Flag whether only errors should be tracked
*/
public void setErrorsOnly(boolean inErrorsOnly) {
setProperty(new BooleanProperty(ERRORS_ONLY_KEY, inErrorsOnly));
@@ -280,6 +283,9 @@ public class HTMLAssertion extends Abstr
* Sets the threshold on error level
*
* @param inErrorThreshold
+ * The max number of parse errors which are to be tolerated
+ * @throws IllegalArgumentException
+ * if <code>inErrorThreshold</code> is less or equals zero
*/
public void setErrorThreshold(long inErrorThreshold) {
if (inErrorThreshold < 0L) {
@@ -296,6 +302,9 @@ public class HTMLAssertion extends Abstr
* Sets the threshold on warning level
*
* @param inWarningThreshold
+ * The max number of warnings which are to be tolerated
+ * @throws IllegalArgumentException
+ * if <code>inWarningThreshold</code> is less or equal zero
*/
public void setWarningThreshold(long inWarningThreshold) {
if (inWarningThreshold < 0L) {
@@ -368,7 +377,7 @@ public class HTMLAssertion extends Abstr
/**
* Sets the name of the tidy output file
*
- * @param inName
+ * @param inName The name of the file tidy will put its output to
*/
public void setFilename(String inName) {
setProperty(FILENAME_KEY, inName);
Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java?rev=1641063&r1=1641062&r2=1641063&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/SizeAssertion.java Sat Nov 22 13:45:15 2014
@@ -109,22 +109,40 @@ public class SizeAssertion extends Abstr
/**
* Returns the size in bytes to be asserted.
+ * @return The allowed size
*/
public String getAllowedSize() {
return getPropertyAsString(SIZE_KEY);
}
- /***************************************************************************
- * set the Operator
- **************************************************************************/
+ /**
+ Set the operator used for the assertion. Has to be one of
+ <dl>
+ * <dt>EQUAL</dt><dd>1</dd>
+ * <dt>NOTEQUAL</dt><dd>2</dd>
+ * <dt>GREATERTHAN</dt><dd>3</dd>
+ * <dt>LESSTHAN</dt><dd>4</dd>
+ * <dt>GREATERTHANEQUAL</dt><dd>5</dd>
+ * <dt>LESSTHANEQUAL</dt><dd>6</dd>
+ * </dl>
+ * @param operator The operator to be used in the assertion
+ */
public void setCompOper(int operator) {
setProperty(new IntegerProperty(OPERATOR_KEY, operator));
}
/**
- * Returns the operator to be asserted. EQUAL = 1, NOTEQUAL = 2 GREATERTHAN =
- * 3,LESSTHAN = 4,GREATERTHANEQUAL = 5,LESSTHANEQUAL = 6
+ * Returns the operator to be asserted.
+ * <dl>
+ * <dt>EQUAL</dt><dd>1</dd>
+ * <dt>NOTEQUAL</dt><dd>2</dd>
+ * <dt>GREATERTHAN</dt><dd>3</dd>
+ * <dt>LESSTHAN</dt><dd>4</dd>
+ * <dt>GREATERTHANEQUAL</dt><dd>5</dd>
+ * <dt>LESSTHANEQUAL</dt><dd>6</dd>
+ * </dl>
+ * @return The operator used for the assertion
*/
public int getCompOper() {
@@ -140,6 +158,10 @@ public class SizeAssertion extends Abstr
setProperty(SIZE_KEY, size);
}
+ /**
+ * Set the size that should be used in the assertion
+ * @param size The number of bytes
+ */
public void setAllowedSize(long size) {
setProperty(SIZE_KEY, Long.toString(size));
}
@@ -149,7 +171,7 @@ public class SizeAssertion extends Abstr
* logical comparator set in setLogicalComparator().
*
* Possible values are: equal, not equal, greater than, less than, greater
- * than eqaul, less than equal, .
+ * than equal, less than equal.
*
*/
private String compareSize(long resultSize) {
Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/XPathAssertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/XPathAssertion.java?rev=1641063&r1=1641062&r2=1641063&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/XPathAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/XPathAssertion.java Sat Nov 22 13:45:15 2014
@@ -156,7 +156,7 @@ public class XPathAssertion extends Abst
/**
* Set whether to ignore element whitespace
*
- * @param whitespace
+ * @param whitespace Flag whether whitespace elements should be ignored
*/
public void setWhitespace(boolean whitespace) {
setProperty(new BooleanProperty(WHITESPACE_KEY, whitespace));
@@ -165,7 +165,7 @@ public class XPathAssertion extends Abst
/**
* Set use validation
*
- * @param validate
+ * @param validate Flag whether validation should be used
*/
public void setValidating(boolean validate) {
setProperty(new BooleanProperty(VALIDATE_KEY, validate));
@@ -174,7 +174,7 @@ public class XPathAssertion extends Abst
/**
* Set whether this is namespace aware
*
- * @param namespace
+ * @param namespace Flag whether namespace should be used
*/
public void setNamespace(boolean namespace) {
setProperty(new BooleanProperty(NAMESPACE_KEY, namespace));
Modified: jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java?rev=1641063&r1=1641062&r2=1641063&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/control/GenericController.java Sat Nov 22 13:45:15 2014
@@ -207,7 +207,7 @@ public class GenericController extends A
/**
* If b is true, it means first is reset which means Controller has executed all its children
- * @param b
+ * @param b The flag, whether first is reseted
*/
public void setFirst(boolean b) {
first = b;
Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeModel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeModel.java?rev=1641063&r1=1641062&r2=1641063&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeModel.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeModel.java Sat Nov 22 13:45:15 2014
@@ -70,6 +70,8 @@ public class JMeterTreeModel extends Def
/**
* Returns a list of tree nodes that hold objects of the given class type.
* If none are found, an empty list is returned.
+ * @param type The type of nodes, which are to be collected
+ * @return a list of tree nodes of the given <code>type</code>, or an empty list
*/
public List<JMeterTreeNode> getNodesOfType(Class<?> type) {
List<JMeterTreeNode> nodeList = new LinkedList<JMeterTreeNode>();
@@ -79,6 +81,8 @@ public class JMeterTreeModel extends Def
/**
* Get the node for a given TestElement object.
+ * @param userObject The object to be found in this tree
+ * @return the node corresponding to the <code>userObject</code>
*/
public JMeterTreeNode getNodeOf(TestElement userObject) {
return traverseAndFind(userObject, (JMeterTreeNode) getRoot());
@@ -87,6 +91,20 @@ public class JMeterTreeModel extends Def
/**
* Adds the sub tree at the given node. Returns a boolean indicating whether
* the added sub tree was a full test plan.
+ *
+ * @param subTree
+ * The {@link HashTree} which is to be inserted into
+ * <code>current</code>
+ * @param current
+ * The node in which the <code>subTree</code> is to be inserted.
+ * Will be overridden, when an instance of {@link TestPlan} or
+ * {@link WorkBench} is found in the subtree.
+ * @return newly created sub tree now found at <code>current</code>
+ * @throws IllegalUserActionException
+ * when <code>current</code> is not an instance of
+ * {@link AbstractConfigGui} and no instance of {@link TestPlan}
+ * or {@link WorkBench} could be found in the
+ * <code>subTree</code>
*/
public HashTree addSubTree(HashTree subTree, JMeterTreeNode current) throws IllegalUserActionException {
Iterator<Object> iter = subTree.list().iterator();
@@ -114,6 +132,15 @@ public class JMeterTreeModel extends Def
return getCurrentSubTree(current);
}
+ /**
+ * Add a {@link TestElement} to a {@link JMeterTreeNode}
+ * @param component The {@link TestElement} to be used as data for the newly created note
+ * @param node The {@link JMeterTreeNode} into which the newly created node is to be inserted
+ * @return new {@link JMeterTreeNode} for the given <code>component</code>
+ * @throws IllegalUserActionException
+ * when the user object for the <code>node</code> is not an instance
+ * of {@link AbstractConfigGui}
+ */
public JMeterTreeNode addComponent(TestElement component, JMeterTreeNode node) throws IllegalUserActionException {
if (node.getUserObject() instanceof AbstractConfigGui) {
throw new IllegalUserActionException("This node cannot hold sub-elements");
@@ -135,7 +162,7 @@ public class JMeterTreeModel extends Def
// disable the loaded node
try {
newNode.setEnabled(component.isEnabled());
- } catch (Exception e) { // TODO - can this eever happen?
+ } catch (Exception e) { // TODO - can this ever happen?
newNode.setEnabled(true);
}
@@ -175,6 +202,11 @@ public class JMeterTreeModel extends Def
return null;
}
+ /**
+ * Get the current sub tree for a {@link JMeterTreeNode}
+ * @param node The {@link JMeterTreeNode} from which the sub tree is to be taken
+ * @return newly copied sub tree
+ */
public HashTree getCurrentSubTree(JMeterTreeNode node) {
ListedHashTree hashTree = new ListedHashTree(node);
Enumeration<JMeterTreeNode> enumNode = node.children();
@@ -185,10 +217,18 @@ public class JMeterTreeModel extends Def
return hashTree;
}
+ /**
+ * Get the {@link TestPlan} from the root of this tree
+ * @return The {@link TestPlan} found at the root of this tree
+ */
public HashTree getTestPlan() {
return getCurrentSubTree((JMeterTreeNode) ((JMeterTreeNode) this.getRoot()).getChildAt(0));
}
+ /**
+ * Get the {@link WorkBench} from the root of this tree
+ * @return The {@link WorkBench} found at the root of this tree
+ */
public HashTree getWorkBench() {
return getCurrentSubTree((JMeterTreeNode) ((JMeterTreeNode) this.getRoot()).getChildAt(1));
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java?rev=1641063&r1=1641062&r2=1641063&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java Sat Nov 22 13:45:15 2014
@@ -94,6 +94,7 @@ public class JMeterTreeNode extends Defa
/**
* Tag Node as result of a search
+ * @param tagged The flag to be used for tagging
*/
public void setMarkedBySearch(boolean tagged) {
this.markedBySearch = tagged;
Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java?rev=1641063&r1=1641062&r2=1641063&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java Sat Nov 22 13:45:15 2014
@@ -88,6 +88,8 @@ public class FileListPanel extends JPane
/**
* Constructor for the FilePanel object.
+ * @param l The changelistener for this panel
+ * @param title The title of this panel
*/
public FileListPanel(ChangeListener l, String title) {
this.title = title;
@@ -130,7 +132,7 @@ public class FileListPanel extends JPane
/**
* If the gui needs to enable/disable the FilePanel, call the method.
*
- * @param enable
+ * @param enable Flag whether FilePanel should be enabled
*/
public void enableFile(boolean enable) {
browse.setEnabled(enable);
@@ -139,7 +141,7 @@ public class FileListPanel extends JPane
/**
* Add a single file to the table
- * @param f
+ * @param f The name of the file to be added
*/
public void addFilename(String f) {
tableModel.addRow(f);