← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5393: added more resources to resource list

 

------------------------------------------------------------
revno: 5393
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-12-13 18:07:52 +0100
message:
  added more resources to resource list
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.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/src/main/java/org/hisp/dhis/api/webdomain/Resources.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.java	2011-12-13 14:04:12 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.java	2011-12-13 17:07:52 +0000
@@ -32,9 +32,11 @@
 import org.hisp.dhis.chart.Charts;
 import org.hisp.dhis.common.BaseLinkableObject;
 import org.hisp.dhis.common.Dxf2Namespace;
+import org.hisp.dhis.constant.Constants;
 import org.hisp.dhis.dataelement.*;
 import org.hisp.dhis.dataset.CompleteDataSetRegistrations;
 import org.hisp.dhis.dataset.DataSets;
+import org.hisp.dhis.document.Documents;
 import org.hisp.dhis.indicator.IndicatorGroupSets;
 import org.hisp.dhis.indicator.IndicatorGroups;
 import org.hisp.dhis.indicator.IndicatorTypes;
@@ -44,7 +46,10 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitGroups;
 import org.hisp.dhis.organisationunit.OrganisationUnits;
 import org.hisp.dhis.report.Reports;
+import org.hisp.dhis.sqlview.SqlViews;
 import org.hisp.dhis.user.Users;
+import org.hisp.dhis.validation.ValidationRuleGroups;
+import org.hisp.dhis.validation.ValidationRules;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.RequestMethod;
 
@@ -88,7 +93,7 @@
     //-----------------------------------------------
     // Helpers
     //-----------------------------------------------
-    
+
     private void generateResources()
     {
         RequestMethod[] defaultRequestMethods = new RequestMethod[]{
@@ -96,7 +101,7 @@
         };
 
         MediaType[] defaultMediaTypes = new MediaType[]{
-            MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_HTML,
+            MediaType.TEXT_HTML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON,
             new MediaType( "application", "javascript" ), new MediaType( "application", "pdf" )
         };
 
@@ -106,6 +111,8 @@
         resources.add( new Resource( "AttributeTypes", Attributes.class, requestMethods, mediaTypes ) );
         resources.add( new Resource( "Charts", Charts.class, requestMethods, mediaTypes ) );
         resources.add( new Resource( "Maps", Maps.class, requestMethods, mediaTypes ) );
+        resources.add( new Resource( "Documents", Documents.class, requestMethods, mediaTypes ) );
+        resources.add( new Resource( "Constants", Constants.class, requestMethods, mediaTypes ) );
         resources.add( new Resource( "CompleteDataSetRegistrations", CompleteDataSetRegistrations.class, requestMethods, mediaTypes ) );
         resources.add( new Resource( "Indicators", Indicators.class, requestMethods, mediaTypes ) );
         resources.add( new Resource( "IndicatorGroups", IndicatorGroups.class, requestMethods, mediaTypes ) );
@@ -121,6 +128,9 @@
         resources.add( new Resource( "OrganisationUnits", OrganisationUnits.class, requestMethods, mediaTypes ) );
         resources.add( new Resource( "OrganisationUnitGroups", OrganisationUnitGroups.class, requestMethods, mediaTypes ) );
         resources.add( new Resource( "OrganisationUnitGroupSets", OrganisationUnitGroupSets.class, requestMethods, mediaTypes ) );
+        resources.add( new Resource( "SqlViews", SqlViews.class, requestMethods, mediaTypes ) );
+        resources.add( new Resource( "ValidationRules", ValidationRules.class, requestMethods, mediaTypes ) );
+        resources.add( new Resource( "ValidationRuleGroups", ValidationRuleGroups.class, requestMethods, mediaTypes ) );
         resources.add( new Resource( "DataSets", DataSets.class, requestMethods, mediaTypes ) );
         resources.add( new Resource( "Users", Users.class, requestMethods, mediaTypes ) );
         resources.add( new Resource( "Reports", Reports.class, requestMethods, mediaTypes ) );