diff --git a/osgi.enroute.rest.simple.provider/readme.md b/osgi.enroute.rest.simple.provider/readme.md index bb96088..c7e841e 100644 --- a/osgi.enroute.rest.simple.provider/readme.md +++ b/osgi.enroute.rest.simple.provider/readme.md @@ -115,20 +115,6 @@ In REST protocols, the `PUT` verb would be used to store a new person. To create Since the REST methods provide full type safe access to the parameters and remaining URI segments a significant amount of validation is executed by the implementation of this service. These validations will result in the appropriate HTTP error and status code. Implementation should also add explanatory texts to the response. -Additionally, the REST methods may throw any exception. You have two approaches: a "DDD-ish" approach, using a limited set of Exceptions that correspond directly to the most commonly used HTTP errors, or by using regular Java Exceptions, which get translated. - -Example of a "DDD-ish" approach: - - Person putPerson( PersonRequest request ) throws BadRequest400Exception, NotFound404Exception { - ... - } - -Using regular Exceptions would look more like this: - - Person putPerson( PersonRequest request ) throws IllegalStateException, FileNotFoundException { - ... - } - Regular Java Exceptions are translated to an HTTP error code. The conversions from exception to status code is as follows: * IllegalStateException <80><93> 400 BAD REQUEST diff --git a/osgi.enroute.web.simple.provider/static/osgi/enroute/web/local/index.html b/osgi.enroute.web.simple.provider/static/osgi/enroute/web/local/index.html index c33583c..9330e63 100644 --- a/osgi.enroute.web.simple.provider/static/osgi/enroute/web/local/index.html +++ b/osgi.enroute.web.simple.provider/static/osgi/enroute/web/local/index.html @@ -27,7 +27,7 @@

Index

diff --git a/osgi.enroute.web.simple.test/bnd.bnd b/osgi.enroute.web.simple.test/bnd.bnd index 2b25c47..7f10852 100644 --- a/osgi.enroute.web.simple.test/bnd.bnd +++ b/osgi.enroute.web.simple.test/bnd.bnd @@ -26,18 +26,13 @@ Conditional-Package: \ osgi.identity;filter:='(osgi.identity=osgi.enroute.webconsole.xray.provider)' -runbundles: \ - biz.aQute.bndlib;version='[3.0.0,3.0.1)',\ com.springsource.org.json;version='[1.0.0,1.0.1)',\ net.sourceforge.htmlunit;version='[2.15.0,2.15.1)',\ org.apache.commons.fileupload;version='[1.3.1,1.3.2)',\ - org.apache.commons.io;version='[2.4.0,2.4.1)',\ org.apache.felix.configadmin;version='[1.8.6,1.8.7)',\ org.apache.felix.http.api;version='[3.0.0,3.0.1)',\ - org.apache.felix.http.jetty;version='[3.2.0,3.2.1)',\ org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\ org.apache.felix.log;version='[1.0.1,1.0.2)',\ - org.apache.felix.scr;version='[2.0.0,2.0.1)',\ - org.apache.felix.webconsole;version='[4.2.8,4.2.9)',\ org.eclipse.equinox.coordinator;version='[1.3.100,1.3.101)',\ org.eclipse.equinox.event;version='[1.3.100,1.3.101)',\ org.eclipse.equinox.metatype;version='[1.4.100,1.4.101)',\ @@ -51,12 +46,18 @@ Conditional-Package: \ osgi.enroute.google.angular.webresource;version=snapshot,\ osgi.enroute.hamcrest.wrapper;version=snapshot,\ osgi.enroute.junit.wrapper;version=snapshot,\ - osgi.enroute.logger.simple.provider;version=snapshot,\ osgi.enroute.stackexchange.pagedown.webresource;version=snapshot,\ osgi.enroute.twitter.bootstrap.webresource;version=snapshot,\ osgi.enroute.web.simple.provider;version=snapshot,\ osgi.enroute.web.simple.test;version=snapshot,\ - osgi.enroute.webconsole.xray.provider;version=snapshot + osgi.enroute.webconsole.xray.provider;version=snapshot,\ + biz.aQute.bndlib;version='[3.3.0,3.3.1)',\ + org.apache.commons.io;version='[2.5.0,2.5.1)',\ + org.apache.felix.http.jetty;version='[3.1.0,3.1.1)',\ + org.apache.felix.scr;version='[2.0.6,2.0.7)',\ + org.apache.felix.webconsole;version='[4.2.16,4.2.17)',\ + osgi.enroute.web.simple.provider;version='[1.3.3,1.3.4)',\ + slf4j.api;version='[1.7.0,1.7.1)' Require-Capability: \ osgi.enroute.webresource; \