=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/IdentifiableObjectController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/IdentifiableObjectController.java 2014-06-11 19:54:06 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/IdentifiableObjectController.java 2014-06-12 14:32:29 +0000 @@ -32,15 +32,20 @@ import com.google.common.collect.Lists; import org.hisp.dhis.common.IdentifiableObject; import org.springframework.stereotype.Controller; +import org.springframework.web.HttpRequestMethodNotSupportedException; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.InputStream; import java.util.List; /** * @author Lars Helge Overland */ @Controller -@RequestMapping( value = IdentifiableObjectController.RESOURCE_PATH ) +@RequestMapping(value = IdentifiableObjectController.RESOURCE_PATH) public class IdentifiableObjectController extends AbstractCrudController { @@ -59,4 +64,28 @@ return identifiableObjects; } + + @Override + public void postXmlObject( HttpServletResponse response, HttpServletRequest request, InputStream input ) throws Exception + { + throw new HttpRequestMethodNotSupportedException( "POST" ); + } + + @Override + public void postJsonObject( HttpServletResponse response, HttpServletRequest request, InputStream input ) throws Exception + { + throw new HttpRequestMethodNotSupportedException( "POST" ); + } + + @Override + public void putJsonObject( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid, InputStream input ) throws Exception + { + throw new HttpRequestMethodNotSupportedException( "PUT" ); + } + + @Override + public void deleteObject( HttpServletResponse response, HttpServletRequest request, @PathVariable( "uid" ) String uid ) throws Exception + { + throw new HttpRequestMethodNotSupportedException( "PUT" ); + } }