svn commit: r1428264 - in /struts/struts2/trunk/xwork-core/src: main/java/com/opensymphony/xwork2/validator/validators/ test/java/com/opensymphony/xwork2/validator/

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 10:22:07 2013
New Revision: 1428264

URL: http://svn.apache.org/viewvc?rev=1428264&view=rev
Log:
WW-3892 adds support to specify expression, caseSensitive and trim params as 
expressions

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java

struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java

struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/RegexFieldValidatorTest.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java?rev=1428264&r1=1428263&r2=1428264&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
 Thu Jan  3 10:22:07 2013
@@ -18,16 +18,17 @@ package com.opensymphony.xwork2.validato
 
 /**
  * 
- * EmailValidator checks that a given String field, if not empty,
- * is a valid email address.
- * 
- * 
- * The regular expression used to validate that the string is an email address
- * is:
- * 
+ * EmailValidator checks that a given String field, if not empty, is a valid 
email address.
+ *
+ * The regular expression used to validate that the string is an email address 
is:
+ *
  * 
  * 
\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx)$\\b
  * 
+ *
+ * You can also specify expression, caseSensitive and trim params as a OGNL 
expression, see the example below.
+ * WARNING! Do not use ${expression}, ${caseSensitive} and ${trim} as an 
expression as this will turn into infinitive loop!
+ *
  * 
  * 
  * 
@@ -54,6 +55,16 @@ package com.opensymphony.xwork2.validato
  *   Must provide a valid email
  *
  * 
+ *
+ * 
+ * 
+ *
+ *   ${emailPattern} 

+ *   ${emailCaseSensitive} 
+ *   ${trimEmail} 
+ *   Must provide a valid email
+ *
+ * 
  * 
  * 
  *
@@ -69,9 +80,7 @@ public class EmailValidator extends Rege
 
 public EmailValidator() {
 setExpression(emailAddressPattern);
-setCaseSensitive(false);
+setCaseSensitive("false");
 }
 
 }
-
-

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java?rev=1428264&r1=1428263&r2=1428264&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
 Thu Jan  3 10:22:07 2013
@@ -16,6 +16,7 @@
 
 package com.opensymphony.xwork2.validator.validators;
 
+import com.opensymphony.xwork2.util.TextParseUtil;
 import com.opensymphony.xwork2.validator.ValidationException;
 
 import java.util.regex.Matcher;
@@ -116,7 +117,18 @@ public class RegexFieldValidator extends
  * Sets the regular expression to be matched.
  */
 public void setExpression(String expression) {
-this.expression = expression;
+if (parse) {
+this.expression = (String) parse(expression, String.class);
+} else {
+this.expression = expression;
+}
+}
+
+protected Object parse(String expression, Class type) {
+if (expression == null) {
+return null;
+}
+return TextParseUtil.translateVariables('$', expression, stack, type);
 }
 
 /**
@@ -131,8 +143,12 @@ public class RegexFieldValidator extends
  * Sets whether the expression should be matched against in
  * a case-sensitive way.  Default is true.
 

svn commit: r1428268 - /struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 10:31:35 2013
New Revision: 1428268

URL: http://svn.apache.org/viewvc?rev=1428268&view=rev
Log:
WW-3892 adds support to specify expression, caseSensitive and trim params as 
expressions

Modified:

struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl

Modified: 
struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl?rev=1428268&r1=1428267&r2=1428268&view=diff
==
--- 
struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
 (original)
+++ 
struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
 Thu Jan  3 10:31:35 2013
@@ -85,7 +85,7 @@ END SNIPPET: supported-validators
 <#if validator.shortCircuit>continueValidation = false;
 }
 <#elseif validator.validatorType = "email">
-if (continueValidation && field.value != null && 
field.value.length > 0 && 
field.value.match(/\b^['_a-z0-9-\+]+(\.['_a-z0-9-\+]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx)$\b/gi)==null)
 {
+if (continueValidation && field.value != null && 
field.value.length > 0 && field.value.match("${validator.expression}")==null) {
 addError(field, error);
 errors = true;
 <#if validator.shortCircuit>continueValidation = false;




svn commit: r1428270 - /struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 10:32:30 2013
New Revision: 1428270

URL: http://svn.apache.org/viewvc?rev=1428270&view=rev
Log:
WW-3892 adds support to specify expression, caseSensitive and trim params as 
expressions

Modified:

struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl

Modified: 
struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl?rev=1428270&r1=1428269&r2=1428270&view=diff
==
--- 
struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
 (original)
+++ 
struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
 Thu Jan  3 10:32:30 2013
@@ -85,7 +85,7 @@ END SNIPPET: supported-validators
 <#if validator.shortCircuit>continueValidation = false;
 }
 <#elseif validator.validatorType = "email">
-if (continueValidation && field.value != null && 
field.value.length > 0 && field.value.match("${validator.expression}")==null) {
+if (continueValidation && field.value != null && 
field.value.length > 0 && 
field.value.match("${validator.expression?js_string}")==null) {
 addError(field, error);
 errors = true;
 <#if validator.shortCircuit>continueValidation = false;




svn commit: r1428281 - in /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators: RegexFieldValidator.java ValidatorSupport.java

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 11:13:36 2013
New Revision: 1428281

URL: http://svn.apache.org/viewvc?rev=1428281&view=rev
Log:
Moves parse(String, Class) to parent class to allow use it in all subclasess

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java?rev=1428281&r1=1428280&r2=1428281&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RegexFieldValidator.java
 Thu Jan  3 11:13:36 2013
@@ -16,7 +16,6 @@
 
 package com.opensymphony.xwork2.validator.validators;
 
-import com.opensymphony.xwork2.util.TextParseUtil;
 import com.opensymphony.xwork2.validator.ValidationException;
 
 import java.util.regex.Matcher;
@@ -124,13 +123,6 @@ public class RegexFieldValidator extends
 }
 }
 
-protected Object parse(String expression, Class type) {
-if (expression == null) {
-return null;
-}
-return TextParseUtil.translateVariables('$', expression, stack, type);
-}
-
 /**
  * @return Returns whether the expression should be matched against in
  * a case-sensitive way.  Default is true.

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java?rev=1428281&r1=1428280&r2=1428281&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ValidatorSupport.java
 Thu Jan  3 11:13:36 2013
@@ -180,6 +180,13 @@ public abstract class ValidatorSupport i
 return expression;
 }
 
+protected Object parse(String expression, Class type) {
+if (expression == null) {
+return null;
+}
+return TextParseUtil.translateVariables('$', expression, stack, type);
+}
+
 /**
  * Return the field value named name from object,
  * object should have the appropriate getter/setter.




svn commit: r1428282 - in /struts/struts2/trunk/xwork-core/src: main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java test/java/com/opensymphony/xwork2/validator/Strin

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 11:14:26 2013
New Revision: 1428282

URL: http://svn.apache.org/viewvc?rev=1428282&view=rev
Log:
WW-3893 adds support to specify minLength, maxLength and trim params as 
expression

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java

struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/StringLengthFieldValidatorTest.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java?rev=1428282&r1=1428281&r2=1428282&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
 Thu Jan  3 11:14:26 2013
@@ -31,10 +31,11 @@ import com.opensymphony.xwork2.validator
  * 
  * 
  *fieldName - The field name this validator is validating. Required if 
using Plain-Validator Syntax otherwise not required
- *maxLength - The max length of the field value. Default ignore.
- *minLength - The min length of the field value. Default ignore.
- *trim - Trim the field value before evaluating its min/max length. 
Default true
+ *maxLength - The max length of the field value. Default ignore. Can 
be specified as OGNL expression when parse is set to true.
+ *minLength - The min length of the field value. Default ignore. Can 
be specified as OGNL expression when parse is set to true.
+ *trim - Trim the field value before evaluating its min/max length. 
Default true. Can be specified as OGNL expression when parse is set to 
true.
  * 
+ * WARNING! Do not use ${minLength}, ${maxLength} and ${trim} as an expression 
as this will turn into infinitive loop!
  * 
  * 
  * 
@@ -59,6 +60,16 @@ import com.opensymphony.xwork2.validator
  * Your purchase code needs to be 10 
characters long
  *
  *
+ *
+ *
+ *
+ *
+ * ${minLengthValue} 
+ * ${maxLengthValue} 
+ * ${trimValue} 

+ * Your purchase code needs to be 10 
characters long
+ *
+ *
  *  
  * 
  * 
@@ -71,33 +82,44 @@ import com.opensymphony.xwork2.validator
  */
 public class StringLengthFieldValidator extends FieldValidatorSupport {
 
-private boolean doTrim = true;
+private boolean trim = true;
 private int maxLength = -1;
 private int minLength = -1;
 
-
-public void setMaxLength(int maxLength) {
-this.maxLength = maxLength;
+public void setMaxLength(String maxLength) {
+if (parse) {
+this.maxLength = (Integer) parse(maxLength, Integer.class);
+} else {
+this.maxLength = Integer.valueOf(maxLength);
+}
 }
 
 public int getMaxLength() {
 return maxLength;
 }
 
-public void setMinLength(int minLength) {
-this.minLength = minLength;
+public void setMinLength(String minLength) {
+if (parse) {
+this.minLength = (Integer) parse(minLength, Integer.class);
+} else {
+this.minLength = Integer.parseInt(minLength);
+}
 }
 
 public int getMinLength() {
 return minLength;
 }
 
-public void setTrim(boolean trim) {
-doTrim = trim;
+public void setTrim(String trim) {
+if (parse) {
+this.trim = (Boolean) parse(trim, Boolean.class);
+} else {
+this.trim = Boolean.parseBoolean(trim);
+}
 }
 
-public boolean getTrim() {
-return doTrim;
+public boolean isTrim() {
+return trim;
 }
 
 public void validate(Object object) throws ValidationException {
@@ -108,11 +130,11 @@ public class StringLengthFieldValidator 
 // use a required validator for these
 return;
 }
-if (doTrim) {
+if (trim) {
 val = val.trim();
-if (val.length() <= 0) { 
-   // use a required validator
-   

svn commit: r1428293 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 11:29:38 2013
New Revision: 1428293

URL: http://svn.apache.org/viewvc?rev=1428293&view=rev
Log:
Removes duplicated code

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/AbstractRangeValidator.java

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/LongRangeFieldValidator.java

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidator.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/AbstractRangeValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/AbstractRangeValidator.java?rev=1428293&r1=1428292&r2=1428293&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/AbstractRangeValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/AbstractRangeValidator.java
 Thu Jan  3 11:29:38 2013
@@ -15,7 +15,6 @@
  */
 package com.opensymphony.xwork2.validator.validators;
 
-import com.opensymphony.xwork2.util.TextParseUtil;
 import com.opensymphony.xwork2.validator.ValidationException;
 
 
@@ -27,7 +26,13 @@ import com.opensymphony.xwork2.validator
  */
 public abstract class AbstractRangeValidator extends 
FieldValidatorSupport {
 
-private final Class type;
+protected final Class type;
+
+private T min;
+private T max;
+
+private String minExpression;
+private String maxExpression;
 
 protected AbstractRangeValidator(Class type) {
 this.type = type;
@@ -56,15 +61,50 @@ public abstract class AbstractRangeValid
 }
 }
 
-protected T parse(String expression) {
-if (expression == null) {
-return null;
+public T getMinComparatorValue() {
+if (parse) {
+return (T) parse(getMinExpression(), type);
 }
-return (T) TextParseUtil.translateVariables('$', expression, stack, 
type);
+return getMin();
+}
+
+public void setMin(T min) {
+this.min = min;
+}
+
+public T getMin() {
+return min;
 }
 
-protected abstract T getMaxComparatorValue();
+public String getMinExpression() {
+return minExpression;
+}
 
-protected abstract T getMinComparatorValue();
+public void setMinExpression(String minExpression) {
+this.minExpression = minExpression;
+}
+
+public void setMax(T max) {
+this.max = max;
+}
+
+public T getMax() {
+return max;
+}
+
+public String getMaxExpression() {
+return maxExpression;
+}
+
+public void setMaxExpression(String maxExpression) {
+this.maxExpression = maxExpression;
+}
+
+public T getMaxComparatorValue() {
+if (parse) {
+return (T) parse(getMaxExpression(), type);
+}
+return getMax();
+}
 
 }

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java?rev=1428293&r1=1428292&r2=1428293&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java
 Thu Jan  3 11:29:38 2013
@@ -88,61 +88,8 @@ import java.util.Date;
  */
 public class DateRangeFieldValidator extends AbstractRangeValidator {
 
-private Date min;
-private Date max;
-private String minExpression;
-private String maxExpression;
-
 public DateRangeFieldValidator() {
 super(Date.class);
 }
 
-public void setMin(Date min) {
-this.min = min;
-}
-
-public Date getMin() {
-return min;
-}
-
-public String getMinExpression() {
-return minExpression;
-}
-
-public void setMinExpression(String minExpression) {
-this.minExpression = minExpression;
-}
-
-@Override
-public Date getMinComparatorValue() {
-if (parse) {
-return parse(getMinExpression());
-}
-return getMin();
-}
-
-public void setMax(Date max) {
-this.max = max;
-}

svn commit: r1428423 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 16:04:24 2013
New Revision: 1428423

URL: http://svn.apache.org/viewvc?rev=1428423&view=rev
Log:
Adds additional SNIPPET

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java?rev=1428423&r1=1428422&r2=1428423&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java
 Thu Jan  3 16:04:24 2013
@@ -44,10 +44,11 @@ import java.util.Date;
  *
  * You can either use the min / max value or minExpression / maxExpression 
(when parse is set to true) -
  * using expression can be slightly slower, see the example below.
- * WARNING! Do not use ${minExpression} and ${maxExpression} as an expression 
as this will turn into infinitive loop!
- *
  * 
  *
+ * 
+ * WARNING! Do not use ${minExpression} and ${maxExpression} as an expression 
as this will turn into infinitive loop!
+ * 
  *
  * 
  * 




svn commit: r1428427 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 16:05:54 2013
New Revision: 1428427

URL: http://svn.apache.org/viewvc?rev=1428427&view=rev
Log:
Removes duplicated warning

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java?rev=1428427&r1=1428426&r2=1428427&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DateRangeFieldValidator.java
 Thu Jan  3 16:05:54 2013
@@ -47,7 +47,7 @@ import java.util.Date;
  * 
  *
  * 
- * WARNING! Do not use ${minExpression} and ${maxExpression} as an expression 
as this will turn into infinitive loop!
+ * Do not use ${minExpression} and ${maxExpression} as an expression as this 
will turn into infinitive loop!
  * 
  *
  * 




svn commit: r1428430 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 16:11:01 2013
New Revision: 1428430

URL: http://svn.apache.org/viewvc?rev=1428430&view=rev
Log:
Adds additional SNIPPET

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java?rev=1428430&r1=1428429&r2=1428430&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java
 Thu Jan  3 16:11:01 2013
@@ -33,10 +33,11 @@ package com.opensymphony.xwork2.validato
  *
  * You can either use the min / max value or minExpression / maxExpression 
(when parse is set to true) -
  * using expression can be slightly slower, see the example below.
- * WARNING! Do not use ${minExpression} and ${maxExpression} as an expression 
as this will turn into infinitive loop!
- *
  * 
  *
+ * 
+ * Do not use ${minExpression} and ${maxExpression} as an expression as this 
will turn into infinitive loop!
+ * 
  *
  * 
  * 




svn commit: r1428431 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/LongRangeFieldValidator.java

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 16:11:26 2013
New Revision: 1428431

URL: http://svn.apache.org/viewvc?rev=1428431&view=rev
Log:
Adds additional SNIPPET

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/LongRangeFieldValidator.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/LongRangeFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/LongRangeFieldValidator.java?rev=1428431&r1=1428430&r2=1428431&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/LongRangeFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/LongRangeFieldValidator.java
 Thu Jan  3 16:11:26 2013
@@ -33,10 +33,11 @@ package com.opensymphony.xwork2.validato
  *
  * You can either use the min / max value or minExpression / maxExpression 
(when parse is set to true) -
  * using expression can be slightly slower, see the example below.
- * WARNING! Do not use ${minExpression} and ${maxExpression} as an expression 
as this will turn into infinitive loop!
- *
  * 
  *
+ * 
+ * Do not use ${minExpression} and ${maxExpression} as an expression as this 
will turn into infinitive loop!
+ * 
  *
  * 
  * 




svn commit: r1428435 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidator.java

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 16:12:17 2013
New Revision: 1428435

URL: http://svn.apache.org/viewvc?rev=1428435&view=rev
Log:
Adds additional SNIPPET

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidator.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidator.java?rev=1428435&r1=1428434&r2=1428435&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/ShortRangeFieldValidator.java
 Thu Jan  3 16:12:17 2013
@@ -33,10 +33,12 @@ package com.opensymphony.xwork2.validato
  *
  * You can either use the min / max value or minExpression / maxExpression 
(when parse is set to true) -
  * using expression can be slightly slower, see the example below.
- * WARNING! Do not use ${minExpression} and ${maxExpression} as an expression 
as this will turn into infinitive loop!
- *
  * 
  *
+ * 
+ * Do not use ${minExpression} and ${maxExpression} as an expression as this 
will turn into infinitive loop!
+ * 
+ *
  * 
  * 
  *  




svn commit: r1428436 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 16:12:49 2013
New Revision: 1428436

URL: http://svn.apache.org/viewvc?rev=1428436&view=rev
Log:
Adds additional SNIPPET

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java?rev=1428436&r1=1428435&r2=1428436&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
 Thu Jan  3 16:12:49 2013
@@ -35,10 +35,12 @@ import com.opensymphony.xwork2.validator
  *minLength - The min length of the field value. Default ignore. Can 
be specified as OGNL expression when parse is set to true.
  *trim - Trim the field value before evaluating its min/max length. 
Default true. Can be specified as OGNL expression when parse is set to 
true.
  * 
- * WARNING! Do not use ${minLength}, ${maxLength} and ${trim} as an expression 
as this will turn into infinitive loop!
  * 
  * 
- * 
+ * 
+ * Do not use ${minLength}, ${maxLength} and ${trim} as an expression as this 
will turn into infinitive loop!
+ * 
+ *
  * 
  * 
  *  




svn commit: r1428441 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 16:14:09 2013
New Revision: 1428441

URL: http://svn.apache.org/viewvc?rev=1428441&view=rev
Log:
Adds additional SNIPPET

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java?rev=1428441&r1=1428440&r2=1428441&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
 Thu Jan  3 16:14:09 2013
@@ -27,8 +27,6 @@ package com.opensymphony.xwork2.validato
  * 
  *
  * You can also specify expression, caseSensitive and trim params as a OGNL 
expression, see the example below.
- * WARNING! Do not use ${expression}, ${caseSensitive} and ${trim} as an 
expression as this will turn into infinitive loop!
- *
  * 
  * 
  * 
@@ -37,7 +35,10 @@ package com.opensymphony.xwork2.validato
  * fieldName - The field name this validator is validating. 
Required if using Plain-Validator Syntax otherwise not required
  * 
  * 
- * 
+ *
+ * 
+ * Do not use ${expression}, ${caseSensitive} and ${trim} as an expression as 
this will turn into infinitive loop!
+ * 
  * 
  * 
  * 




svn commit: r1428445 - in /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators: EmailValidator.java StringLengthFieldValidator.java URLValidator.java

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 16:20:11 2013
New Revision: 1428445

URL: http://svn.apache.org/viewvc?rev=1428445&view=rev
Log:
Adds missing parse param in example

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/URLValidator.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java?rev=1428445&r1=1428444&r2=1428445&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
 Thu Jan  3 16:20:11 2013
@@ -60,6 +60,7 @@ package com.opensymphony.xwork2.validato
  * 
  * 
  *
+ *   true*
  *   ${emailPattern} 

  *   ${emailCaseSensitive} 
  *   ${trimEmail} 

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java?rev=1428445&r1=1428444&r2=1428445&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.java
 Thu Jan  3 16:20:11 2013
@@ -43,36 +43,37 @@ import com.opensymphony.xwork2.validator
  *
  * 
  * 
- *  
- *   
- *   
- *myPurchaseCode
- *10
- *10
- *true
- *Your purchase code needs to be 10 characters 
long 
- *
- * 
- *
- *
- *
- * 10
- * 10
- * true
- * Your purchase code needs to be 10 
characters long
- *
- *
+ * 
+ * 
+ * 
+ * myPurchaseCode
+ * 10
+ * 10
+ * true
+ * Your purchase code needs to be 10 characters 
long
+ * 
+ *
+ * 
+ * 
+ * 
+ *  10
+ *  10
+ *  true
+ *  Your purchase code needs to be 10 characters 
long
+ * 
+ * 
  *
- *
- *
- *
- * ${minLengthValue} 
- * ${maxLengthValue} 
- * ${trimValue} 

- * Your purchase code needs to be 10 
characters lo

svn commit: r1428457 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 16:31:57 2013
New Revision: 1428457

URL: http://svn.apache.org/viewvc?rev=1428457&view=rev
Log:
Corrects tiny problem with formatting

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java?rev=1428457&r1=1428456&r2=1428457&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/IntRangeFieldValidator.java
 Thu Jan  3 16:31:57 2013
@@ -41,7 +41,7 @@ package com.opensymphony.xwork2.validato
  *
  * 
  * 
- * 
+ * 
  *  
  *  
  *  age




svn commit: r1428576 - in /struts/struts2/trunk/xwork-core/src: main/java/com/opensymphony/xwork2/validator/validators/DoubleRangeFieldValidator.java test/java/com/opensymphony/xwork2/validator/Double

2013-01-03 Thread lukaszlenart
Author: lukaszlenart
Date: Thu Jan  3 20:25:46 2013
New Revision: 1428576

URL: http://svn.apache.org/viewvc?rev=1428576&view=rev
Log:
WW-3955 adds support to specify maxInclusive, minInclusive, minExclusive and 
maxExclusive params as expression

Modified:

struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DoubleRangeFieldValidator.java

struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/DoubleRangeValidatorTest.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DoubleRangeFieldValidator.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DoubleRangeFieldValidator.java?rev=1428576&r1=1428575&r2=1428576&view=diff
==
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DoubleRangeFieldValidator.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/DoubleRangeFieldValidator.java
 Thu Jan  3 20:25:46 2013
@@ -26,42 +26,52 @@ import com.opensymphony.xwork2.validator
  *
  * 
  * 
- * fieldName - The field name this validator is 
validating. Required if using
-Plain-Validator Syntax otherwise not required
- * minInclusive - the minimum inclusive value in 
FloatValue format specified by Java language (if none is specified, it will
-not be checked) 
- * maxInclusive - the maximum inclusive value in 
FloatValue format specified by Java language (if none is specified, it will
-not be checked) 
- * minExclusive - the minimum exclusive value in 
FloatValue format specified by Java language (if none is specified, it will
-not be checked) 
- * maxExclusive - the maximum exclusive value in 
FloatValue format specified by Java language (if none is specified, it will
-not be checked) 
+ * fieldName - The field name this validator is validating. Required 
if using Plain-Validator Syntax otherwise not required
+ * minInclusive - the minimum inclusive value in FloatValue format 
specified by Java language (if none is specified, it will not be checked) 
+ * maxInclusive - the maximum inclusive value in FloatValue format 
specified by Java language (if none is specified, it will not be checked) 
+ * minExclusive - the minimum exclusive value in FloatValue format 
specified by Java language (if none is specified, it will not be checked) 
+ * maxExclusive - the maximum exclusive value in FloatValue format 
specified by Java language (if none is specified, it will not be checked) 
  * 
+ *
+ * You can specify minInclusive, maxInclusive, minExclusive and maxExclusive 
as a OGNL expression, see example below.
  * 
  *
  *
+ * 
+ * Do not use ${minInclusive}, ${maxInclusive}, ${minExclusive} and 
${maxExclusive} as an expression as this will turn into infinitive loop!
+ * 
+ *
+ *
  * 
  * 
- * 
- *   
- *   
- *   percentage
- *   20.1
- *   50.1
- *   Age needs to be between ${minInclusive} and
-${maxInclusive} (inclusive)
- *   
- *
- *   
- *   
- *   
- *   0.123
- *   99.98
- *   Percentage needs to be between 
${minExclusive}
-and ${maxExclusive} (exclusive)
- *   
- *   
- *  
+ * 
+ * 
+ * 
+ * percentage
+ * 20.1
+ * 50.1
+ * Age needs to be between ${minInclusive} and 
${maxInclusive} (inclusive)
+ * 
+ *
+ * 
+ * 
+ * 
+ * 0.123
+ * 99.98
+ * Percentage needs to be between ${minExclusive} 
and ${maxExclusive} (exclusive)
+ * 
+ * 
+ *
+ * 
+ * 
+ * 
+ * true
+ * 

[CONF] Confluence Changes in the last 24 hours

2013-01-03 Thread confluence
This is a daily summary of all recent changes in Confluence.

-
Updated Spaces:
-


Apache ACE (https://cwiki.apache.org/confluence/display/ACE)

Pages
-
Board Report (2013-01) created by marrs (03:49 AM)
https://cwiki.apache.org/confluence/display/ACE/Board+Report+%282013-01%29



Apache ActiveMQ (https://cwiki.apache.org/confluence/display/ACTIVEMQ)

Pages
-
How do I find the Size of a Queue edited by  ceposta  (08:34 AM)
https://cwiki.apache.org/confluence/display/ACTIVEMQ/How+do+I+find+the+Size+of+a+Queue

How does ActiveMQ compare to AMQP edited by  ceposta  (07:56 AM)
https://cwiki.apache.org/confluence/display/ACTIVEMQ/How+does+ActiveMQ+compare+to+AMQP



Apache Bigtop (incubating) (https://cwiki.apache.org/confluence/display/BIGTOP)

Pages
-
Index edited by  s...@cloudera.com  (03:34 PM)
https://cwiki.apache.org/confluence/display/BIGTOP/Index



Apache Camel (https://cwiki.apache.org/confluence/display/CAMEL)

Pages
-
Camel 2.11.0 Release edited by  bvahdat  (11:38 AM)
https://cwiki.apache.org/confluence/display/CAMEL/Camel+2.11.0+Release

Web application without Spring Example created by davsclaus (11:28 AM)
https://cwiki.apache.org/confluence/display/CAMEL/Web+application+without+Spring+Example

Groovy DSL edited by  christian.ohr  (08:03 AM)
https://cwiki.apache.org/confluence/display/CAMEL/Groovy+DSL



Apache Cloudstack (https://cwiki.apache.org/confluence/display/CLOUDSTACK)

Pages
-
Integrate Cisco Virtual Security Gateway (VSG) into CloudStack created by 
manans (08:26 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Integrate+Cisco+Virtual+Security+Gateway+%28VSG%29+into+CloudStack

Integrate Cisco ASA 1000v as a FW for CloudStack created by manans (08:03 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Integrate+Cisco+ASA+1000v+as+a+FW+for+CloudStack

Granular Global Config Parameters created by manans (07:31 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Granular+Global+Config+Parameters

Multiple IP address per NIC edited by  hari.kan...@citrix.com  (07:25 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Multiple+IP+address+per+NIC

Affinity - Anti-affinity rules created by manans (07:17 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Affinity+-+Anti-affinity+rules

Security Groups Isolation in Advanced Zone created by manans (06:26 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Security+Groups+Isolation+in+Advanced+Zone

Zone-wide primary storage target edited by  hari.kan...@citrix.com  (06:44 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Zone-wide+primary+storage+target

Testing with Python edited by  tsp  (06:09 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Testing+with+Python

CloudStack API refactoring edited by  fangw  (05:18 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+API+refactoring

Private Host, Cluster, Pod edited by  hari.kan...@citrix.com  (02:51 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Private+Host%2C+Cluster%2C+Pod

CPU and RAM Overcommit edited by  hari.kan...@citrix.com  (01:59 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/CPU+and+RAM+Overcommit

nTier Apps 2.0 Requirements edited by  yasker  (01:51 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/nTier+Apps+2.0+Requirements

AWS Style Health Checks created by rajesh.batt...@citrix.com (12:36 PM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/AWS+Style+Health+Checks

Bylaw - Draft edited by  chip.child...@gmail.com  (10:01 AM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Bylaw+-+Draft

AWS-Style Regions Functional Spec created by kis...@cloud.com (08:50 AM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/AWS-Style+Regions+Functional+Spec



Apache CXF (https://cwiki.apache.org/confluence/display/CXF)

Pages
-
DOSGi Releases edited by  christian schneider  (05:42 AM)
https://cwiki.apache.org/confluence/display/CXF/DOSGi+Releases



Apache CXF Documentation (https://cwiki.apache.org/confluence/display/CXF20DOC)

Pages
-
JAXB edited by  cohei...@apache.org  (04:48 PM)
https://cwiki.apache.org/confluence/display/CXF20DOC/JAXB

Aegis (2.1) edited by  cohei...@apache.org  (06:30 AM)
https://cwiki.apache.org/confluence/display/CXF20DOC/Aegis+%282.1%29

Aegis Databinding (2.0.x) edited by  cohei...@apache.org  (06:24 AM)
https://cwiki.apache.org/