incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohit Yadav" <rohit.ya...@citrix.com>
Subject Re: Review Request: Add some validation code in the API layer; modify @Validator.
Date Wed, 19 Dec 2012 19:59:11 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8682/#review14731
-----------------------------------------------------------


Applied partial patch, cannot apply the rest as either it's commented out and the validators
are not in the patch.

Partial patch applied on api_refactoring correct Validator @interface:

commit c4b600a8d181eb3e4d58db1822015753af9d0e53
Author: Fang Wang <fang.wang@citrix.com>
Date:   Wed Dec 19 11:57:13 2012 -0800

    api: Fix Validator annotation interface
    
    Signed-off-by: Rohit Yadav <bhaisaab@apache.org>

diff --git a/api/src/org/apache/cloudstack/api/Validator.java b/api/src/org/apache/cloudstack/api/Validator.java
index ca2c241..541e01f 100644
--- a/api/src/org/apache/cloudstack/api/Validator.java
+++ b/api/src/org/apache/cloudstack/api/Validator.java
@@ -25,6 +25,6 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ FIELD })
 public @interface Validator {
-    String DBEntityValidator();
-    String RangeValidator();
+    Class<?>[] validators() default Object.class;
+    String description() default "";
 }

- Rohit Yadav


On Dec. 19, 2012, 5:19 a.m., Fang Wang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8682/
> -----------------------------------------------------------
> 
> (Updated Dec. 19, 2012, 5:19 a.m.)
> 
> 
> Review request for cloudstack and Rohit Yadav.
> 
> 
> Description
> -------
> 
> Move some validation code to API layer and modify the @Validator.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/Validator.java ca2c241 
>   api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java a1461fb 
>   server/src/com/cloud/user/AccountManagerImpl.java 593d295 
> 
> Diff: https://reviews.apache.org/r/8682/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Fang Wang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message