pnever 02/04/13 07:53:01
Modified: src/webdav/server/org/apache/slide/webdav/util
VersioningHelper.java
Log:
Added new method setWorkspaceProperty()
Revision Changes Path
1.28 +21 -14
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java
Index: VersioningHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- VersioningHelper.java 12 Apr 2002 15:41:33 -0000 1.27
+++ VersioningHelper.java 13 Apr 2002 14:53:01 -0000 1.28
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
1.27 2002/04/12 15:41:33 pnever Exp $
- * $Revision: 1.27 $
- * $Date: 2002/04/12 15:41:33 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
1.28 2002/04/13 14:53:01 pnever Exp $
+ * $Revision: 1.28 $
+ * $Date: 2002/04/13 14:53:01 $
*
* ====================================================================
*
@@ -392,11 +392,7 @@
vcrNrd.setProperty( new NodeProperty(P_CHECKED_IN,
pHelp.createHrefValue(evUri)) );
// set workspace
- String wsUri = vcrUh.getAssociatedWorkspaceUri();
- if( wsUri != null ) {
- vcrNrd.setProperty(
- new NodeProperty(P_WORKSPACE, pHelp.createHrefValue(wsUri)) );
- }
+ setWorkspaceProperty( vcrUri, vcrNrd );
// store
SubjectNode vcrNode = new SubjectNode();
@@ -410,6 +406,22 @@
}
/**
+ * Set the workspace property if needed.
+ *
+ * @param rUri the URI of the resource to set the workspace property
+ * @param rNrd the NodeRevisionDescriptor to set the workspace property
+ * @throws SlideException
+ */
+ public void setWorkspaceProperty( String rUri, NodeRevisionDescriptor rNrd ) {
+ UriHandler rUh = UriHandler.getUriHandler( nsaToken, rUri );
+ String wsUri = rUh.getAssociatedWorkspaceUri();
+ if( wsUri != null ) {
+ rNrd.setProperty(
+ new NodeProperty(P_WORKSPACE, pHelp.createHrefValue(wsUri)) );
+ }
+ }
+
+ /**
* Create the specified workspace.
*
* @param resourcePath the URI of the workspace to create
@@ -988,12 +1000,7 @@
vcrRevisionDescriptor.setETag(vcrRevisionDescriptors.getUri().hashCode()+
"_"+vcrRevisionDescriptor.getContentLength());
// set workspace
- UriHandler vcrUh = UriHandler.getUriHandler( nsaToken, vcrUri );
- String wsUri = vcrUh.getAssociatedWorkspaceUri();
- if( wsUri != null ) {
- vcrRevisionDescriptor.setProperty(
- new NodeProperty(P_WORKSPACE, pHelp.createHrefValue(wsUri)) );
- }
+ setWorkspaceProperty( vcrUri, vcrRevisionDescriptor );
// get the VR content
NodeRevisionContent vrContent = content.retrieve(sToken,
vrRevisionDescriptors, vrRevisionDescriptor);
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>