[jboss-svn-commits] JBoss Portal SVN: r5210 - trunk/portlet/src/main/org/jboss/portal/portlet
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Sep 15 18:00:26 EDT 2006
Author: julien at jboss.com
Date: 2006-09-15 18:00:23 -0400 (Fri, 15 Sep 2006)
New Revision: 5210
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/Parameters.java
Log:
fixing and completing Parameters javadoc.
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/Parameters.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/Parameters.java 2006-09-15 17:17:35 UTC (rev 5209)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/Parameters.java 2006-09-15 22:00:23 UTC (rev 5210)
@@ -56,7 +56,7 @@
*
* @throws IllegalArgumentException if the parameters is null
*/
- public Parameters(Parameters parameters)
+ public Parameters(Parameters parameters) throws IllegalArgumentException
{
if (parameters == null)
{
@@ -71,8 +71,13 @@
* Copy the parameter map to initialize the object state.
*
* @throws IllegalArgumentException if the parameter map is null or not valid
+ * @throws NullPointerException if the map contains a null key or a null value
+ * @throws IllegalArgumentException if the map is null or it contains a value with
+ * a zero length array or a null element in the array
+ * @throws ClassCastException if the map contains a key that is not a string or a value that
+ * is not a string array
*/
- public Parameters(Map parameterMap)
+ public Parameters(Map parameterMap) throws NullPointerException, ClassCastException, IllegalArgumentException
{
this.map = new HashMap();
@@ -90,7 +95,7 @@
*
* @param name the parameter name
* @return the parameter value or null if it does not exist
- * @throws IllegalArgumentException if the name is null
+ * @throws NullPointerException if the name is null
*/
public String getValue(String name) throws IllegalArgumentException
{
@@ -103,7 +108,7 @@
*
* @param name the value to get
* @return the parameter values
- * @throws IllegalArgumentException if the name is null
+ * @throws NullPointerException if the name is null
*/
public String[] getValues(String name) throws IllegalArgumentException
{
@@ -119,8 +124,7 @@
*
* @param name the parameter name
* @param value the parameter value
- * @throws IllegalArgumentException if the name is null
- * @throws IllegalArgumentException if the value is null
+ * @throws NullPointerException if the name or the value is null
*/
public void setValue(String name, String value)
{
@@ -132,18 +136,29 @@
*
* @param name the parameter name
* @param values the parameter values
- * @throws IllegalArgumentException if the name is null
+ * @throws NullPointerException if the name or the value is null
+ * @throws IllegalArgumentException if the values length is zero or contains a null element
*/
- public void setValues(String name, String[] values)
+ public void setValues(String name, String[] values) throws NullPointerException, IllegalArgumentException
{
put(name, values);
}
/**
+ * Append the content of the argument map to that map. If both maps
+ * contains an entry sharing the same key, then the string arrays or the two entries will
+ * be concatenated into a single array. Each entry present on the argument map
+ * and not in the current map will be kept as is. The argument validation is performed
+ * before the state is updated.
+ *
* @param params the parameters to appends
- * @throws IllegalArgumentException if the params argument is not valid
+ * @throws NullPointerException if the map contains a null key or a null value
+ * @throws IllegalArgumentException if the map is null or it contains a value with
+ * a zero length array or a null element in the array
+ * @throws ClassCastException if the map contains a key that is not a string or a value that
+ * is not a string array
*/
- public void append(Map params) throws IllegalArgumentException
+ public void append(Map params) throws ClassCastException, NullPointerException, IllegalArgumentException
{
checkValidity(params);
@@ -152,9 +167,15 @@
}
/**
- * Replace all the exisint parameters with the new ones.
+ * Replace all the existing parameters with the new ones. The argument validation is performed
+ * before the state is updated.
*
- * @throws IllegalArgumentException if the map is not valid
+ * @param params the parameters to replace
+ * @throws NullPointerException if the map contains a null key or a null value
+ * @throws IllegalArgumentException if the map is null or it contains a value with
+ * a zero length array or a null element in the array
+ * @throws ClassCastException if the map contains a key that is not a string or a value that
+ * is not a string array
*/
public void replace(Map params)
{
More information about the jboss-svn-commits
mailing list