You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wink.apache.org by el...@apache.org on 2009/10/04 14:26:46 UTC
svn commit: r821528 - in
/incubator/wink/trunk/wink-examples/core/CustomContext: build.xml
src/main/java/org/apache/wink/example/customcontext/UsersResource.java
Author: elman
Date: Sun Oct 4 12:26:46 2009
New Revision: 821528
URL: http://svn.apache.org/viewvc?rev=821528&view=rev
Log:
Remove json related code.
Modified:
incubator/wink/trunk/wink-examples/core/CustomContext/build.xml
incubator/wink/trunk/wink-examples/core/CustomContext/src/main/java/org/apache/wink/example/customcontext/UsersResource.java
Modified: incubator/wink/trunk/wink-examples/core/CustomContext/build.xml
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-examples/core/CustomContext/build.xml?rev=821528&r1=821527&r2=821528&view=diff
==============================================================================
--- incubator/wink/trunk/wink-examples/core/CustomContext/build.xml (original)
+++ incubator/wink/trunk/wink-examples/core/CustomContext/build.xml Sun Oct 4 12:26:46 2009
@@ -40,8 +40,6 @@
<target name="init">
- <!-- Create the time stamp -->
- <tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build.classes}" />
</target>
@@ -67,7 +65,7 @@
<war destfile="${final.war}" webxml="${webapp}/WEB-INF/web.xml">
<webinf dir="${webapp}/WEB-INF" includes="**/*" />
<classes dir="${build.classes}" includes="**/*" />
- <lib dir="${sdk.lib}" includes="*.jar" excludes="spring*.jar"/>
+ <lib dir="${sdk.lib}" includes="*.jar" />
<lib file="${sdk.jar}" />
</war>
</target>
Modified: incubator/wink/trunk/wink-examples/core/CustomContext/src/main/java/org/apache/wink/example/customcontext/UsersResource.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-examples/core/CustomContext/src/main/java/org/apache/wink/example/customcontext/UsersResource.java?rev=821528&r1=821527&r2=821528&view=diff
==============================================================================
--- incubator/wink/trunk/wink-examples/core/CustomContext/src/main/java/org/apache/wink/example/customcontext/UsersResource.java (original)
+++ incubator/wink/trunk/wink-examples/core/CustomContext/src/main/java/org/apache/wink/example/customcontext/UsersResource.java Sun Oct 4 12:26:46 2009
@@ -82,7 +82,7 @@
};
/**
- * Create a new user by receiving it as xml, and returning it as xml or json
+ * Create a new user by receiving it as xml, and returning it as xml
* Only authorized customers can create new user resource. In case customer
* is unauthorized, new WebApplicationException is thrown.
*
@@ -90,7 +90,7 @@
*/
@POST
@Consumes( {MediaType.APPLICATION_XML})
- @Produces( {MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+ @Produces( {MediaType.APPLICATION_XML})
public User putUser(User user, @Context CustomerPermission customerPermission) {
if (!customerPermission.isWriteAllowed()) {
@@ -109,18 +109,18 @@
}
/**
- * Get a list of all the existing users as xml or as json
+ * Get a list of all the existing users as xml
*
* @return an instance of Users
*/
@GET
- @Produces( {MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+ @Produces( {MediaType.APPLICATION_XML})
public Users getUsers() {
return new Users(users.values());
}
/**
- * Get a user as xml or json
+ * Get a user as xml
*
* @param id the id of the user to get
* @return the user as specified by the id
@@ -130,7 +130,7 @@
*/
@Path("{id}")
@GET
- @Produces( {MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+ @Produces( {MediaType.APPLICATION_XML})
public User getUser(@PathParam("id") int id) {
User u = users.get(id);
if (u == null) {