← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15434: finished exposing endpoints in schema-descriptors

 

------------------------------------------------------------
revno: 15434
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-05-27 15:18:27 +0200
message:
  finished exposing endpoints in schema-descriptors
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorTypeSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/InterpretationSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLayerSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLegendSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLegendSetSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapViewSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MessageConversationSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitLevelSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramValidationSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/RelationshipTypeSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportTableSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SectionSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityInstanceSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntitySchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleSchemaDescriptor.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/InterpretationController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MessageConversationController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/OptionSetController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ReportController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ReportTableController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SectionController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramStageController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/RelationshipTypeController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityAttributeController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityAttributeGroupController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityInstanceController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/indicator/IndicatorController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/indicator/IndicatorTypeController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLayerController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLegendController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLegendSetController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapViewController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitGroupController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitGroupSetController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitLevelController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserGroupController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserRoleController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/validation/ValidationRuleController.java
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/validation/ValidationRuleGroupController.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-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class IndicatorSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "indicator";
+
+    public static final String PLURAL = "indicators";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( Indicator.class, "indicator", "indicators" );
-
+        Schema schema = new Schema( Indicator.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_INDICATOR_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorTypeSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorTypeSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/IndicatorTypeSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,10 +42,17 @@
 @Component
 public class IndicatorTypeSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "indicatorType";
+
+    public static final String PLURAL = "indicatorTypes";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( IndicatorType.class, "indicatorType", "indicatorTypes" );
+        Schema schema = new Schema( IndicatorType.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_INDICATORTYPE_ADD" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_INDICATORTYPE_DELETE" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/InterpretationSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/InterpretationSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/InterpretationSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -39,11 +39,17 @@
 @Component
 public class InterpretationSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "interpretation";
+
+    public static final String PLURAL = "interpretations";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( Interpretation.class, "interpretation", "interpretations" );
-
+        Schema schema = new Schema( Interpretation.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         return schema;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLayerSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLayerSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLayerSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -39,9 +39,18 @@
 @Component
 public class MapLayerSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "mapLayer";
+
+    public static final String PLURAL = "mapLayers";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        return new Schema( MapLayer.class, "mapLayer", "mapLayers" );
+        Schema schema = new Schema( MapLayer.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLegendSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLegendSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLegendSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -39,9 +39,18 @@
 @Component
 public class MapLegendSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "mapLegend";
+
+    public static final String PLURAL = "mapLegends";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        return new Schema( MapLegend.class, "mapLegend", "mapLegends" );
+        Schema schema = new Schema( MapLegend.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLegendSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLegendSetSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapLegendSetSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -39,9 +39,18 @@
 @Component
 public class MapLegendSetSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "mapLegendSet";
+
+    public static final String PLURAL = "mapLegendSets";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        return new Schema( MapLegendSet.class, "mapLegendSet", "mapLegendSets" );
+        Schema schema = new Schema( MapLegendSet.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class MapSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "map";
+
+    public static final String PLURAL = "maps";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( Map.class, "map", "maps" );
-
+        Schema schema = new Schema( Map.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_MAP_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapViewSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapViewSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MapViewSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -39,9 +39,18 @@
 @Component
 public class MapViewSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "mapView";
+
+    public static final String PLURAL = "mapViews";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        return new Schema( MapView.class, "mapView", "mapViews" );
+        Schema schema = new Schema( MapView.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MessageConversationSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MessageConversationSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/MessageConversationSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -39,9 +39,18 @@
 @Component
 public class MessageConversationSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "messageConversation";
+
+    public static final String PLURAL = "messageConversations";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        return new Schema( MessageConversation.class, "messageConversation", "messageConversations" );
+        Schema schema = new Schema( MessageConversation.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class OptionSetSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "optionSet";
+
+    public static final String PLURAL = "optionSets";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( OptionSet.class, "optionSet", "optionSets" );
-
+        Schema schema = new Schema( OptionSet.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_OPTIONSET_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class OrganisationUnitGroupSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "organisationUnitGroup";
+
+    public static final String PLURAL = "organisationUnitGroups";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( OrganisationUnitGroup.class, "organisationUnitGroup", "organisationUnitGroups" );
-
+        Schema schema = new Schema( OrganisationUnitGroup.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_ORGUNITGROUP_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class OrganisationUnitGroupSetSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "organisationUnitGroupSet";
+
+    public static final String PLURAL = "organisationUnitGroupSets";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( OrganisationUnitGroupSet.class, "organisationUnitGroupSet", "organisationUnitGroupSets" );
-
+        Schema schema = new Schema( OrganisationUnitGroupSet.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_ORGUNITGROUPSET_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitLevelSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitLevelSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitLevelSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,10 +42,17 @@
 @Component
 public class OrganisationUnitLevelSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "organisationUnitLevel";
+
+    public static final String PLURAL = "organisationUnitLevels";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( OrganisationUnitLevel.class, "organisationUnitLevel", "organisationUnitLevels" );
+        Schema schema = new Schema( OrganisationUnitLevel.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.UPDATE, Lists.newArrayList( "F_ORGANISATIONUNITLEVEL_UPDATE" ) ) );
 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,10 +42,17 @@
 @Component
 public class OrganisationUnitSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "organisationUnit";
+
+    public static final String PLURAL = "organisationUnits";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( OrganisationUnit.class, "organisationUnit", "organisationUnits" );
+        Schema schema = new Schema( OrganisationUnit.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_ORGANISATIONUNIT_ADD" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_ORGANISATIONUNIT_DELETE" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class ProgramSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "program";
+
+    public static final String PLURAL = "programs";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( Program.class, "program", "programs" );
-
+        Schema schema = new Schema( Program.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_PROGRAM_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramStageSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,10 +42,17 @@
 @Component
 public class ProgramStageSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "programStage";
+
+    public static final String PLURAL = "programStages";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( ProgramStage.class, "programStage", "programStages" );
+        Schema schema = new Schema( ProgramStage.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_PROGRAMSTAGE_ADD" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_PROGRAMSTAGE_DELETE" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramValidationSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramValidationSchemaDescriptor.java	2014-05-26 14:27:43 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ProgramValidationSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -70,10 +70,17 @@
 @Component
 public class ProgramValidationSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "programValidation";
+
+    public static final String PLURAL = "programValidations";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( ProgramValidation.class, "programValidation", "programValidations" );
+        Schema schema = new Schema( ProgramValidation.class, SINGULAR, PLURAL );
+        // schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_PROGRAM_VALIDATION" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_PROGRAM_VALIDATION" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/RelationshipTypeSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/RelationshipTypeSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/RelationshipTypeSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,10 +42,17 @@
 @Component
 public class RelationshipTypeSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "relationshipType";
+
+    public static final String PLURAL = "relationshipTypes";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( RelationshipType.class, "relationshipType", "relationshipTypes" );
+        Schema schema = new Schema( RelationshipType.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_RELATIONSHIPTYPE_ADD" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_RELATIONSHIPTYPE_DELETE" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class ReportSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "report";
+
+    public static final String PLURAL = "reports";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( Report.class, "report", "reports" );
-
+        Schema schema = new Schema( Report.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_REPORT_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportTableSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportTableSchemaDescriptor.java	2014-03-27 01:16:51 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ReportTableSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class ReportTableSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "reportTable";
+
+    public static final String PLURAL = "reportTables";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( ReportTable.class, "reportTable", "reportTables" );
-
+        Schema schema = new Schema( ReportTable.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_REPORTTABLE_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SectionSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SectionSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SectionSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,10 +42,17 @@
 @Component
 public class SectionSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "section";
+
+    public static final String PLURAL = "sections";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( Section.class, "section", "sections" );
+        Schema schema = new Schema( Section.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_SECTION_ADD" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_SECTION_DELETE" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeGroupSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,10 +42,17 @@
 @Component
 public class TrackedEntityAttributeGroupSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "trackedEntityAttributeGroup";
+
+    public static final String PLURAL = "trackedEntityAttributeGroups";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( TrackedEntityAttributeGroup.class, "trackedEntityAttributeGroup", "trackedEntityAttributeGroups" );
+        Schema schema = new Schema( TrackedEntityAttributeGroup.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE,
             Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_PUBLIC_ADD", "F_TRACKED_ENTITY_ATTRIBUTE_PRIVATE_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class TrackedEntityAttributeSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "trackedEntityAttribute";
+
+    public static final String PLURAL = "trackedEntityAttributes";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( TrackedEntityAttribute.class, "trackedEntityAttribute", "trackedEntityAttributes" );
-
+        Schema schema = new Schema( TrackedEntityAttribute.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityInstanceSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityInstanceSchemaDescriptor.java	2014-03-26 09:23:47 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityInstanceSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -39,9 +39,18 @@
 @Component
 public class TrackedEntityInstanceSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "trackedEntityInstance";
+
+    public static final String PLURAL = "trackedEntityInstances";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        return new Schema( TrackedEntityInstance.class, "trackedEntityInstance", "trackedEntityInstances" );
+        Schema schema = new Schema( TrackedEntityInstance.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
+
+        return schema;
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntitySchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntitySchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntitySchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,10 +42,17 @@
 @Component
 public class TrackedEntitySchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "trackedEntity";
+
+    public static final String PLURAL = "trackedEntities";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( TrackedEntity.class, "trackedEntity", "trackedEntities" );
+        Schema schema = new Schema( TrackedEntity.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_TRACKED_ENTITY_ADD" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.UPDATE, Lists.newArrayList( "F_TRACKED_ENTITY_UPDATE" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserGroupSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,12 +42,19 @@
 @Component
 public class UserGroupSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "userGroup";
+
+    public static final String PLURAL = "userGroups";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( UserGroup.class, "userGroup", "userGroups" );
-
+        Schema schema = new Schema( UserGroup.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
+
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_USERGROUP_PUBLIC_ADD" ) ) );
 
         return schema;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java	2014-05-19 11:44:01 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class UserRoleSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "userRole";
+
+    public static final String PLURAL = "userRoles";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( UserAuthorityGroup.class, "userRole", "userRoles" );
-
+        Schema schema = new Schema( UserAuthorityGroup.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE_PUBLIC, Lists.newArrayList( "F_USERROLE_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,10 +42,17 @@
 @Component
 public class UserSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "user";
+
+    public static final String PLURAL = "users";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( User.class, "user", "users" );
+        Schema schema = new Schema( User.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_USER_ADD" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_USER_DELETE" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,11 +42,17 @@
 @Component
 public class ValidationRuleGroupSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "validationRuleGroup";
+
+    public static final String PLURAL = "validationRuleGroups";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( ValidationRuleGroup.class, "validationRuleGroup", "validationRuleGroups" );
-
+        Schema schema = new Schema( ValidationRuleGroup.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
         schema.setShareable( true );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_VALIDATIONRULEGROUP_PUBLIC_ADD" ) ) );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleSchemaDescriptor.java	2014-03-26 14:28:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleSchemaDescriptor.java	2014-05-27 13:18:27 +0000
@@ -42,10 +42,17 @@
 @Component
 public class ValidationRuleSchemaDescriptor implements SchemaDescriptor
 {
+    public static final String SINGULAR = "validationRule";
+
+    public static final String PLURAL = "validationRules";
+
+    public static final String API_ENDPOINT = "/" + PLURAL;
+
     @Override
     public Schema getSchema()
     {
-        Schema schema = new Schema( ValidationRule.class, "validationRule", "validationRules" );
+        Schema schema = new Schema( ValidationRule.class, SINGULAR, PLURAL );
+        schema.setApiEndpoint( API_ENDPOINT );
 
         schema.getAuthorities().add( new Authority( AuthorityType.CREATE, Lists.newArrayList( "F_VALIDATIONRULE_ADD" ) ) );
         schema.getAuthorities().add( new Authority( AuthorityType.DELETE, Lists.newArrayList( "F_VALIDATIONRULE_DELETE" ) ) );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/InterpretationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/InterpretationController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/InterpretationController.java	2014-05-27 13:18:27 +0000
@@ -28,14 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.hisp.dhis.webapi.utils.ContextUtils;
+import com.google.common.collect.Lists;
 import org.hisp.dhis.chart.Chart;
 import org.hisp.dhis.chart.ChartService;
 import org.hisp.dhis.common.Pager;
@@ -52,8 +45,10 @@
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.reporttable.ReportTable;
 import org.hisp.dhis.reporttable.ReportTableService;
+import org.hisp.dhis.schema.descriptors.InterpretationSchemaDescriptor;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
+import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.AccessDeniedException;
 import org.springframework.stereotype.Controller;
@@ -63,18 +58,20 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 
-import com.google.common.collect.Lists;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
 /**
  * @author Lars Helge Overland
  */
 @Controller
-@RequestMapping( value = InterpretationController.RESOURCE_PATH )
+@RequestMapping( value = InterpretationSchemaDescriptor.API_ENDPOINT )
 public class InterpretationController
     extends AbstractCrudController<Interpretation>
 {
-    public static final String RESOURCE_PATH = "/interpretations";
-
     @Autowired
     private InterpretationService interpretationService;
 
@@ -148,7 +145,7 @@
 
         interpretationService.saveInterpretation( interpretation );
 
-        ContextUtils.createdResponse( response, "Interpretation created", InterpretationController.RESOURCE_PATH + "/" + interpretation.getUid() );
+        ContextUtils.createdResponse( response, "Interpretation created", InterpretationSchemaDescriptor.API_ENDPOINT + "/" + interpretation.getUid() );
     }
 
     @RequestMapping( value = "/map/{uid}", method = RequestMethod.POST, consumes = { "text/html", "text/plain" } )
@@ -168,7 +165,7 @@
 
         interpretationService.saveInterpretation( interpretation );
 
-        ContextUtils.createdResponse( response, "Interpretation created", InterpretationController.RESOURCE_PATH + "/" + interpretation.getUid() );
+        ContextUtils.createdResponse( response, "Interpretation created", InterpretationSchemaDescriptor.API_ENDPOINT + "/" + interpretation.getUid() );
     }
 
     @RequestMapping( value = "/reportTable/{uid}", method = RequestMethod.POST, consumes = { "text/html", "text/plain" } )
@@ -205,7 +202,7 @@
 
         interpretationService.saveInterpretation( interpretation );
 
-        ContextUtils.createdResponse( response, "Interpretation created", InterpretationController.RESOURCE_PATH + "/" + interpretation.getUid() );
+        ContextUtils.createdResponse( response, "Interpretation created", InterpretationSchemaDescriptor.API_ENDPOINT + "/" + interpretation.getUid() );
     }
 
     @RequestMapping( value = "/dataSetReport/{uid}", method = RequestMethod.POST, consumes = { "text/html", "text/plain" } )
@@ -243,7 +240,7 @@
 
         interpretationService.saveInterpretation( interpretation );
 
-        ContextUtils.createdResponse( response, "Interpretation created", InterpretationController.RESOURCE_PATH + "/" + interpretation.getUid() );
+        ContextUtils.createdResponse( response, "Interpretation created", InterpretationSchemaDescriptor.API_ENDPOINT + "/" + interpretation.getUid() );
     }
 
     @Override
@@ -367,7 +364,7 @@
         InterpretationComment comment = interpretationService.addInterpretationComment( uid, text );
 
         StringBuilder builder = new StringBuilder();
-        builder.append( InterpretationController.RESOURCE_PATH ).append( "/" ).append( uid );
+        builder.append( InterpretationSchemaDescriptor.API_ENDPOINT ).append( "/" ).append( uid );
         builder.append( "/comments/" ).append( comment.getUid() );
 
         ContextUtils.createdResponse( response, "Commented created", builder.toString() );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MessageConversationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MessageConversationController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MessageConversationController.java	2014-05-27 13:18:27 +0000
@@ -28,15 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.hisp.dhis.webapi.utils.ContextUtils;
+import com.google.common.collect.Lists;
 import org.hisp.dhis.common.Pager;
 import org.hisp.dhis.dxf2.message.Message;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
@@ -44,11 +36,13 @@
 import org.hisp.dhis.message.MessageService;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.schema.descriptors.MessageConversationSchemaDescriptor;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserGroup;
 import org.hisp.dhis.user.UserGroupService;
 import org.hisp.dhis.user.UserService;
+import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -57,18 +51,21 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 
-import com.google.common.collect.Lists;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = MessageConversationController.RESOURCE_PATH )
+@RequestMapping( value = MessageConversationSchemaDescriptor.API_ENDPOINT )
 public class MessageConversationController
     extends AbstractCrudController<MessageConversation>
 {
-    public static final String RESOURCE_PATH = "/messageConversations";
-
     @Autowired
     private MessageService messageService;
 
@@ -89,7 +86,7 @@
     {
         Boolean markRead = Boolean.parseBoolean( parameters.get( "markRead" ) );
 
-        if ( markRead  )
+        if ( markRead )
         {
             entity.markRead( currentUserService.getCurrentUser() );
             manager.update( entity );
@@ -193,10 +190,10 @@
         String metaData = MessageService.META_USER_AGENT + request.getHeader( ContextUtils.HEADER_USER_AGENT );
 
         int id = messageService.sendMessage( message.getSubject(), message.getText(), metaData, message.getUsers() );
-        
+
         MessageConversation conversation = messageService.getMessageConversation( id );
 
-        ContextUtils.createdResponse( response, "Message conversation created", MessageConversationController.RESOURCE_PATH + "/" + conversation.getUid() );
+        ContextUtils.createdResponse( response, "Message conversation created", MessageConversationSchemaDescriptor.API_ENDPOINT + "/" + conversation.getUid() );
     }
 
     //--------------------------------------------------------------------------
@@ -205,7 +202,7 @@
 
     @RequestMapping( value = "/{uid}", method = RequestMethod.POST )
     public void postMessageConversationReply( @PathVariable( "uid" ) String uid, @RequestBody String body,
-                                              HttpServletRequest request, HttpServletResponse response ) throws Exception
+        HttpServletRequest request, HttpServletResponse response ) throws Exception
     {
         String metaData = MessageService.META_USER_AGENT + request.getHeader( ContextUtils.HEADER_USER_AGENT );
 
@@ -219,7 +216,7 @@
 
         messageService.sendReply( conversation, body, metaData );
 
-        ContextUtils.createdResponse( response, "Message conversation created", MessageConversationController.RESOURCE_PATH + "/" + conversation.getUid() );
+        ContextUtils.createdResponse( response, "Message conversation created", MessageConversationSchemaDescriptor.API_ENDPOINT + "/" + conversation.getUid() );
     }
 
     //--------------------------------------------------------------------------
@@ -228,7 +225,7 @@
 
     @RequestMapping( value = "/feedback", method = RequestMethod.POST )
     public void postMessageConversationFeedback( @RequestParam( "subject" ) String subject, @RequestBody String body,
-                                                 HttpServletRequest request, HttpServletResponse response ) throws Exception
+        HttpServletRequest request, HttpServletResponse response ) throws Exception
     {
         String metaData = MessageService.META_USER_AGENT + request.getHeader( ContextUtils.HEADER_USER_AGENT );
 

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/OptionSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/OptionSetController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/OptionSetController.java	2014-05-27 13:18:27 +0000
@@ -28,16 +28,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletResponse;
-
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
 import org.hisp.dhis.option.OptionService;
 import org.hisp.dhis.option.OptionSet;
+import org.hisp.dhis.schema.descriptors.OptionSetSchemaDescriptor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -45,16 +39,20 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping(value = OptionSetController.RESOURCE_PATH)
+@RequestMapping( value = OptionSetSchemaDescriptor.API_ENDPOINT )
 public class OptionSetController
     extends AbstractCrudController<OptionSet>
 {
-    public static final String RESOURCE_PATH = "/optionSets";
-    
     @Autowired
     private OptionService optionService;
 
@@ -69,15 +67,15 @@
 
         JacksonUtils.toJson( response.getOutputStream(), versionMap );
     }
-    
+
     @RequestMapping( value = "/{uid}/options", method = RequestMethod.GET )
-    public void getOptions( @PathVariable( "uid" ) String uid, 
-        @RequestParam(required = false) String key, 
-        @RequestParam(required = false) Integer max,
+    public void getOptions( @PathVariable( "uid" ) String uid,
+        @RequestParam( required = false ) String key,
+        @RequestParam( required = false ) Integer max,
         HttpServletResponse response ) throws IOException
     {
         List<String> options = optionService.getOptions( uid, key, max );
-        
+
         JacksonUtils.toJson( response.getOutputStream(), options );
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ReportController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ReportController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ReportController.java	2014-05-27 13:18:27 +0000
@@ -28,21 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.webapi.utils.ContextUtils.DATE_PATTERN;
-import static org.hisp.dhis.system.util.CodecUtils.filenameEncode;
-
-import java.util.Calendar;
-import java.util.Date;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
 import net.sf.jasperreports.engine.JasperPrint;
 import net.sf.jasperreports.j2ee.servlets.BaseHttpServlet;
 import net.sf.jasperreports.j2ee.servlets.ImageServlet;
-
-import org.hisp.dhis.webapi.utils.ContextUtils;
-import org.hisp.dhis.webapi.utils.ContextUtils.CacheStrategy;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.i18n.I18nManager;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
@@ -52,7 +40,10 @@
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.report.Report;
 import org.hisp.dhis.report.ReportService;
+import org.hisp.dhis.schema.descriptors.ReportSchemaDescriptor;
 import org.hisp.dhis.system.util.CodecUtils;
+import org.hisp.dhis.webapi.utils.ContextUtils;
+import org.hisp.dhis.webapi.utils.ContextUtils.CacheStrategy;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -63,17 +54,23 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Calendar;
+import java.util.Date;
+
+import static org.hisp.dhis.system.util.CodecUtils.filenameEncode;
+import static org.hisp.dhis.webapi.utils.ContextUtils.DATE_PATTERN;
+
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  * @author Lars Helge Overland
  */
 @Controller
-@RequestMapping( value = ReportController.RESOURCE_PATH )
+@RequestMapping( value = ReportSchemaDescriptor.API_ENDPOINT )
 public class ReportController
     extends AbstractCrudController<Report>
 {
-    public static final String RESOURCE_PATH = "/reports";
-
     @Autowired
     public ReportService reportService;
 
@@ -92,19 +89,19 @@
 
     @RequestMapping( value = "/{uid}/design", method = RequestMethod.PUT )
     @PreAuthorize( "hasRole('ALL')" )
-    public void updateReportDesign( @PathVariable( "uid" ) String uid, 
+    public void updateReportDesign( @PathVariable( "uid" ) String uid,
         @RequestBody String designContent,
         HttpServletResponse response ) throws Exception
     {
         Report report = reportService.getReport( uid );
-        
+
         if ( report == null )
         {
             ContextUtils.notFoundResponse( response, "Report not found for identifier: " + uid );
             return;
         }
-        
-        report.setDesignContent( designContent );        
+
+        report.setDesignContent( designContent );
         reportService.saveReport( report );
     }
 
@@ -118,13 +115,13 @@
             ContextUtils.notFoundResponse( response, "Report not found for identifier: " + uid );
             return;
         }
-        
+
         if ( report.getDesignContent() == null )
         {
             ContextUtils.conflictResponse( response, "Report has no design content: " + uid );
             return;
-        }        
-        
+        }
+
         if ( Report.TYPE_HTML.equals( report.getType() ) )
         {
             contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_HTML, CacheStrategy.NO_CACHE, filenameEncode( report.getName() ) + ".html", true );
@@ -133,7 +130,7 @@
         {
             contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_XML, CacheStrategy.NO_CACHE, filenameEncode( report.getName() ) + ".jrxml", true );
         }
-        
+
         response.getWriter().write( report.getDesignContent() );
     }
 
@@ -181,7 +178,7 @@
      * reports path in this controller.
      */
     @RequestMapping( value = "/jasperReports/img", method = RequestMethod.GET )
-    public void getJasperImage( @RequestParam String image, 
+    public void getJasperImage( @RequestParam String image,
         HttpServletRequest request, HttpServletResponse response ) throws Exception
     {
         new ImageServlet().service( request, response );
@@ -195,7 +192,7 @@
         Date date, String type, String contentType, boolean attachment ) throws Exception
     {
         Report report = reportService.getReport( uid );
-        
+
         I18nFormat format = i18nManager.getI18nFormat();
 
         if ( report == null )
@@ -203,7 +200,7 @@
             ContextUtils.notFoundResponse( response, "Report does not exist: " + uid );
             return;
         }
-        
+
         if ( organisationUnitUid == null && report.hasReportTable() && report.getReportTable().hasReportParams()
             && report.getReportTable().getReportParams().isOrganisationUnitSet() )
         {
@@ -213,23 +210,23 @@
         if ( report.isTypeHtml() )
         {
             contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_HTML, CacheStrategy.RESPECT_SYSTEM_SETTING );
-            
+
             reportService.renderHtmlReport( response.getWriter(), uid, date, organisationUnitUid, format );
         }
         else
         {
             date = date != null ? date : new Cal().now().subtract( Calendar.MONTH, 1 ).time();
-            
+
             Period period = isoPeriod != null ? PeriodType.getPeriodFromIsoString( isoPeriod ) : new MonthlyPeriodType().createPeriod( date );
-            
+
             String filename = CodecUtils.filenameEncode( report.getName() ) + "." + type;
-            
+
             contextUtils.configureResponse( response, contentType, CacheStrategy.RESPECT_SYSTEM_SETTING, filename, attachment );
-            
+
             JasperPrint print = reportService.renderReport( response.getOutputStream(), uid, period, organisationUnitUid, type, format );
-            
+
             if ( "html".equals( type ) )
-            {            
+            {
                 request.getSession().setAttribute( BaseHttpServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, print );
             }
         }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ReportTableController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ReportTableController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ReportTableController.java	2014-05-27 13:18:27 +0000
@@ -28,19 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.webapi.utils.ContextUtils.DATE_PATTERN;
-import static org.hisp.dhis.common.DimensionalObjectUtils.getUniqueDimensions;
-import static org.hisp.dhis.system.util.CodecUtils.filenameEncode;
-
-import java.io.InputStream;
-import java.util.Calendar;
-import java.util.Date;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.hisp.dhis.webapi.utils.ContextUtils;
-import org.hisp.dhis.webapi.utils.ContextUtils.CacheStrategy;
 import org.hisp.dhis.common.DimensionService;
 import org.hisp.dhis.common.Grid;
 import org.hisp.dhis.dataelement.DataElementService;
@@ -58,8 +45,11 @@
 import org.hisp.dhis.period.PeriodService;
 import org.hisp.dhis.reporttable.ReportTable;
 import org.hisp.dhis.reporttable.ReportTableService;
+import org.hisp.dhis.schema.descriptors.ReportTableSchemaDescriptor;
 import org.hisp.dhis.system.grid.GridUtils;
 import org.hisp.dhis.user.UserService;
+import org.hisp.dhis.webapi.utils.ContextUtils;
+import org.hisp.dhis.webapi.utils.ContextUtils.CacheStrategy;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.http.HttpStatus;
@@ -71,17 +61,25 @@
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseStatus;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.InputStream;
+import java.util.Calendar;
+import java.util.Date;
+
+import static org.hisp.dhis.common.DimensionalObjectUtils.getUniqueDimensions;
+import static org.hisp.dhis.system.util.CodecUtils.filenameEncode;
+import static org.hisp.dhis.webapi.utils.ContextUtils.DATE_PATTERN;
+
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  * @author Lars Helge Overland
  */
 @Controller
-@RequestMapping( value = ReportTableController.RESOURCE_PATH )
+@RequestMapping( value = ReportTableSchemaDescriptor.API_ENDPOINT )
 public class ReportTableController
     extends AbstractCrudController<ReportTable>
 {
-    public static final String RESOURCE_PATH = "/reportTables";
-
     @Autowired
     public ReportTableService reportTableService;
 
@@ -105,10 +103,10 @@
 
     @Autowired
     private UserService userService;
-    
+
     @Autowired
     private DimensionService dimensionService;
-    
+
     @Autowired
     private MappingService mappingService;
 
@@ -132,7 +130,7 @@
 
         reportTableService.saveReportTable( reportTable );
 
-        ContextUtils.createdResponse( response, "Report table created", RESOURCE_PATH + "/" + reportTable.getUid() );
+        ContextUtils.createdResponse( response, "Report table created", ReportTableSchemaDescriptor.API_ENDPOINT + "/" + reportTable.getUid() );
     }
 
     @Override
@@ -282,7 +280,7 @@
     protected void postProcessEntity( ReportTable reportTable ) throws Exception
     {
         reportTable.populateAnalyticalProperties();
-        
+
         for ( OrganisationUnit organisationUnit : reportTable.getOrganisationUnits() )
         {
             reportTable.getParentGraphMap().put( organisationUnit.getUid(), organisationUnit.getParentGraph() );
@@ -298,7 +296,7 @@
             }
         }
     }
-    
+
     //--------------------------------------------------------------------------
     // Supportive methods
     //--------------------------------------------------------------------------
@@ -306,15 +304,15 @@
     private void mergeReportTable( ReportTable reportTable )
     {
         dimensionService.mergeAnalyticalObject( reportTable );
-        
+
         reportTable.getColumnDimensions().clear();
         reportTable.getRowDimensions().clear();
         reportTable.getFilterDimensions().clear();
-        
+
         reportTable.getColumnDimensions().addAll( getUniqueDimensions( reportTable.getColumns() ) );
         reportTable.getRowDimensions().addAll( getUniqueDimensions( reportTable.getRows() ) );
         reportTable.getFilterDimensions().addAll( getUniqueDimensions( reportTable.getFilters() ) );
-        
+
         if ( reportTable.getLegendSet() != null )
         {
             reportTable.setLegendSet( mappingService.getMapLegendSet( reportTable.getLegendSet().getUid() ) );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SectionController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SectionController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SectionController.java	2014-05-27 13:18:27 +0000
@@ -29,6 +29,7 @@
  */
 
 import org.hisp.dhis.dataset.Section;
+import org.hisp.dhis.schema.descriptors.SectionSchemaDescriptor;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -36,9 +37,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = SectionController.RESOURCE_PATH )
+@RequestMapping( value = SectionSchemaDescriptor.API_ENDPOINT )
 public class SectionController
     extends AbstractCrudController<Section>
 {
-    public static final String RESOURCE_PATH = "/sections";
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramController.java	2014-05-27 13:18:27 +0000
@@ -28,31 +28,29 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
+import com.google.common.collect.Lists;
+import org.hisp.dhis.common.Pager;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.program.Program;
+import org.hisp.dhis.schema.descriptors.ProgramSchemaDescriptor;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
 import org.hisp.dhis.webapi.controller.WebMetaData;
 import org.hisp.dhis.webapi.controller.WebOptions;
-import org.hisp.dhis.common.Pager;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.program.Program;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import com.google.common.collect.Lists;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = ProgramController.RESOURCE_PATH )
+@RequestMapping( value = ProgramSchemaDescriptor.API_ENDPOINT )
 public class ProgramController
     extends AbstractCrudController<Program>
 {
-    public static final String RESOURCE_PATH = "/programs";
-
     protected List<Program> getEntityList( WebMetaData metaData, WebOptions options )
     {
         List<Program> entityList;

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramStageController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramStageController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/ProgramStageController.java	2014-05-27 13:18:27 +0000
@@ -29,13 +29,14 @@
  */
 
 import com.google.common.collect.Lists;
-import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.webapi.controller.WebMetaData;
-import org.hisp.dhis.webapi.controller.WebOptions;
 import org.hisp.dhis.common.Pager;
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramService;
 import org.hisp.dhis.program.ProgramStage;
+import org.hisp.dhis.schema.descriptors.ProgramStageSchemaDescriptor;
+import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.controller.WebMetaData;
+import org.hisp.dhis.webapi.controller.WebOptions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -47,12 +48,10 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping(value = ProgramStageController.RESOURCE_PATH)
+@RequestMapping( value = ProgramStageSchemaDescriptor.API_ENDPOINT )
 public class ProgramStageController
     extends AbstractCrudController<ProgramStage>
 {
-    public static final String RESOURCE_PATH = "/programStages";
-
     private ProgramService programService;
 
     @Autowired

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/RelationshipTypeController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/RelationshipTypeController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/RelationshipTypeController.java	2014-05-27 13:18:27 +0000
@@ -28,11 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
 import org.hisp.dhis.relationship.RelationshipType;
 import org.hisp.dhis.relationship.RelationshipTypeService;
+import org.hisp.dhis.schema.descriptors.RelationshipTypeSchemaDescriptor;
+import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.stereotype.Controller;
@@ -49,11 +50,9 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = RelationshipTypeController.RESOURCE_PATH )
+@RequestMapping( value = RelationshipTypeSchemaDescriptor.API_ENDPOINT )
 public class RelationshipTypeController extends AbstractCrudController<RelationshipType>
 {
-    public static final String RESOURCE_PATH = "/relationshipTypes";
-
     @Autowired
     private RelationshipTypeService relationshipTypeService;
 
@@ -68,7 +67,7 @@
         RelationshipType relationshipType = JacksonUtils.fromXml( input, RelationshipType.class );
         relationshipTypeService.addRelationshipType( relationshipType );
 
-        response.setHeader( "Location", ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + relationshipType.getUid() );
+        response.setHeader( "Location", ContextUtils.getRootPath( request ) + RelationshipTypeSchemaDescriptor.API_ENDPOINT + "/" + relationshipType.getUid() );
     }
 
     @RequestMapping( method = RequestMethod.POST, consumes = "application/json" )
@@ -78,7 +77,7 @@
         RelationshipType relationshipType = JacksonUtils.fromJson( input, RelationshipType.class );
         relationshipTypeService.addRelationshipType( relationshipType );
 
-        response.setHeader( "Location", ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + relationshipType.getUid() );
+        response.setHeader( "Location", ContextUtils.getRootPath( request ) + RelationshipTypeSchemaDescriptor.API_ENDPOINT + "/" + relationshipType.getUid() );
     }
 
     //--------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityAttributeController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityAttributeController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityAttributeController.java	2014-05-27 13:18:27 +0000
@@ -29,16 +29,17 @@
  */
 
 import com.google.common.collect.Lists;
-import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.webapi.controller.WebMetaData;
-import org.hisp.dhis.webapi.controller.WebOptions;
-import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.hisp.dhis.common.Pager;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
 import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramService;
+import org.hisp.dhis.schema.descriptors.TrackedEntityAttributeSchemaDescriptor;
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityAttributeService;
+import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.controller.WebMetaData;
+import org.hisp.dhis.webapi.controller.WebOptions;
+import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.stereotype.Controller;
@@ -57,12 +58,10 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = TrackedEntityAttributeController.RESOURCE_PATH )
+@RequestMapping( value = TrackedEntityAttributeSchemaDescriptor.API_ENDPOINT )
 public class TrackedEntityAttributeController
     extends AbstractCrudController<TrackedEntityAttribute>
 {
-    public static final String RESOURCE_PATH = "/trackedEntityAttributes";
-
     @Autowired
     private TrackedEntityAttributeService trackedEntityAttributeService;
 
@@ -125,7 +124,7 @@
         TrackedEntityAttribute trackedEntityAttribute = JacksonUtils.fromXml( input, TrackedEntityAttribute.class );
         trackedEntityAttributeService.addTrackedEntityAttribute( trackedEntityAttribute );
 
-        response.setHeader( "Location", ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + trackedEntityAttribute.getUid() );
+        response.setHeader( "Location", ContextUtils.getRootPath( request ) + TrackedEntityAttributeSchemaDescriptor.API_ENDPOINT + "/" + trackedEntityAttribute.getUid() );
     }
 
     @RequestMapping( method = RequestMethod.POST, consumes = "application/json" )
@@ -135,7 +134,7 @@
         TrackedEntityAttribute trackedEntityAttribute = JacksonUtils.fromJson( input, TrackedEntityAttribute.class );
         trackedEntityAttributeService.addTrackedEntityAttribute( trackedEntityAttribute );
 
-        response.setHeader( "Location", ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + trackedEntityAttribute.getUid() );
+        response.setHeader( "Location", ContextUtils.getRootPath( request ) + TrackedEntityAttributeSchemaDescriptor.API_ENDPOINT + "/" + trackedEntityAttribute.getUid() );
     }
 
     //--------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityAttributeGroupController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityAttributeGroupController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityAttributeGroupController.java	2014-05-27 13:18:27 +0000
@@ -28,11 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
+import org.hisp.dhis.schema.descriptors.TrackedEntityAttributeGroupSchemaDescriptor;
 import org.hisp.dhis.trackedentity.TrackedEntityAttributeGroup;
 import org.hisp.dhis.trackedentity.TrackedEntityAttributeGroupService;
+import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.stereotype.Controller;
@@ -49,11 +50,10 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = TrackedEntityAttributeGroupController.RESOURCE_PATH )
-public class TrackedEntityAttributeGroupController extends AbstractCrudController<TrackedEntityAttributeGroup>
+@RequestMapping( value = TrackedEntityAttributeGroupSchemaDescriptor.API_ENDPOINT )
+public class TrackedEntityAttributeGroupController
+    extends AbstractCrudController<TrackedEntityAttributeGroup>
 {
-    public static final String RESOURCE_PATH = "/trackedEntityAttributeGroups";
-
     @Autowired
     private TrackedEntityAttributeGroupService trackedEntityAttributeGroupService;
 
@@ -68,7 +68,7 @@
         TrackedEntityAttributeGroup trackedEntityAttributeGroup = JacksonUtils.fromXml( input, TrackedEntityAttributeGroup.class );
         trackedEntityAttributeGroupService.addTrackedEntityAttributeGroup( trackedEntityAttributeGroup );
 
-        response.setHeader( "Location", ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + trackedEntityAttributeGroup.getUid() );
+        response.setHeader( "Location", ContextUtils.getRootPath( request ) + TrackedEntityAttributeGroupSchemaDescriptor.API_ENDPOINT + "/" + trackedEntityAttributeGroup.getUid() );
     }
 
     @RequestMapping( method = RequestMethod.POST, consumes = "application/json" )
@@ -78,7 +78,7 @@
         TrackedEntityAttributeGroup trackedEntityAttributeGroup = JacksonUtils.fromJson( input, TrackedEntityAttributeGroup.class );
         trackedEntityAttributeGroupService.addTrackedEntityAttributeGroup( trackedEntityAttributeGroup );
 
-        response.setHeader( "Location", ContextUtils.getRootPath( request ) + RESOURCE_PATH + "/" + trackedEntityAttributeGroup.getUid() );
+        response.setHeader( "Location", ContextUtils.getRootPath( request ) + TrackedEntityAttributeGroupSchemaDescriptor.API_ENDPOINT + "/" + trackedEntityAttributeGroup.getUid() );
     }
 
     //--------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityController.java	2014-05-26 12:52:12 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityController.java	2014-05-27 13:18:27 +0000
@@ -28,6 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.schema.descriptors.TrackedEntitySchemaDescriptor;
 import org.hisp.dhis.trackedentity.TrackedEntity;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
 import org.springframework.stereotype.Controller;
@@ -37,8 +38,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = TrackedEntityController.RESOURCE_PATH )
-public class TrackedEntityController extends AbstractCrudController<TrackedEntity>
+@RequestMapping( value = TrackedEntitySchemaDescriptor.API_ENDPOINT )
+public class TrackedEntityController
+    extends AbstractCrudController<TrackedEntity>
 {
-    public static final String RESOURCE_PATH = "/trackedEntities";
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityInstanceController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityInstanceController.java	2014-05-23 18:27:45 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityInstanceController.java	2014-05-27 13:18:27 +0000
@@ -28,19 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.IOException;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.hisp.dhis.webapi.controller.WebOptions;
-import org.hisp.dhis.webapi.controller.exception.NotFoundException;
-import org.hisp.dhis.webapi.utils.ContextUtils;
-import org.hisp.dhis.webapi.utils.ContextUtils.CacheStrategy;
 import org.hisp.dhis.common.Grid;
 import org.hisp.dhis.common.IdentifiableObjectManager;
 import org.hisp.dhis.common.IllegalQueryException;
@@ -53,8 +40,13 @@
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
 import org.hisp.dhis.event.EventStatus;
 import org.hisp.dhis.program.ProgramStatus;
+import org.hisp.dhis.schema.descriptors.TrackedEntityInstanceSchemaDescriptor;
 import org.hisp.dhis.system.grid.GridUtils;
 import org.hisp.dhis.trackedentity.TrackedEntityInstanceQueryParams;
+import org.hisp.dhis.webapi.controller.WebOptions;
+import org.hisp.dhis.webapi.controller.exception.NotFoundException;
+import org.hisp.dhis.webapi.utils.ContextUtils;
+import org.hisp.dhis.webapi.utils.ContextUtils.CacheStrategy;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.http.HttpStatus;
@@ -69,19 +61,25 @@
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseStatus;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = TrackedEntityInstanceController.RESOURCE_PATH )
+@RequestMapping( value = TrackedEntityInstanceSchemaDescriptor.API_ENDPOINT )
 @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_INSTANCE_SEARCH')" )
 public class TrackedEntityInstanceController
 {
-    public static final String RESOURCE_PATH = "/trackedEntityInstances";
-
     @Autowired
     private TrackedEntityInstanceService trackedEntityInstanceService;
-    
+
     @Autowired
     private org.hisp.dhis.trackedentity.TrackedEntityInstanceService instanceService;
 
@@ -94,37 +92,37 @@
     // -------------------------------------------------------------------------
     // READ
     // -------------------------------------------------------------------------
-    
+
     @RequestMapping( method = RequestMethod.GET, produces = { ContextUtils.CONTENT_TYPE_JSON, ContextUtils.CONTENT_TYPE_JAVASCRIPT } )
     public String queryTrackedEntityInstancesJson(
-        @RequestParam(required=false) String query,
-        @RequestParam(required=false) Set<String> attribute,
-        @RequestParam(required=false) Set<String> filter,
+        @RequestParam( required = false ) String query,
+        @RequestParam( required = false ) Set<String> attribute,
+        @RequestParam( required = false ) Set<String> filter,
         @RequestParam String ou,
-        @RequestParam(required=false) OrganisationUnitSelectionMode ouMode,
-        @RequestParam(required=false) String program,
-        @RequestParam(required=false) ProgramStatus programStatus,
-        @RequestParam(required=false) Boolean followUp,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programStartDate,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programEndDate,
-        @RequestParam(required=false) String trackedEntity,
-        @RequestParam(required=false) EventStatus eventStatus,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventStartDate,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventEndDate,
-        @RequestParam(required=false) boolean skipMeta,
-        @RequestParam(required=false) Integer page,
-        @RequestParam(required=false) Integer pageSize,
+        @RequestParam( required = false ) OrganisationUnitSelectionMode ouMode,
+        @RequestParam( required = false ) String program,
+        @RequestParam( required = false ) ProgramStatus programStatus,
+        @RequestParam( required = false ) Boolean followUp,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programStartDate,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programEndDate,
+        @RequestParam( required = false ) String trackedEntity,
+        @RequestParam( required = false ) EventStatus eventStatus,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventStartDate,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventEndDate,
+        @RequestParam( required = false ) boolean skipMeta,
+        @RequestParam( required = false ) Integer page,
+        @RequestParam( required = false ) Integer pageSize,
         Model model,
         HttpServletResponse response ) throws Exception
     {
-        Set<String> orgUnits = new HashSet<String>( ContextUtils.getQueryParamValues( ou ) );        
-        TrackedEntityInstanceQueryParams params = instanceService.getFromUrl( query, attribute, filter, orgUnits, ouMode, 
-            program, programStatus, followUp, programStartDate, programEndDate, trackedEntity, 
+        Set<String> orgUnits = new HashSet<String>( ContextUtils.getQueryParamValues( ou ) );
+        TrackedEntityInstanceQueryParams params = instanceService.getFromUrl( query, attribute, filter, orgUnits, ouMode,
+            program, programStatus, followUp, programStartDate, programEndDate, trackedEntity,
             eventStatus, eventStartDate, eventEndDate, skipMeta, page, pageSize );
-        
+
         contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_JSON, CacheStrategy.NO_CACHE );
         Grid grid = instanceService.getTrackedEntityInstances( params );
-        
+
         model.addAttribute( "model", grid );
         model.addAttribute( "viewClass", "detailed" );
         return "grid";
@@ -132,31 +130,31 @@
 
     @RequestMapping( method = RequestMethod.GET, produces = ContextUtils.CONTENT_TYPE_XML )
     public void queryTrackedEntityInstancesXml(
-        @RequestParam(required=false) String query,
-        @RequestParam(required=false) Set<String> attribute,
-        @RequestParam(required=false) Set<String> filter,
+        @RequestParam( required = false ) String query,
+        @RequestParam( required = false ) Set<String> attribute,
+        @RequestParam( required = false ) Set<String> filter,
         @RequestParam String ou,
-        @RequestParam(required=false) OrganisationUnitSelectionMode ouMode,
-        @RequestParam(required=false) String program,
-        @RequestParam(required=false) ProgramStatus programStatus,
-        @RequestParam(required=false) Boolean followUp,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programStartDate,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programEndDate,
-        @RequestParam(required=false) String trackedEntity,
-        @RequestParam(required=false) EventStatus eventStatus,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventStartDate,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventEndDate,
-        @RequestParam(required=false) boolean skipMeta,
-        @RequestParam(required=false) Integer page,
-        @RequestParam(required=false) Integer pageSize,
+        @RequestParam( required = false ) OrganisationUnitSelectionMode ouMode,
+        @RequestParam( required = false ) String program,
+        @RequestParam( required = false ) ProgramStatus programStatus,
+        @RequestParam( required = false ) Boolean followUp,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programStartDate,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programEndDate,
+        @RequestParam( required = false ) String trackedEntity,
+        @RequestParam( required = false ) EventStatus eventStatus,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventStartDate,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventEndDate,
+        @RequestParam( required = false ) boolean skipMeta,
+        @RequestParam( required = false ) Integer page,
+        @RequestParam( required = false ) Integer pageSize,
         Model model,
         HttpServletResponse response ) throws Exception
     {
-        Set<String> orgUnits = new HashSet<String>( ContextUtils.getQueryParamValues( ou ) );        
-        TrackedEntityInstanceQueryParams params = instanceService.getFromUrl( query, attribute, filter, orgUnits, ouMode, 
-            program, programStatus, followUp, programStartDate, programEndDate, trackedEntity, 
+        Set<String> orgUnits = new HashSet<String>( ContextUtils.getQueryParamValues( ou ) );
+        TrackedEntityInstanceQueryParams params = instanceService.getFromUrl( query, attribute, filter, orgUnits, ouMode,
+            program, programStatus, followUp, programStartDate, programEndDate, trackedEntity,
             eventStatus, eventStartDate, eventEndDate, skipMeta, page, pageSize );
-        
+
         contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_XML, CacheStrategy.NO_CACHE );
         Grid grid = instanceService.getTrackedEntityInstances( params );
         GridUtils.toXml( grid, response.getOutputStream() );
@@ -164,31 +162,31 @@
 
     @RequestMapping( method = RequestMethod.GET, produces = ContextUtils.CONTENT_TYPE_EXCEL )
     public void queryTrackedEntityInstancesXls(
-        @RequestParam(required=false) String query,
-        @RequestParam(required=false) Set<String> attribute,
-        @RequestParam(required=false) Set<String> filter,
+        @RequestParam( required = false ) String query,
+        @RequestParam( required = false ) Set<String> attribute,
+        @RequestParam( required = false ) Set<String> filter,
         @RequestParam String ou,
-        @RequestParam(required=false) OrganisationUnitSelectionMode ouMode,
-        @RequestParam(required=false) String program,
-        @RequestParam(required=false) ProgramStatus programStatus,
-        @RequestParam(required=false) Boolean followUp,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programStartDate,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programEndDate,
-        @RequestParam(required=false) String trackedEntity,
-        @RequestParam(required=false) EventStatus eventStatus,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventStartDate,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventEndDate,
-        @RequestParam(required=false) boolean skipMeta,
-        @RequestParam(required=false) Integer page,
-        @RequestParam(required=false) Integer pageSize,
+        @RequestParam( required = false ) OrganisationUnitSelectionMode ouMode,
+        @RequestParam( required = false ) String program,
+        @RequestParam( required = false ) ProgramStatus programStatus,
+        @RequestParam( required = false ) Boolean followUp,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programStartDate,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programEndDate,
+        @RequestParam( required = false ) String trackedEntity,
+        @RequestParam( required = false ) EventStatus eventStatus,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventStartDate,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventEndDate,
+        @RequestParam( required = false ) boolean skipMeta,
+        @RequestParam( required = false ) Integer page,
+        @RequestParam( required = false ) Integer pageSize,
         Model model,
         HttpServletResponse response ) throws Exception
     {
-        Set<String> orgUnits = new HashSet<String>( ContextUtils.getQueryParamValues( ou ) );        
-        TrackedEntityInstanceQueryParams params = instanceService.getFromUrl( query, attribute, filter, orgUnits, ouMode, 
-            program, programStatus, followUp, programStartDate, programEndDate, trackedEntity, 
+        Set<String> orgUnits = new HashSet<String>( ContextUtils.getQueryParamValues( ou ) );
+        TrackedEntityInstanceQueryParams params = instanceService.getFromUrl( query, attribute, filter, orgUnits, ouMode,
+            program, programStatus, followUp, programStartDate, programEndDate, trackedEntity,
             eventStatus, eventStartDate, eventEndDate, skipMeta, page, pageSize );
-        
+
         contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_EXCEL, CacheStrategy.NO_CACHE );
         Grid grid = instanceService.getTrackedEntityInstances( params );
         GridUtils.toXls( grid, response.getOutputStream() );
@@ -196,36 +194,36 @@
 
     @RequestMapping( method = RequestMethod.GET, produces = ContextUtils.CONTENT_TYPE_CSV )
     public void queryTrackedEntityInstancesCsv(
-        @RequestParam(required=false) String query,
-        @RequestParam(required=false) Set<String> attribute,
-        @RequestParam(required=false) Set<String> filter,
+        @RequestParam( required = false ) String query,
+        @RequestParam( required = false ) Set<String> attribute,
+        @RequestParam( required = false ) Set<String> filter,
         @RequestParam String ou,
-        @RequestParam(required=false) OrganisationUnitSelectionMode ouMode,
-        @RequestParam(required=false) String program,
-        @RequestParam(required=false) ProgramStatus programStatus,
-        @RequestParam(required=false) Boolean followUp,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programStartDate,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programEndDate,
-        @RequestParam(required=false) String trackedEntity,
-        @RequestParam(required=false) EventStatus eventStatus,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventStartDate,
-        @RequestParam(required=false) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventEndDate,
-        @RequestParam(required=false) boolean skipMeta,
-        @RequestParam(required=false) Integer page,
-        @RequestParam(required=false) Integer pageSize,
+        @RequestParam( required = false ) OrganisationUnitSelectionMode ouMode,
+        @RequestParam( required = false ) String program,
+        @RequestParam( required = false ) ProgramStatus programStatus,
+        @RequestParam( required = false ) Boolean followUp,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programStartDate,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date programEndDate,
+        @RequestParam( required = false ) String trackedEntity,
+        @RequestParam( required = false ) EventStatus eventStatus,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventStartDate,
+        @RequestParam( required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date eventEndDate,
+        @RequestParam( required = false ) boolean skipMeta,
+        @RequestParam( required = false ) Integer page,
+        @RequestParam( required = false ) Integer pageSize,
         Model model,
         HttpServletResponse response ) throws Exception
     {
-        Set<String> orgUnits = new HashSet<String>( ContextUtils.getQueryParamValues( ou ) );        
-        TrackedEntityInstanceQueryParams params = instanceService.getFromUrl( query, attribute, filter, orgUnits, ouMode, 
-            program, programStatus, followUp, programStartDate, programEndDate, trackedEntity, 
+        Set<String> orgUnits = new HashSet<String>( ContextUtils.getQueryParamValues( ou ) );
+        TrackedEntityInstanceQueryParams params = instanceService.getFromUrl( query, attribute, filter, orgUnits, ouMode,
+            program, programStatus, followUp, programStartDate, programEndDate, trackedEntity,
             eventStatus, eventStartDate, eventEndDate, skipMeta, page, pageSize );
-        
+
         contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_CSV, CacheStrategy.NO_CACHE );
         Grid grid = instanceService.getTrackedEntityInstances( params );
         GridUtils.toCsv( grid, response.getOutputStream() );
     }
-    
+
     @RequestMapping( value = "/{id}", method = RequestMethod.GET )
     @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_INSTANCE_SEARCH')" )
     public String getTrackedEntityInstance( @PathVariable String id, @RequestParam Map<String, String> parameters, Model model )
@@ -354,14 +352,14 @@
     {
         return ContextUtils.getContextPath( request ) + "/api/" + "trackedEntityInstances" + "/" + importSummary.getReference();
     }
-    
+
     // -------------------------------------------------------------------------
     // Exception handling
     // -------------------------------------------------------------------------
-  
-    @ExceptionHandler(IllegalQueryException.class)
+
+    @ExceptionHandler( IllegalQueryException.class )
     public void handleError( IllegalQueryException ex, HttpServletResponse response )
     {
         ContextUtils.conflictResponse( response, ex.getMessage() );
     }
-}
\ No newline at end of file
+}

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/indicator/IndicatorController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/indicator/IndicatorController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/indicator/IndicatorController.java	2014-05-27 13:18:27 +0000
@@ -28,8 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.indicator.Indicator;
+import org.hisp.dhis.schema.descriptors.IndicatorSchemaDescriptor;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.indicator.Indicator;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -37,9 +38,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = IndicatorController.RESOURCE_PATH )
+@RequestMapping( value = IndicatorSchemaDescriptor.API_ENDPOINT )
 public class IndicatorController
     extends AbstractCrudController<Indicator>
 {
-    public static final String RESOURCE_PATH = "/indicators";
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/indicator/IndicatorTypeController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/indicator/IndicatorTypeController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/indicator/IndicatorTypeController.java	2014-05-27 13:18:27 +0000
@@ -28,8 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.indicator.IndicatorType;
+import org.hisp.dhis.schema.descriptors.IndicatorTypeSchemaDescriptor;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.indicator.IndicatorType;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -37,9 +38,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = IndicatorTypeController.RESOURCE_PATH )
+@RequestMapping( value = IndicatorTypeSchemaDescriptor.API_ENDPOINT )
 public class IndicatorTypeController
     extends AbstractCrudController<IndicatorType>
 {
-    public static final String RESOURCE_PATH = "/indicatorTypes";
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapController.java	2014-05-27 13:18:27 +0000
@@ -28,20 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.webapi.utils.ContextUtils.DATE_PATTERN;
-
-import java.awt.image.BufferedImage;
-import java.io.InputStream;
-import java.util.Date;
-import java.util.Iterator;
-
-import javax.imageio.ImageIO;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.webapi.utils.ContextUtils;
-import org.hisp.dhis.webapi.utils.ContextUtils.CacheStrategy;
 import org.hisp.dhis.common.DimensionService;
 import org.hisp.dhis.dataelement.DataElementOperandService;
 import org.hisp.dhis.dataelement.DataElementService;
@@ -58,8 +44,12 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
+import org.hisp.dhis.schema.descriptors.MapSchemaDescriptor;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.UserService;
+import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.utils.ContextUtils;
+import org.hisp.dhis.webapi.utils.ContextUtils.CacheStrategy;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.http.HttpStatus;
@@ -70,17 +60,25 @@
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseStatus;
 
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.io.InputStream;
+import java.util.Date;
+import java.util.Iterator;
+
+import static org.hisp.dhis.webapi.utils.ContextUtils.DATE_PATTERN;
+
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  * @author Lars Helge Overland
  */
 @Controller
-@RequestMapping( value = MapController.RESOURCE_PATH )
+@RequestMapping( value = MapSchemaDescriptor.API_ENDPOINT )
 public class MapController
     extends AbstractCrudController<Map>
 {
-    public static final String RESOURCE_PATH = "/maps";
-
     @Autowired
     private MappingService mappingService;
 
@@ -98,7 +96,7 @@
 
     @Autowired
     private DataElementOperandService operandService;
-    
+
     @Autowired
     private PeriodService periodService;
 
@@ -110,12 +108,12 @@
 
     @Autowired
     private MapGenerationService mapGenerationService;
-    
+
     @Autowired
     private DimensionService dimensionService;
-    
+
     @Autowired
-    private UserService userService; 
+    private UserService userService;
 
     @Autowired
     private ContextUtils contextUtils;
@@ -141,7 +139,7 @@
 
         mappingService.addMap( map );
 
-        ContextUtils.createdResponse( response, "Map created", RESOURCE_PATH + "/" + map.getUid() );
+        ContextUtils.createdResponse( response, "Map created", MapSchemaDescriptor.API_ENDPOINT + "/" + map.getUid() );
     }
 
     @Override
@@ -207,12 +205,12 @@
     // Get data
     //--------------------------------------------------------------------------
 
-    @RequestMapping(value = { "/{uid}/data", "/{uid}/data.png" }, method = RequestMethod.GET)
-    public void getMapData( @PathVariable String uid, 
+    @RequestMapping( value = { "/{uid}/data", "/{uid}/data.png" }, method = RequestMethod.GET )
+    public void getMapData( @PathVariable String uid,
         @RequestParam( value = "date", required = false ) @DateTimeFormat( pattern = DATE_PATTERN ) Date date,
         @RequestParam( value = "ou", required = false ) String ou,
-        @RequestParam( required = false ) Integer width, 
-        @RequestParam( required = false ) Integer height, 
+        @RequestParam( required = false ) Integer width,
+        @RequestParam( required = false ) Integer height,
         HttpServletResponse response ) throws Exception
     {
         Map map = mappingService.getMapNoAcl( uid );
@@ -224,7 +222,7 @@
         }
 
         OrganisationUnit unit = ou != null ? organisationUnitService.getOrganisationUnit( ou ) : null;
-        
+
         renderMapViewPng( map, date, unit, width, height, response );
     }
 
@@ -236,18 +234,18 @@
     public void postProcessEntity( Map map ) throws Exception
     {
         I18nFormat format = i18nManager.getI18nFormat();
-        
+
         for ( MapView view : map.getMapViews() )
         {
             view.populateAnalyticalProperties();
-            
+
             for ( OrganisationUnit organisationUnit : view.getOrganisationUnits() )
             {
                 view.getParentGraphMap().put( organisationUnit.getUid(), organisationUnit.getParentGraph() );
             }
-            
+
             if ( view.getPeriods() != null && !view.getPeriods().isEmpty() )
-            {   
+            {
                 for ( Period period : view.getPeriods() )
                 {
                     period.setName( format.formatPeriod( period ) );
@@ -275,7 +273,7 @@
     private void mergeMapView( MapView view )
     {
         dimensionService.mergeAnalyticalObject( view );
-        
+
         if ( view.getLegendSet() != null )
         {
             view.setLegendSet( mappingService.getMapLegendSet( view.getLegendSet().getUid() ) );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLayerController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLayerController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLayerController.java	2014-05-27 13:18:27 +0000
@@ -28,8 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.mapping.MapLayer;
+import org.hisp.dhis.schema.descriptors.MapLayerSchemaDescriptor;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.mapping.MapLayer;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -37,9 +38,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = MapLayerController.RESOURCE_PATH )
+@RequestMapping( value = MapLayerSchemaDescriptor.API_ENDPOINT )
 public class MapLayerController
     extends AbstractCrudController<MapLayer>
 {
-    public static final String RESOURCE_PATH = "/mapLayers";
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLegendController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLegendController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLegendController.java	2014-05-27 13:18:27 +0000
@@ -28,8 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.mapping.MapLegend;
+import org.hisp.dhis.schema.descriptors.MapLegendSchemaDescriptor;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.mapping.MapLegend;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -37,9 +38,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = MapLegendController.RESOURCE_PATH )
+@RequestMapping( value = MapLegendSchemaDescriptor.API_ENDPOINT )
 public class MapLegendController
     extends AbstractCrudController<MapLegend>
 {
-    public static final String RESOURCE_PATH = "/mapLegends";
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLegendSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLegendSetController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapLegendSetController.java	2014-05-27 13:18:27 +0000
@@ -28,18 +28,13 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.InputStream;
-import java.util.Iterator;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.hisp.dhis.dxf2.utils.JacksonUtils;
 import org.hisp.dhis.mapping.MapLegend;
 import org.hisp.dhis.mapping.MapLegendSet;
 import org.hisp.dhis.mapping.MappingService;
+import org.hisp.dhis.schema.descriptors.MapLegendSetSchemaDescriptor;
+import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -49,34 +44,37 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseStatus;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.InputStream;
+import java.util.Iterator;
+
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = MapLegendSetController.RESOURCE_PATH )
+@RequestMapping( value = MapLegendSetSchemaDescriptor.API_ENDPOINT )
 public class MapLegendSetController
     extends AbstractCrudController<MapLegendSet>
 {
-    public static final String RESOURCE_PATH = "/mapLegendSets";
-
     @Autowired
     private MappingService mappingService;
-    
+
     @Override
     @RequestMapping( method = RequestMethod.POST, consumes = "application/json" )
     @PreAuthorize( "hasRole('F_GIS_ADMIN') or hasRole('ALL')" )
     public void postJsonObject( HttpServletResponse response, HttpServletRequest request, InputStream input ) throws Exception
     {
         MapLegendSet legendSet = JacksonUtils.fromJson( input, MapLegendSet.class );
-        
+
         for ( MapLegend legend : legendSet.getMapLegends() )
         {
             mappingService.addMapLegend( legend );
         }
-        
+
         mappingService.addMapLegendSet( legendSet );
-        
-        ContextUtils.createdResponse( response, "Map legend set created", RESOURCE_PATH + "/" + legendSet.getUid() );
+
+        ContextUtils.createdResponse( response, "Map legend set created", MapLegendSetSchemaDescriptor.API_ENDPOINT + "/" + legendSet.getUid() );
     }
 
     @RequestMapping( value = "/{uid}", method = RequestMethod.PUT, consumes = "application/json" )
@@ -85,7 +83,7 @@
     public void putJsonObject( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid, InputStream input ) throws Exception
     {
         MapLegendSet legendSet = mappingService.getMapLegendSet( uid );
-        
+
         if ( legendSet == null )
         {
             ContextUtils.notFoundResponse( response, "Map legend set does not exist: " + uid );
@@ -96,20 +94,20 @@
 
         while ( legends.hasNext() )
         {
-            MapLegend legend = legends.next();            
-            legends.remove();            
+            MapLegend legend = legends.next();
+            legends.remove();
             mappingService.deleteMapLegend( legend );
         }
 
         MapLegendSet newLegendSet = JacksonUtils.fromJson( input, MapLegendSet.class );
-        
+
         for ( MapLegend legend : newLegendSet.getMapLegends() )
         {
             mappingService.addMapLegend( legend );
         }
-        
+
         legendSet.mergeWith( newLegendSet );
-        
+
         mappingService.updateMapLegendSet( legendSet );
     }
 
@@ -119,7 +117,7 @@
     public void deleteObject( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid ) throws Exception
     {
         MapLegendSet legendSet = mappingService.getMapLegendSet( uid );
-        
+
         if ( legendSet == null )
         {
             ContextUtils.notFoundResponse( response, "Map legend set does not exist: " + uid );
@@ -130,11 +128,11 @@
 
         while ( legends.hasNext() )
         {
-            MapLegend legend = legends.next();            
-            legends.remove();            
+            MapLegend legend = legends.next();
+            legends.remove();
             mappingService.deleteMapLegend( legend );
         }
-        
+
         mappingService.deleteMapLegendSet( legendSet );
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapViewController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapViewController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/mapping/MapViewController.java	2014-05-27 13:18:27 +0000
@@ -28,23 +28,18 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.awt.image.BufferedImage;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.imageio.ImageIO;
-import javax.servlet.http.HttpServletResponse;
-
+import com.google.common.collect.Lists;
+import org.hisp.dhis.mapgeneration.MapGenerationService;
+import org.hisp.dhis.mapping.MapView;
+import org.hisp.dhis.mapping.MappingService;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.schema.descriptors.MapViewSchemaDescriptor;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
 import org.hisp.dhis.webapi.controller.WebMetaData;
 import org.hisp.dhis.webapi.controller.WebOptions;
 import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.hisp.dhis.webapi.utils.ContextUtils.CacheStrategy;
-import org.hisp.dhis.mapgeneration.MapGenerationService;
-import org.hisp.dhis.mapping.MapView;
-import org.hisp.dhis.mapping.MappingService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -53,18 +48,20 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 
-import com.google.common.collect.Lists;
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * @author Lars Helge Overland
  */
 @Controller
-@RequestMapping(value = MapViewController.RESOURCE_PATH)
+@RequestMapping( value = MapViewSchemaDescriptor.API_ENDPOINT )
 public class MapViewController
     extends AbstractCrudController<MapView>
 {
-    public static final String RESOURCE_PATH = "/mapViews";
-
     @Autowired
     private MappingService mappingService;
 
@@ -81,7 +78,7 @@
     // Get data
     //--------------------------------------------------------------------------
 
-    @RequestMapping(value = { "/{uid}/data", "/{uid}/data.png" }, method = RequestMethod.GET)
+    @RequestMapping( value = { "/{uid}/data", "/{uid}/data.png" }, method = RequestMethod.GET )
     public void getMapViewData( @PathVariable String uid, HttpServletResponse response ) throws Exception
     {
         MapView mapView = mappingService.getMapView( uid );
@@ -95,11 +92,11 @@
         renderMapViewPng( mapView, response );
     }
 
-    @RequestMapping(value = { "/data", "/data.png" }, method = RequestMethod.GET)
+    @RequestMapping( value = { "/data", "/data.png" }, method = RequestMethod.GET )
     public void getMapView( Model model,
-        @RequestParam(value = "in") String indicatorUid,
-        @RequestParam(value = "ou") String organisationUnitUid,
-        @RequestParam(value = "level", required = false) Integer level,
+        @RequestParam( value = "in" ) String indicatorUid,
+        @RequestParam( value = "ou" ) String organisationUnitUid,
+        @RequestParam( value = "level", required = false ) Integer level,
         HttpServletResponse response ) throws Exception
     {
         if ( level == null )

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java	2014-05-27 13:18:27 +0000
@@ -28,26 +28,19 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.webapi.controller.WebMetaData;
-import org.hisp.dhis.webapi.controller.WebOptions;
-import org.hisp.dhis.webapi.controller.exception.NotFoundException;
-import org.hisp.dhis.webapi.utils.WebUtils;
 import org.hisp.dhis.common.Pager;
 import org.hisp.dhis.dxf2.metadata.MetaData;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.organisationunit.comparator.OrganisationUnitByLevelComparator;
+import org.hisp.dhis.schema.descriptors.OrganisationUnitSchemaDescriptor;
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
+import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.controller.WebMetaData;
+import org.hisp.dhis.webapi.controller.WebOptions;
+import org.hisp.dhis.webapi.controller.exception.NotFoundException;
+import org.hisp.dhis.webapi.utils.WebUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -57,16 +50,21 @@
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping(value = OrganisationUnitController.RESOURCE_PATH)
+@RequestMapping( value = OrganisationUnitSchemaDescriptor.API_ENDPOINT )
 public class OrganisationUnitController
     extends AbstractCrudController<OrganisationUnit>
 {
-    public static final String RESOURCE_PATH = "/organisationUnits";
-
     @Autowired
     private OrganisationUnitService organisationUnitService;
 
@@ -175,8 +173,8 @@
     }
 
     @Override
-    @RequestMapping(value = "/{uid}", method = RequestMethod.GET)
-    public String getObject( @PathVariable("uid") String uid, @RequestParam Map<String, String> parameters,
+    @RequestMapping( value = "/{uid}", method = RequestMethod.GET )
+    public String getObject( @PathVariable( "uid" ) String uid, @RequestParam Map<String, String> parameters,
         Model model, HttpServletRequest request, HttpServletResponse response ) throws Exception
     {
         WebOptions options = new WebOptions( parameters );

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitGroupController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitGroupController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitGroupController.java	2014-05-27 13:18:27 +0000
@@ -28,19 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.webapi.controller.WebMetaData;
-import org.hisp.dhis.webapi.controller.WebOptions;
-import org.hisp.dhis.webapi.utils.ContextUtils;
-import org.hisp.dhis.webapi.utils.WebUtils;
 import org.hisp.dhis.common.Pager;
 import org.hisp.dhis.common.PagerUtils;
 import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
@@ -48,6 +35,12 @@
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.schema.descriptors.OrganisationUnitGroupSchemaDescriptor;
+import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.controller.WebMetaData;
+import org.hisp.dhis.webapi.controller.WebOptions;
+import org.hisp.dhis.webapi.utils.ContextUtils;
+import org.hisp.dhis.webapi.utils.WebUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -60,16 +53,21 @@
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseStatus;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping(value = OrganisationUnitGroupController.RESOURCE_PATH)
+@RequestMapping( value = OrganisationUnitGroupSchemaDescriptor.API_ENDPOINT )
 public class OrganisationUnitGroupController
     extends AbstractCrudController<OrganisationUnitGroup>
 {
-    public static final String RESOURCE_PATH = "/organisationUnitGroups";
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -121,8 +119,8 @@
         return StringUtils.uncapitalize( getEntitySimpleName() );
     }
 
-    @RequestMapping(value = "/{uid}/members/query/{q}", method = RequestMethod.GET)
-    public String getMembersByQuery( @PathVariable("uid") String uid, @PathVariable( "q" ) String q,
+    @RequestMapping( value = "/{uid}/members/query/{q}", method = RequestMethod.GET )
+    public String getMembersByQuery( @PathVariable( "uid" ) String uid, @PathVariable( "q" ) String q,
         @RequestParam Map<String, String> parameters, Model model, HttpServletRequest request,
         HttpServletResponse response ) throws Exception
     {

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitGroupSetController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitGroupSetController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitGroupSetController.java	2014-05-27 13:18:27 +0000
@@ -28,8 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
+import org.hisp.dhis.schema.descriptors.OrganisationUnitGroupSetSchemaDescriptor;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -37,9 +38,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = OrganisationUnitGroupSetController.RESOURCE_PATH )
+@RequestMapping( value = OrganisationUnitGroupSetSchemaDescriptor.API_ENDPOINT )
 public class OrganisationUnitGroupSetController
     extends AbstractCrudController<OrganisationUnitGroupSet>
 {
-    public static final String RESOURCE_PATH = "/organisationUnitGroupSets";
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitLevelController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitLevelController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitLevelController.java	2014-05-27 13:18:27 +0000
@@ -28,8 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
+import org.hisp.dhis.schema.descriptors.OrganisationUnitLevelSchemaDescriptor;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -37,9 +38,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = OrganisationUnitLevelController.RESOURCE_PATH )
+@RequestMapping( value = OrganisationUnitLevelSchemaDescriptor.API_ENDPOINT )
 public class OrganisationUnitLevelController
     extends AbstractCrudController<OrganisationUnitLevel>
 {
-    public static final String RESOURCE_PATH = "/organisationUnitLevels";
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2014-05-27 02:41:16 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2014-05-27 13:18:27 +0000
@@ -30,15 +30,12 @@
 
 import com.google.common.collect.Lists;
 import org.apache.struts2.ServletActionContext;
-import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.webapi.controller.WebMetaData;
-import org.hisp.dhis.webapi.controller.WebOptions;
-import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.hisp.dhis.common.Pager;
 import org.hisp.dhis.dxf2.metadata.ImportTypeSummary;
 import org.hisp.dhis.hibernate.exception.CreateAccessDeniedException;
 import org.hisp.dhis.hibernate.exception.UpdateAccessDeniedException;
 import org.hisp.dhis.importexport.ImportStrategy;
+import org.hisp.dhis.schema.descriptors.UserSchemaDescriptor;
 import org.hisp.dhis.security.PasswordManager;
 import org.hisp.dhis.security.RestoreOptions;
 import org.hisp.dhis.security.SecurityService;
@@ -47,6 +44,10 @@
 import org.hisp.dhis.user.UserGroup;
 import org.hisp.dhis.user.UserGroupService;
 import org.hisp.dhis.user.UserService;
+import org.hisp.dhis.webapi.controller.AbstractCrudController;
+import org.hisp.dhis.webapi.controller.WebMetaData;
+import org.hisp.dhis.webapi.controller.WebOptions;
+import org.hisp.dhis.webapi.utils.ContextUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -71,11 +72,10 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = UserController.RESOURCE_PATH )
+@RequestMapping( value = UserSchemaDescriptor.API_ENDPOINT )
 public class UserController
     extends AbstractCrudController<User>
 {
-    public static final String RESOURCE_PATH = "/users";
     public static final String INVITE_PATH = "/invite";
 
     @Autowired
@@ -202,7 +202,7 @@
 
         User parsed = renderService.fromXml( request.getInputStream(), getEntityClass() );
         parsed.setUid( uid );
-        if (parsed.getUserCredentials().getPassword() != null)
+        if ( parsed.getUserCredentials().getPassword() != null )
         {
             String encodePassword = passwordManager.encodePassword( parsed.getUsername(),
                 parsed.getUserCredentials().getPassword() );
@@ -234,7 +234,7 @@
         User parsed = renderService.fromJson( request.getInputStream(), getEntityClass() );
         parsed.setUid( uid );
 
-        if (parsed.getUserCredentials().getPassword() != null)
+        if ( parsed.getUserCredentials().getPassword() != null )
         {
             String encodePassword = passwordManager.encodePassword( parsed.getUsername(),
                 parsed.getUserCredentials().getPassword() );
@@ -252,7 +252,7 @@
     /**
      * Creates a user invitation and invites the user
      *
-     * @param user user object parsed from the POST request
+     * @param user     user object parsed from the POST request
      * @param response response for created user invitation
      * @throws Exception
      */
@@ -272,7 +272,7 @@
     /**
      * Creates a user
      *
-     * @param user user object parsed from the POST request
+     * @param user     user object parsed from the POST request
      * @param response response for created user
      * @throws Exception
      */
@@ -362,7 +362,7 @@
             {
                 UserGroup group = userGroupService.getUserGroup( ug.getUid() );
 
-                if ( group != null && ( !writeGroupRequired || securityService.canWrite( group ) ) )
+                if ( group != null && (!writeGroupRequired || securityService.canWrite( group )) )
                 {
                     group.addUser( user );
 

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserGroupController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserGroupController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserGroupController.java	2014-05-27 13:18:27 +0000
@@ -28,8 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.schema.descriptors.UserGroupSchemaDescriptor;
+import org.hisp.dhis.user.UserGroup;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.user.UserGroup;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -37,9 +38,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = UserGroupController.RESOURCE_PATH )
+@RequestMapping( value = UserGroupSchemaDescriptor.API_ENDPOINT )
 public class UserGroupController
     extends AbstractCrudController<UserGroup>
 {
-    public static final String RESOURCE_PATH = "/userGroups";
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserRoleController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserRoleController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserRoleController.java	2014-05-27 13:18:27 +0000
@@ -28,11 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.schema.descriptors.UserRoleSchemaDescriptor;
+import org.hisp.dhis.user.UserAuthorityGroup;
+import org.hisp.dhis.user.UserService;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
 import org.hisp.dhis.webapi.controller.WebMetaData;
 import org.hisp.dhis.webapi.controller.WebOptions;
-import org.hisp.dhis.user.UserAuthorityGroup;
-import org.hisp.dhis.user.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -43,12 +44,10 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = UserRoleController.RESOURCE_PATH )
+@RequestMapping( value = UserRoleSchemaDescriptor.API_ENDPOINT )
 public class UserRoleController
     extends AbstractCrudController<UserAuthorityGroup>
 {
-    public static final String RESOURCE_PATH = "/userRoles";
-
     @Autowired
     private UserService userService;
 

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/validation/ValidationRuleController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/validation/ValidationRuleController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/validation/ValidationRuleController.java	2014-05-27 13:18:27 +0000
@@ -28,8 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.schema.descriptors.ValidationRuleSchemaDescriptor;
+import org.hisp.dhis.validation.ValidationRule;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.validation.ValidationRule;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -37,9 +38,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = ValidationRuleController.RESOURCE_PATH )
+@RequestMapping( value = ValidationRuleSchemaDescriptor.API_ENDPOINT )
 public class ValidationRuleController
     extends AbstractCrudController<ValidationRule>
 {
-    public static final String RESOURCE_PATH = "/validationRules";
 }

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/validation/ValidationRuleGroupController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/validation/ValidationRuleGroupController.java	2014-05-22 12:40:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/validation/ValidationRuleGroupController.java	2014-05-27 13:18:27 +0000
@@ -28,8 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.schema.descriptors.ValidationRuleGroupSchemaDescriptor;
+import org.hisp.dhis.validation.ValidationRuleGroup;
 import org.hisp.dhis.webapi.controller.AbstractCrudController;
-import org.hisp.dhis.validation.ValidationRuleGroup;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -37,9 +38,8 @@
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
 @Controller
-@RequestMapping( value = ValidationRuleGroupController.RESOURCE_PATH )
+@RequestMapping( value = ValidationRuleGroupSchemaDescriptor.API_ENDPOINT )
 public class ValidationRuleGroupController
     extends AbstractCrudController<ValidationRuleGroup>
 {
-    public static final String RESOURCE_PATH = "/validationRuleGroups";
 }