juergen 02/04/15 06:00:01
Modified: src/webdav/server/org/apache/slide/webdav/util
VersioningHelper.java
Log:
Removed method getUriOfAssociatedWorkspace().
Use UriHandler.getAssociatedWorkspaceUri() instead.
(ralf)
Revision Changes Path
1.31 +12 -53
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.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- VersioningHelper.java 15 Apr 2002 11:45:10 -0000 1.30
+++ VersioningHelper.java 15 Apr 2002 13:00:01 -0000 1.31
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
1.30 2002/04/15 11:45:10 juergen Exp $
- * $Revision: 1.30 $
- * $Date: 2002/04/15 11:45:10 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
1.31 2002/04/15 13:00:01 juergen Exp $
+ * $Revision: 1.31 $
+ * $Date: 2002/04/15 13:00:01 $
*
* ====================================================================
*
@@ -419,6 +419,9 @@
rNrd.setProperty(
new NodeProperty(P_WORKSPACE, pHelp.createHrefValue(wsUri)) );
}
+ else {
+ rNrd.removeProperty(P_WORKSPACE);
+ }
}
/**
@@ -549,7 +552,8 @@
content.store(sToken, cinNrds.getUri(), cinNrd, null);
// update <workspace-checkout-set>
- String workspaceUri = getUriOfAssociatedWorkspace(rNrds.getUri());
+ UriHandler vcrUriHandler = UriHandler.getUriHandler(nsaToken,
rNrds.getUri());
+ String workspaceUri = vcrUriHandler.getAssociatedWorkspaceUri();
if (workspaceUri != null) {
NodeRevisionDescriptors workspaceDescriptors =
retrieveRevisionDescriptors(workspaceUri);
NodeRevisionDescriptor workspaceDescriptor =
retrieveLatestRevisionDescriptor(workspaceUri,
@@ -712,7 +716,8 @@
content.store( sToken, coutNrds.getUri(), coutNrd, null);
// update <workspace-checkout-set>
- String workspaceUri = getUriOfAssociatedWorkspace(rNrds.getUri());
+ UriHandler vcrUriHandler = UriHandler.getUriHandler(nsaToken,
rNrds.getUri());
+ String workspaceUri = vcrUriHandler.getAssociatedWorkspaceUri();
if (workspaceUri != null) {
NodeRevisionDescriptors workspaceDescriptors =
retrieveRevisionDescriptors(workspaceUri);
NodeRevisionDescriptor workspaceDescriptor =
retrieveLatestRevisionDescriptor(workspaceUri,
@@ -795,7 +800,8 @@
content.store( sToken, vhrNrds.getUri(), vrNrdOld, null);
// update <workspace-checkout-set>
- String workspaceUri = getUriOfAssociatedWorkspace(rNrds.getUri());
+ UriHandler vcrUriHandler = UriHandler.getUriHandler(nsaToken,
rNrds.getUri());
+ String workspaceUri = vcrUriHandler.getAssociatedWorkspaceUri();
if (workspaceUri != null) {
NodeRevisionDescriptors workspaceDescriptors =
retrieveRevisionDescriptors(workspaceUri);
NodeRevisionDescriptor workspaceDescriptor =
retrieveLatestRevisionDescriptor(workspaceUri,
@@ -948,21 +954,6 @@
}
/**
- * If the resource described by the given <code>resourceUri</code> is a
- * VCR contained in a workspace, this method returns the URI of the associated
- * workspace, otherwise <code>null</code>
- *
- * @param resourceUri the URI of the resource.
- *
- * @return the URI of the associated workspace.
- *
- * @throws SlideException
- */
- public String getUriOfAssociatedWorkspace(String resourceUri) throws
SlideException {
- return getUriOfAssociatedWorkspace(nsaToken, sToken, content, resourceUri);
- }
-
- /**
* Returns the URI of the resource defined by the given
NodeRevisionDescriptor(s).
*
* @param revisionDescriptors the NodeRevisionDescriptors of the resource.
@@ -1517,38 +1508,6 @@
}
return vrUri;
- }
-
- /**
- * If the resource described by the given <code>resourceUri</code> is a
- * VCR contained in a workspace, this method returns the URI of the associated
- * workspace, otherwise <code>null</code>
- *
- * @param nsaToken the NamespaceAccessToken to use.
- * @param sToken the SlideToken to use.
- * @param content the Content helper to use.
- * @param resourceUri the URI of the resource.
- *
- * @return the URI of the associated workspace.
- *
- * @throws SlideException
- */
- public static String getUriOfAssociatedWorkspace(NamespaceAccessToken nsaToken,
- SlideToken sToken,
- Content content,
- String resourceUri) throws
SlideException {
-
- String workspaceUri = null;
- NodeRevisionDescriptors revisionDescriptors =
retrieveRevisionDescriptors(nsaToken, sToken, content, resourceUri);
- if (!revisionDescriptors.isVersioned()) {
-
- NodeRevisionDescriptor revisionDescriptor =
retrieveLatestRevisionDescriptor(nsaToken, sToken, content, resourceUri,
revisionDescriptors);
- NodeProperty workspaceProperty =
revisionDescriptor.getProperty(P_WORKSPACE);
- if ( (workspaceProperty != null) && (workspaceProperty.getValue() !=
null) ) {
- workspaceUri =
getElementValue(workspaceProperty.getValue().toString());
- }
- }
- return workspaceUri;
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>