dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21330
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10057: FRED-API: minor fixes
------------------------------------------------------------
revno: 10057
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-03-07 22:03:23 +0300
message:
FRED-API: minor fixes
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/domain/Identifier.java
dhis-2/dhis-web/dhis-web-api-fred/src/main/webapp/WEB-INF/api-fred-velocity/v1/facilities.vm
--
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 2013-03-07 18:52:55 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Facility.java 2013-03-07 19:03:23 +0000
@@ -27,6 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.hibernate.validator.constraints.Length;
import org.hisp.dhis.web.webapi.v1.validation.constraint.annotation.ValidProperties;
import org.hisp.dhis.web.webapi.v1.validation.group.Update;
@@ -41,11 +42,12 @@
/**
* @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
*/
+@JsonPropertyOrder( value = { "uuid", "name", "active", "href", "createdAt", "updatedAt", "coordinates", "identifiers", "properties" } )
public class Facility
{
// Internal system identifier
- @NotNull(groups = Update.class)
- @Length(min = 36, max = 36)
+ @NotNull( groups = Update.class )
+ @Length( min = 36, max = 36 )
private String uuid;
// Name of the facility
=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Identifier.java'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Identifier.java 2013-02-04 18:03:10 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/java/org/hisp/dhis/web/webapi/v1/domain/Identifier.java 2013-03-07 19:03:23 +0000
@@ -27,13 +27,18 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.codehaus.jackson.annotate.JsonPropertyOrder;
+
/**
* @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
*/
+@JsonPropertyOrder( value = { "agency", "context", "id" } )
public class Identifier
{
public static final String DHIS2_AGENCY = "DHIS2";
+
public static final String DHIS2_CODE_CONTEXT = "DHIS2_CODE";
+
public static final String DHIS2_UID_CONTEXT = "DHIS2_UID";
private String id;
=== modified file 'dhis-2/dhis-web/dhis-web-api-fred/src/main/webapp/WEB-INF/api-fred-velocity/v1/facilities.vm'
--- dhis-2/dhis-web/dhis-web-api-fred/src/main/webapp/WEB-INF/api-fred-velocity/v1/facilities.vm 2013-03-07 18:52:55 +0000
+++ dhis-2/dhis-web/dhis-web-api-fred/src/main/webapp/WEB-INF/api-fred-velocity/v1/facilities.vm 2013-03-07 19:03:23 +0000
@@ -8,7 +8,7 @@
#foreach( $facility in $entity.facilities )
{
id: "$facility.uuid",
- url: "$facility.href",
+ href: "$facility.href",
name: "$esc.escapeEcmaScript($facility.name)",
coordinates: "$facility.coordinates"
},