dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16518
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6298: Included link to dataValueSets from resources in web api
------------------------------------------------------------
revno: 6298
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-03-19 13:29:48 +0100
message:
Included link to dataValueSets from resources in web api
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.java 2012-01-05 21:51:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/webdomain/Resources.java 2012-03-19 12:29:48 +0000
@@ -105,17 +105,18 @@
private void generateResources()
{
- RequestMethod[] defaultRequestMethods = new RequestMethod[]{
+ RequestMethod[] defaultRequestMethods = new RequestMethod[] {
RequestMethod.GET /* , RequestMethod.POST, RequestMethod.PUT, RequestMethod.DELETE */
};
- MediaType[] defaultMediaTypes = new MediaType[]{
+ MediaType[] defaultMediaTypes = new MediaType[] {
MediaType.TEXT_HTML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON,
new MediaType( "application", "javascript" ) /* , new MediaType( "application", "pdf" ) */
};
List<RequestMethod> requestMethods = Arrays.asList( defaultRequestMethods );
List<MediaType> mediaTypes = Arrays.asList( defaultMediaTypes );
+ List<MediaType> htmlMediaType = Arrays.asList( MediaType.TEXT_HTML );
resources.add( new Resource( "AttributeTypes", Attributes.class, requestMethods, mediaTypes ) );
resources.add( new Resource( "Categories", DataElementCategories.class, requestMethods, mediaTypes ) );
@@ -128,6 +129,7 @@
resources.add( new Resource( "DataElementGroups", DataElementGroups.class, requestMethods, mediaTypes ) );
resources.add( new Resource( "DataElementGroupSets", DataElementGroupSets.class, requestMethods, mediaTypes ) );
resources.add( new Resource( "DataSets", DataSets.class, requestMethods, mediaTypes ) );
+ resources.add( new Resource( "DataValueSets", DataValueSets.class, requestMethods, htmlMediaType ) );
resources.add( new Resource( "Documents", Documents.class, requestMethods, mediaTypes ) );
resources.add( new Resource( "Indicators", Indicators.class, requestMethods, mediaTypes ) );
resources.add( new Resource( "IndicatorGroups", IndicatorGroups.class, requestMethods, mediaTypes ) );