← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9253: minor fix

 

------------------------------------------------------------
revno: 9253
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-12-10 15:38:04 +0300
message:
  minor fix
modified:
  dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java
  dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java	2012-12-10 12:34:13 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java	2012-12-10 12:38:04 +0000
@@ -32,6 +32,7 @@
 import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidIdentifiers;
 import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidProperties;
 import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidUidReference;
+import org.hisp.dhis.web.webapi.v1.validation.group.Create;
 import org.hisp.dhis.web.webapi.v1.validation.group.Update;
 
 import javax.validation.constraints.NotNull;
@@ -74,7 +75,7 @@
     private List<Double> coordinates = new ArrayList<Double>();
 
     // External Facility Identifiers
-    @ValidIdentifiers
+    @ValidIdentifiers( groups = Create.class )
     private List<Identifier> identifiers = new ArrayList<Identifier>();
 
     // Implementation specific custom properties

=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java	2012-12-10 12:34:13 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/validation/constraint/annotation/ValidIdentifiers.java	2012-12-10 12:38:04 +0000
@@ -33,7 +33,6 @@
 import javax.validation.Payload;
 import java.lang.annotation.*;
 
-import static java.lang.annotation.ElementType.TYPE;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
@@ -50,7 +49,7 @@
 
     Class<? extends Payload>[] payload() default { };
 
-    @Target( { TYPE } )
+    @Target( { ElementType.TYPE, ElementType.METHOD, ElementType.FIELD } )
     @Retention( RUNTIME )
     @Documented
     public @interface List