Author: dkatayev
Date: 2010-02-12 03:30:51 -0500 (Fri, 12 Feb 2010)
New Revision: 1766
Modified:
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/MkColCommand.java
Log:
EXOOJCR-471 changes reverted
Modified:
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/MkColCommand.java
===================================================================
---
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/MkColCommand.java 2010-02-11
16:56:12 UTC (rev 1765)
+++
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/MkColCommand.java 2010-02-12
08:30:51 UTC (rev 1766)
@@ -82,24 +82,15 @@
{
nullResourceLocks.checkLock(session, path, tokens);
- try
+ node = session.getRootNode().addNode(TextUtil.relativizePath(path), nodeType);
+
+ if (mixinTypes != null)
{
- node = session.getRootNode().getNode(TextUtil.relativizePath(path));
- return Response.status(HTTPStatus.METHOD_NOT_ALLOWED).entity(
- "MKCOL can only be executed on a deleted/non-existent
resource").build();
+ addMixins(node, mixinTypes);
}
- catch (PathNotFoundException e)
- {
- node = session.getRootNode().addNode(TextUtil.relativizePath(path),
nodeType);
-
- if (mixinTypes != null)
- {
- addMixins(node, mixinTypes);
- }
- session.save();
- }
-
+ session.save();
}
+
catch (ItemExistsException exc)
{
return
Response.status(HTTPStatus.METHOD_NOT_ALLOWED).entity(exc.getMessage()).build();
Show replies by date