Permalink
Browse files

Repackaged everything to correspond to new RestExpress project name. …

…Updated release to 0.5 version.
  • Loading branch information...
tfredrich committed Oct 6, 2010
1 parent f3de860 commit a1074897ce27d19b650e120db11d2aa78bfe7402
Showing with 154 additions and 152 deletions.
  1. +1 −1 .project
  2. +1 −1 NOTICE
  3. +8 −1 README
  4. +1 −1 build.properties
  5. +2 −2 build.xml
  6. +2 −2 examples/kickstart/README
  7. +16 −16 examples/kickstart/src/java/com/strategicgains/kickstart/RestServer.java
  8. +1 −1 examples/kickstart/src/java/com/strategicgains/kickstart/Routes.java
  9. +2 −2 examples/kickstart/src/java/com/strategicgains/kickstart/service/KickStartService.java
  10. +7 −7 src/java/com/strategicgains/{restx → restexpress}/Request.java
  11. +1 −1 src/java/com/strategicgains/{restx → restexpress}/Response.java
  12. +3 −3 src/java/com/strategicgains/{restx/RestX.java → restexpress/RestExpress.java}
  13. +1 −1 src/java/com/strategicgains/{restx → restexpress}/domain/Link.java
  14. +1 −1 src/java/com/strategicgains/{restx → restexpress}/exception/BadRequestException.java
  15. +1 −1 src/java/com/strategicgains/{restx → restexpress}/exception/ConfigurationException.java
  16. +1 −3 src/java/com/strategicgains/{restx → restexpress}/exception/ConflictException.java
  17. +1 −1 src/java/com/strategicgains/{restx → restexpress}/exception/CouldNotDeleteException.java
  18. +1 −1 src/java/com/strategicgains/{restx → restexpress}/exception/CouldNotReadException.java
  19. +1 −1 src/java/com/strategicgains/{restx → restexpress}/exception/CouldNotUpdateException.java
  20. +1 −3 src/java/com/strategicgains/{restx → restexpress}/exception/ForbiddenException.java
  21. +1 −3 src/java/com/strategicgains/{restx → restexpress}/exception/NotFoundException.java
  22. +1 −1 src/java/com/strategicgains/{restx → restexpress}/exception/ServiceException.java
  23. +1 −3 src/java/com/strategicgains/{restx → restexpress}/exception/UnauthorizedException.java
  24. +1 −1 src/java/com/strategicgains/{restx → restexpress}/exception/ValidationException.java
  25. +11 −11 src/java/com/strategicgains/{restx → restexpress}/pipeline/DefaultRequestHandler.java
  26. +1 −1 src/java/com/strategicgains/{restx → restexpress}/pipeline/PipelineBuilder.java
  27. +3 −3 src/java/com/strategicgains/{restx → restexpress}/pipeline/Postprocessor.java
  28. +4 −3 src/java/com/strategicgains/{restx → restexpress}/pipeline/PostprocessorAware.java
  29. +3 −2 src/java/com/strategicgains/{restx → restexpress}/pipeline/Preprocessor.java
  30. +2 −2 src/java/com/strategicgains/{restx → restexpress}/pipeline/PreprocessorAware.java
  31. +5 −5 src/java/com/strategicgains/{restx → restexpress}/response/DefaultHttpResponseWriter.java
  32. +3 −3 src/java/com/strategicgains/{restx → restexpress}/response/ErrorHttpResponseWriter.java
  33. +3 −3 src/java/com/strategicgains/{restx → restexpress}/response/HttpResponseWriter.java
  34. +4 −4 src/java/com/strategicgains/{restx → restexpress}/route/Action.java
  35. +6 −6 src/java/com/strategicgains/{restx → restexpress}/route/Route.java
  36. +6 −6 src/java/com/strategicgains/{restx → restexpress}/route/RouteBuilder.java
  37. +1 −1 src/java/com/strategicgains/{restx → restexpress}/route/RouteMapping.java
  38. +5 −5 src/java/com/strategicgains/{restx → restexpress}/route/RouteResolver.java
  39. +9 −9 src/java/com/strategicgains/{restx → restexpress}/serialization/DefaultSerializationResolver.java
  40. +1 −1 src/java/com/strategicgains/{restx → restexpress}/serialization/DeserializationException.java
  41. +1 −1 src/java/com/strategicgains/{restx → restexpress}/serialization/Deserializer.java
  42. +1 −1 src/java/com/strategicgains/{restx → restexpress}/serialization/SerializationException.java
  43. +1 −1 src/java/com/strategicgains/{restx → restexpress}/serialization/SerializationProcessor.java
  44. +1 −1 src/java/com/strategicgains/{restx → restexpress}/serialization/Serializer.java
  45. +2 −2 src/java/com/strategicgains/{restx → restexpress}/serialization/json/DefaultJsonProcessor.java
  46. +1 −1 src/java/com/strategicgains/{restx → restexpress}/serialization/json/GsonDateSerializer.java
  47. +1 −1 src/java/com/strategicgains/{restx → restexpress}/serialization/json/GsonSerializer.java
  48. +1 −1 src/java/com/strategicgains/{restx → restexpress}/serialization/json/GsonTimestampSerializer.java
  49. +2 −2 src/java/com/strategicgains/{restx → restexpress}/serialization/text/DefaultTxtProcessor.java
  50. +2 −2 src/java/com/strategicgains/{restx → restexpress}/serialization/xml/DefaultXmlProcessor.java
  51. +2 −2 src/java/com/strategicgains/{restx → restexpress}/url/UrlMatch.java
  52. +1 −1 src/java/com/strategicgains/{restx → restexpress}/url/UrlPattern.java
  53. +1 −1 src/java/com/strategicgains/{restx → restexpress}/util/Bootstraps.java
  54. +1 −1 src/java/com/strategicgains/{restx → restexpress}/util/Identifiable.java
  55. +3 −3 src/java/com/strategicgains/{restx → restexpress}/util/LinkUtils.java
  56. +1 −1 src/java/com/strategicgains/{restx → restexpress}/util/MapStringFormat.java
  57. +3 −2 src/java/com/strategicgains/{restx → restexpress}/util/Resolver.java
  58. +1 −1 src/java/com/strategicgains/{restx → restexpress}/util/Validatable.java
  59. +3 −3 test/java/com/strategicgains/{restx → restexpress}/route/RouteMappingTest.java
  60. +1 −1 test/java/com/strategicgains/{restx → restexpress}/url/UrlPatternTest.java
View
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>RestX</name>
+ <name>RestExpress</name>
<comment></comment>
<projects>
</projects>
View
2 NOTICE
@@ -1,4 +1,4 @@
-The RestX Project
+The RestExpress Project
Copyright 2009, Strategic Gains, Inc.
This product includes software developed at
View
9 README
@@ -1,4 +1,4 @@
-RestX is a thin wrapper on the JBOSS Netty HTTP stack to provide a simple and easy way to create
+RestExpress is a thin wrapper on the JBOSS Netty HTTP stack to provide a simple and easy way to create
RESTful services in Java.
Born to be simple, only three things are required to wire up a service:
@@ -28,6 +28,13 @@ before returning to set the response HTTP status code to 204 (no content).
On successful creation, call response.setResponseCreated() to set the returning HTTP status code to 201.
Change History:
+===================================================================================================
+Release 0.5
+* Renamed repository from RestX to RestExpress.
+* Repackaged everything from com.strategicgains.restx... to com.strategicgains.restexpress...
+* Changed DefaultHttpResponseWriter to output resonse headers correctly.
+* Updated javadoc on RouteBuilder to provide some documentation on route DSL.
+
===================================================================================================
Release 0.4
* Fixed error in "Connection: keep-alive" processing during normal and error response writing.
View
@@ -1,3 +1,3 @@
-version=0.4
+version=0.5
javac.source=1.6
javac.debug=true
View
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project basedir="." default="build-all" name="RestX">
+<project basedir="." default="build-all" name="RestExpress">
<property environment="env"/>
<property file="build.properties"/>
@@ -88,7 +88,7 @@
<!-- ======================================================================
target: unit-test
====================================================================== -->
- <target name="unit-test" depends="_init, compile" description="--> Execute RestX unit tests">
+ <target name="unit-test" depends="_init, compile" description="--> Execute RestExpress unit tests">
<delete dir="${dir.test.results}"/>
<mkdir dir="${dir.test.results}"/>
<junit printsummary="true">
@@ -1,7 +1,7 @@
-This kickstart project illustrates how to create a simple RestX project. Complete with Ant build,
+This kickstart project illustrates how to create a simple RestExpress project. Complete with Ant build,
it contains a skeleton main() class, RestServer, and an empty, but functional service.
-Copy the lib/ directory of RestX, along with the dist/ directory of RestX into the lib directory
+Copy the lib/ directory of RestExpress, along with the dist/ directory of RestExpress into the lib directory
for the kickstart application. Ant should compile the project. Then:
1) Change the Routes.java file to match your URL requirements using the using the RouteBuilder DSL.
@@ -1,8 +1,8 @@
package com.strategicgains.kickstart;
-import static com.strategicgains.restx.RestX.JSON_FORMAT;
-import static com.strategicgains.restx.RestX.TXT_FORMAT;
-import static com.strategicgains.restx.RestX.XML_FORMAT;
+import static com.strategicgains.restexpress.RestExpress.JSON_FORMAT;
+import static com.strategicgains.restexpress.RestExpress.TXT_FORMAT;
+import static com.strategicgains.restexpress.RestExpress.XML_FORMAT;
import java.net.InetSocketAddress;
import java.util.Collections;
@@ -11,21 +11,21 @@
import org.jboss.netty.bootstrap.ServerBootstrap;
-import com.strategicgains.restx.domain.Link;
-import com.strategicgains.restx.pipeline.DefaultRequestHandler;
-import com.strategicgains.restx.pipeline.PipelineBuilder;
-import com.strategicgains.restx.route.RouteResolver;
-import com.strategicgains.restx.serialization.DefaultSerializationResolver;
-import com.strategicgains.restx.serialization.SerializationProcessor;
-import com.strategicgains.restx.serialization.json.DefaultJsonProcessor;
-import com.strategicgains.restx.serialization.text.DefaultTxtProcessor;
-import com.strategicgains.restx.serialization.xml.DefaultXmlProcessor;
-import com.strategicgains.restx.util.Bootstraps;
-import com.strategicgains.restx.util.Resolver;
+import com.strategicgains.restexpress.domain.Link;
+import com.strategicgains.restexpress.pipeline.DefaultRequestHandler;
+import com.strategicgains.restexpress.pipeline.PipelineBuilder;
+import com.strategicgains.restexpress.route.RouteResolver;
+import com.strategicgains.restexpress.serialization.DefaultSerializationResolver;
+import com.strategicgains.restexpress.serialization.SerializationProcessor;
+import com.strategicgains.restexpress.serialization.json.DefaultJsonProcessor;
+import com.strategicgains.restexpress.serialization.text.DefaultTxtProcessor;
+import com.strategicgains.restexpress.serialization.xml.DefaultXmlProcessor;
+import com.strategicgains.restexpress.util.Bootstraps;
+import com.strategicgains.restexpress.util.Resolver;
import com.thoughtworks.xstream.XStream;
/**
- * The main entry-point into RestX for the example services.
+ * The main entry-point into RestExpress for the example services.
*
* @author toddf
* @since Aug 31, 2009
@@ -62,7 +62,7 @@ public static void main(String[] args)
bootstrap.setPipelineFactory(pf);
// Bind and start to accept incoming connections.
- System.out.println("Starting RestX Example Server on port " + port);
+ System.out.println("Starting KickStart Example Server on port " + port);
bootstrap.bind(new InetSocketAddress(port));
}
@@ -3,7 +3,7 @@
import org.jboss.netty.handler.codec.http.HttpMethod;
import com.strategicgains.kickstart.service.KickStartService;
-import com.strategicgains.restx.route.RouteMapping;
+import com.strategicgains.restexpress.route.RouteMapping;
/**
* @author toddf
@@ -1,7 +1,7 @@
package com.strategicgains.kickstart.service;
-import com.strategicgains.restx.Request;
-import com.strategicgains.restx.Response;
+import com.strategicgains.restexpress.Request;
+import com.strategicgains.restexpress.Response;
/**
* @author toddf
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package com.strategicgains.restx;
+package com.strategicgains.restexpress;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
@@ -28,11 +28,11 @@
import org.jboss.netty.handler.codec.http.HttpMethod;
import org.jboss.netty.handler.codec.http.HttpRequest;
-import com.strategicgains.restx.exception.BadRequestException;
-import com.strategicgains.restx.route.Route;
-import com.strategicgains.restx.route.RouteResolver;
-import com.strategicgains.restx.serialization.SerializationProcessor;
-import com.strategicgains.restx.util.Resolver;
+import com.strategicgains.restexpress.exception.BadRequestException;
+import com.strategicgains.restexpress.route.Route;
+import com.strategicgains.restexpress.route.RouteResolver;
+import com.strategicgains.restexpress.serialization.SerializationProcessor;
+import com.strategicgains.restexpress.util.Resolver;
/**
* @author toddf
@@ -270,7 +270,7 @@ private String getUri(HttpRequest request)
{
try
{
- return URLDecoder.decode(request.getUri(), RestX.ENCODING);
+ return URLDecoder.decode(request.getUri(), RestExpress.ENCODING);
}
catch (UnsupportedEncodingException e)
{
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.strategicgains.restx;
+package com.strategicgains.restexpress;
import static org.jboss.netty.handler.codec.http.HttpResponseStatus.OK;
@@ -14,21 +14,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.strategicgains.restx;
+package com.strategicgains.restexpress;
/**
* @author toddf
*
*/
-public class RestX
+public class RestExpress
{
public static final String JSON_FORMAT = "json";
public static final String TXT_FORMAT = "txt";
public static final String XML_FORMAT = "xml";
public static final String ENCODING = "UTF-8";
- private RestX()
+ private RestExpress()
{
// prevents instantiation.
}
@@ -1,7 +1,7 @@
/*
* Copyright 2010, Pearson eCollege
*/
-package com.strategicgains.restx.domain;
+package com.strategicgains.restexpress.domain;
/**
* An immutable object representing an ID with an xlink property.
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
/**
@@ -13,12 +13,10 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
-import com.strategicgains.restx.exception.ServiceException;
-
/**
* @author toddf
* @since Jun 28, 2010
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
/**
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
/**
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
/**
@@ -13,12 +13,10 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
-import com.strategicgains.restx.exception.ServiceException;
-
/**
* @author toddf
* @since Jun 28, 2010
@@ -13,12 +13,10 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
-import com.strategicgains.restx.exception.ServiceException;
-
/**
* @author toddf
* @since Jun 28, 2010
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
@@ -13,12 +13,10 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
-import com.strategicgains.restx.exception.ServiceException;
-
/**
* @author toddf
* @since Jun 28, 2010
@@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-package com.strategicgains.restx.exception;
+package com.strategicgains.restexpress.exception;
import java.util.List;
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.strategicgains.restx.pipeline;
+package com.strategicgains.restexpress.pipeline;
import static org.jboss.netty.handler.codec.http.HttpHeaders.Names.CONTENT_TYPE;
import static org.jboss.netty.handler.codec.http.HttpResponseStatus.INTERNAL_SERVER_ERROR;
@@ -29,16 +29,16 @@
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
import org.jboss.netty.handler.codec.http.HttpRequest;
-import com.strategicgains.restx.Request;
-import com.strategicgains.restx.Response;
-import com.strategicgains.restx.exception.ServiceException;
-import com.strategicgains.restx.response.DefaultHttpResponseWriter;
-import com.strategicgains.restx.response.ErrorHttpResponseWriter;
-import com.strategicgains.restx.response.HttpResponseWriter;
-import com.strategicgains.restx.route.Action;
-import com.strategicgains.restx.route.RouteResolver;
-import com.strategicgains.restx.serialization.SerializationProcessor;
-import com.strategicgains.restx.util.Resolver;
+import com.strategicgains.restexpress.Request;
+import com.strategicgains.restexpress.Response;
+import com.strategicgains.restexpress.exception.ServiceException;
+import com.strategicgains.restexpress.response.DefaultHttpResponseWriter;
+import com.strategicgains.restexpress.response.ErrorHttpResponseWriter;
+import com.strategicgains.restexpress.response.HttpResponseWriter;
+import com.strategicgains.restexpress.route.Action;
+import com.strategicgains.restexpress.route.RouteResolver;
+import com.strategicgains.restexpress.serialization.SerializationProcessor;
+import com.strategicgains.restexpress.util.Resolver;
/**
* @author toddf
@@ -1,7 +1,7 @@
/*
* Copyright 2010, eCollege, Inc. All rights reserved.
*/
-package com.strategicgains.restx.pipeline;
+package com.strategicgains.restexpress.pipeline;
import org.jboss.netty.channel.ChannelHandler;
import org.jboss.netty.channel.ChannelPipeline;
@@ -1,10 +1,10 @@
/*
* Copyright 2010, eCollege, Inc. All rights reserved.
*/
-package com.strategicgains.restx.pipeline;
+package com.strategicgains.restexpress.pipeline;
-import com.strategicgains.restx.Request;
-import com.strategicgains.restx.Response;
+import com.strategicgains.restexpress.Request;
+import com.strategicgains.restexpress.Response;
/**
* Defines the interface for processing that happens after the service is called but
Oops, something went wrong.

0 comments on commit a107489

Please sign in to comment.