juergen 02/04/15 04:00:54
Modified: src/webdav/server/org/apache/slide/webdav/method
VersionControlMethod.java
Log:
Method sendPreconditionViolation() has been moved to super class WebdavMethod.
(ralf)
Revision Changes Path
1.12 +4 -23
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/VersionControlMethod.java
Index: VersionControlMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/VersionControlMethod.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- VersionControlMethod.java 12 Apr 2002 15:39:22 -0000 1.11
+++ VersionControlMethod.java 15 Apr 2002 11:00:54 -0000 1.12
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/VersionControlMethod.java,v
1.11 2002/04/12 15:39:22 pnever Exp $
- * $Revision: 1.11 $
- * $Date: 2002/04/12 15:39:22 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/VersionControlMethod.java,v
1.12 2002/04/15 11:00:54 juergen Exp $
+ * $Revision: 1.12 $
+ * $Date: 2002/04/15 11:00:54 $
*
* ====================================================================
*
@@ -207,7 +207,7 @@
vh.versionControl( resourcePath, existingVersionPath );
}
catch (PreconditionViolationException e) {
- sendPreconditionViolation(e.getViolatedPrecondition());
+ sendPreconditionViolation(e);
throw e;
}
catch (Exception e) {
@@ -216,25 +216,6 @@
throw new WebdavException( WebdavStatus.SC_ACCEPTED, false ); // abort
the TA
}
- }
-
- /**
- * Sends a precondition vilolation response.
- *
- * @param violatedPrecondition the precondition that has been violated.
- */
- protected void sendPreconditionViolation(ViolatedPrecondition
violatedPrecondition) throws IOException {
-
- if (violatedPrecondition != null) {
-
- resp.setStatus(violatedPrecondition.getStatusCode());
- resp.setContentType(TEXT_XML);
-
- Element errorElement = new Element(E_ERROR,
Namespace.getNamespace(DEFAULT_NAMESPACE));
- Element preconditionElement = new
Element(violatedPrecondition.getPrecondition(),
Namespace.getNamespace(DEFAULT_NAMESPACE));
- errorElement.addContent(preconditionElement);
- new XMLOutputter().output(errorElement, resp.getWriter());
- }
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>