You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by el...@apache.org on 2006/07/06 15:39:00 UTC
svn commit: r419547 - in
/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server:
exceptions/MethodNotAllowed.java exceptions/MethodNotAllowedException.java
exceptions/NotFoundException.java servlet/AbderaServlet.java
Author: eliast
Date: Thu Jul 6 06:39:00 2006
New Revision: 419547
URL: http://svn.apache.org/viewvc?rev=419547&view=rev
Log:
- Renamed MethodNotAllowed to MethodNotAllowedException
- Added NotFoundException
Added:
incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java
- copied, changed from r418494, incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowed.java
incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/NotFoundException.java (with props)
Removed:
incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowed.java
Modified:
incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/AbderaServlet.java
Copied: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java (from r418494, incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowed.java)
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java?p2=incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java&p1=incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowed.java&r1=418494&r2=419547&rev=419547&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowed.java (original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/MethodNotAllowedException.java Thu Jul 6 06:39:00 2006
@@ -20,16 +20,16 @@
import org.apache.abdera.server.RequestContext;
-public class MethodNotAllowed
+public class MethodNotAllowedException
extends AbderaServerException {
private static final long serialVersionUID = -633052744794889086L;
- public MethodNotAllowed() {
+ public MethodNotAllowedException() {
super(405, null);
}
- public MethodNotAllowed(String text) {
+ public MethodNotAllowedException(String text) {
super(405, text);
}
Added: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/NotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/NotFoundException.java?rev=419547&view=auto
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/NotFoundException.java (added)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/NotFoundException.java Thu Jul 6 06:39:00 2006
@@ -0,0 +1,21 @@
+package org.apache.abdera.server.exceptions;
+
+/**
+ * @author Elias Torres (<a href="mailto:eliast@us.ibm.com">eliast@us.ibm.com</a>)
+ *
+ */
+public class NotFoundException extends AbderaServerException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3161208634818367903L;
+
+ public NotFoundException() {
+ super(404, null);
+ }
+
+ public NotFoundException(String text) {
+ super(404, text);
+ }
+}
Propchange: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/NotFoundException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/NotFoundException.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/exceptions/NotFoundException.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/AbderaServlet.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/AbderaServlet.java?rev=419547&r1=419546&r2=419547&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/AbderaServlet.java (original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/server/servlet/AbderaServlet.java Thu Jul 6 06:39:00 2006
@@ -32,7 +32,7 @@
import org.apache.abdera.server.RequestHandlerFactory;
import org.apache.abdera.server.ResponseContext;
import org.apache.abdera.server.exceptions.AbderaServerException;
-import org.apache.abdera.server.exceptions.MethodNotAllowed;
+import org.apache.abdera.server.exceptions.MethodNotAllowedException;
public class AbderaServlet
extends HttpServlet {
@@ -54,7 +54,7 @@
if (handler != null) {
responseContext = handler.invoke(requestContext);
} else {
- throw new MethodNotAllowed(request.getMethod());
+ throw new MethodNotAllowedException(request.getMethod());
}
} catch (AbderaServerException exception) {
responseContext = exception;