=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/AbstractNode.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/AbstractNode.java 2014-05-31 23:48:24 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/AbstractNode.java 2014-06-01 14:30:40 +0000 @@ -80,6 +80,12 @@ } @Override + public NodeHint addHint( NodeHint.Type type, Object value ) + { + return addHint( new NodeHint( type, value ) ); + } + + @Override public NodeHint addHint( NodeHint nodeHint ) { nodeHints.put( nodeHint.getType(), nodeHint ); === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/Node.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/Node.java 2014-05-31 23:48:24 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/Node.java 2014-06-01 14:30:40 +0000 @@ -45,6 +45,8 @@ List getNodes(); + NodeHint addHint( NodeHint.Type type, Object value ); + NodeHint addHint( NodeHint nodeHint ); NodeHint getHint( NodeHint.Type type ); === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.java 2014-06-01 13:52:28 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemController.java 2014-06-01 14:30:40 +0000 @@ -46,6 +46,7 @@ import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.webapi.utils.ContextUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; @@ -85,7 +86,7 @@ // UID Generator //-------------------------------------------------------------------------- - @RequestMapping( value = { "/uid", "/id" }, method = RequestMethod.GET ) + @RequestMapping( value = { "/uid", "/id" }, method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE } ) public @ResponseBody RootNode getUid( @RequestParam( required = false, defaultValue = "1" ) Integer n, HttpServletResponse response ) throws IOException, InvalidTypeException { @@ -96,7 +97,7 @@ RootNode rootNode = new RootNode( "codes" ); CollectionNode collectionNode = rootNode.addNode( new CollectionNode( "codes" ) ); - collectionNode.addHint( new NodeHint( NodeHint.Type.XML_COLLECTION_WRAPPING, false ) ); + collectionNode.addHint( NodeHint.Type.XML_COLLECTION_WRAPPING, false ); for ( int i = 0; i < n; i++ ) {