pnever 2004/05/12 05:50:43
Modified: src/webdav/server/org/apache/slide/webdav/util
PropertyRetrieverImpl.java PropertyHelper.java
src/share/org/apache/slide/content
NodeRevisionDescriptor.java
src/share/org/apache/slide/search/basic BasicQueryImpl.java
Log:
Partly reverted changes made in revisions 1.31.2.2 and 1.31.2.3 of
PropertyRetrieverImpl and made a fix in both PropertyRetrieverImpl and
PropertyHelper. *** All is about context and servlet paths ***
Minor fixes in the other file(s)
Revision Changes Path
1.35 +31 -34
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyRetrieverImpl.java
Index: PropertyRetrieverImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyRetrieverImpl.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- PropertyRetrieverImpl.java 2 Apr 2004 07:30:27 -0000 1.34
+++ PropertyRetrieverImpl.java 12 May 2004 12:50:41 -0000 1.35
@@ -5,7 +5,7 @@
*
* ====================================================================
*
- * Copyright 1999-2002 The Apache Software Foundation
+ * Copyright 1999-2002 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -125,15 +125,15 @@
}
/** deprecated */
-// public PropertyRetrieverImpl(NamespaceAccessToken token, SlideToken
slideToken) {
-// super(slideToken, token);
-// this.structure = token.getStructureHelper();
-// this.content = token.getContentHelper();
-// this.security = token.getSecurityHelper();
-// this.lock = token.getLockHelper();
+ // public PropertyRetrieverImpl(NamespaceAccessToken token, SlideToken
slideToken) {
+ // super(slideToken, token);
+ // this.structure = token.getStructureHelper();
+ // this.content = token.getContentHelper();
+ // this.security = token.getSecurityHelper();
+ // this.lock = token.getLockHelper();
//
-// propertyHelper = PropertyHelper.getPropertyHelper(slideToken, token,
null);
-// }
+ // propertyHelper = PropertyHelper.getPropertyHelper(slideToken, token,
null);
+ // }
/**
* Returns the PropertyHelper used to access the (computed) properties.
@@ -153,7 +153,7 @@
* @param requestedProperties the requested properties.
* @param uri the URI of the resource.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
* @param extendedAllprop indicates if the <code>DeltaV</code> specific
* properties should be included in case
* all properties are requested.
@@ -216,7 +216,7 @@
* @param uri the URI of the resource.
* @param revisionNumber the revision number of the requested
resource.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
* @param extendedAllprop indicates if the <code>DeltaV</code> specific
* properties should be included in case
* all properties are requested.
@@ -245,7 +245,7 @@
* @param revisionDescriptors the NodeRevisionDescriptors of the
resource.
* @param revisionDescriptor the NodeRevisionDescriptor of the
resource.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
* @param extendedAllprop indicates if the <code>DeltaV</code> specific
* properties should be included in case
* all properties are requested.
@@ -280,7 +280,7 @@
* @param requestedProperties the requested properties.
* @param requestedResource the resource for which to return the
properties.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
* @param extendedAllprop indicates if the <code>DeltaV</code> specific
* properties should be included in case
* all properties are requested.
@@ -315,7 +315,7 @@
* @param requestedProperties the requested properties.
* @param requestedResource the resource for which to return the
properties.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*
* @return the requested properties as list of <code><propstat></code>
* JDOM Element.
@@ -393,7 +393,7 @@
*
* @param requestedResource the resource for which to return the
properties.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
* @param extendedAllprop indicates if the <code>DeltaV</code> specific
* properties should be included in case
* all properties are requested.
@@ -482,7 +482,7 @@
* when retrieving the property) to the
List of
* PropertyName that caused that error.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*
* @return A List of <code><propstat></code> JDOM Elements for the
erroneous properties.
*/
@@ -530,7 +530,7 @@
*
* @param property the property for which to return the
Element.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*
* @return the JDOM Element for the given <code>property</code>.
*/
@@ -552,7 +552,7 @@
* @param propertyName the property Name.
* @param propertyValue the property Value.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*
* @return the JDOM Element for the given <code>property</code>.
*/
@@ -578,9 +578,9 @@
if( propertyValue.toString().indexOf('<') >= 0 ) {
try {
XMLValue xmlValue = new XMLValue(propertyValue.toString(),
valueDefaultNamespace);
-// if (AbstractResourceKind.isLiveProperty(propertyName)) {
-// convertHrefValueToAbsoluteURL (xmlValue, contextPath,
servletPath, config);
-// }
+ if (AbstractResourceKind.isLiveProperty(propertyName)) {
+ convertHrefValueToAbsoluteURL (xmlValue, contextPath,
servletPath, config);
+ }
Iterator iterator = xmlValue.iterator();
while (iterator.hasNext()) {
Object o = iterator.next();
@@ -619,13 +619,12 @@
* @param xmlValue the XMLValue that might contain
<code><href></code>
* values to convert.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*/
protected static void convertHrefValueToAbsoluteURL (XMLValue xmlValue,
String contextPath,
String servletPath,
- WebdavServletConfig config)
- {
+ WebdavServletConfig
config) {
if (xmlValue != null) {
Iterator iterator = xmlValue.iterator();
Element element = null;
@@ -642,8 +641,7 @@
private static void convertHrefValueToAbsoluteURL (Element element,
String servletPath,
String contextPath,
- WebdavServletConfig config)
- {
+ WebdavServletConfig config) {
if (element.getChildren().size() > 0) {
Iterator i = element.getChildren().iterator();
while (i.hasNext()) {
@@ -652,13 +650,12 @@
}
}
if ( E_HREF.equals(element.getName()) && (element.getText() != null) ) {
- // FIXME Is a check for absolute URL necessary??? How is it doable?
- // if ( !PropertyHelper.isAbsoluteURL(serverURL, contextPath,
element.getText()) ) {
- //
+ if ( !PropertyHelper.isAbsoluteURL(contextPath, element.getText()) ) {
+
element.setText(WebdavUtils.getAbsolutePath (element.getText(),
contextPath,
servletPath, config));
- // }
+ }
}
}
1.69 +17 -18
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java
Index: PropertyHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- PropertyHelper.java 1 Apr 2004 14:41:01 -0000 1.68
+++ PropertyHelper.java 12 May 2004 12:50:41 -0000 1.69
@@ -5,7 +5,7 @@
*
* ====================================================================
*
- * Copyright 1999-2002 The Apache Software Foundation
+ * Copyright 1999-2002 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -644,7 +644,7 @@
* describing the successors of the resource.
*
* The concatenation of <code>contextPath</code>,<code>servletPath</code> and
- * <code>revisionDescriptor.getUri()</code> gives the absolute URL of the
resource
+ * <code>revisionDescriptor.getUri()</code> gives the absolute URL of the
resource
* on this server.
*
* @param revisionDescriptors the NodeRevisionDescriptors of the resource.
@@ -992,7 +992,7 @@
String grammarNamespace = basicSearch.getNamespaceURI();
Search searchHelper = nsaToken.getSearchHelper();
- // @FIXME Why is servletPath not required?
+ // @FIXME Why is servletPath not required?
SearchQuery searchQuery =
searchHelper.createSearchQuery(grammarNamespace,
basicSearch,
sTokenNoEnlist,
@@ -1143,7 +1143,7 @@
* @param revisionDescriptors the NodeRevisionDescriptors of the Workspace.
* @param revisionDescriptor the NodeRevisionDescriptor of the Workspace.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*
* @return the value of the <code><workspace-checkout-set></code>
property.
*
@@ -1343,7 +1343,7 @@
*
* @param objectLockToken the NodeLock for which to compute the value
* @param servletPath a String, the result of
HttpRequest.getServletPath()
- * @param contextPath a String , the result of
HttpRequest.getContextPath()
+ * @param contextPath a String , the result of
HttpRequest.getContextPath()
*
* @return the value of the <code><lockdiscovery></code> property.
*
@@ -1515,7 +1515,7 @@
* @param revisionDescriptors the NodeRevisionDescriptors of the resource.
* @param revisionDescriptor the NodeRevisionDescriptor of the resource.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*
* @return the value of the <code><supported-privilege-set></code>
property.
*
@@ -1616,7 +1616,7 @@
* @param revisionDescriptors the NodeRevisionDescriptors of the resource.
* @param revisionDescriptor the NodeRevisionDescriptor of the resource.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*
* @return the value of the <code><current-user-privilege-set></code>
property.
*
@@ -1667,7 +1667,7 @@
* @param revisionDescriptors the NodeRevisionDescriptors of the resource.
* @param revisionDescriptor the NodeRevisionDescriptor of the resource.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*
* @return the value of the <code><acl></code> property.
*
@@ -1852,7 +1852,7 @@
* @param revisionDescriptors the NodeRevisionDescriptors of the resource.
* @param revisionDescriptor the NodeRevisionDescriptor of the resource.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*
* @return the value of the <code><principal-collection-set></code>
property.
*
@@ -1905,7 +1905,7 @@
* @param revisionDescriptors the NodeRevisionDescriptors of the resource.
* @param revisionDescriptor the NodeRevisionDescriptor of the resource.
* @param contextPath a String , the result of
HttpRequest.getContextPath()
- * @param servletPath a String, the result of
HttpRequest.getServletPath()
+ * @param servletPath a String, the result of
HttpRequest.getServletPath()
*
* @return the value of the <code><owner></code> property.
*
@@ -1922,7 +1922,7 @@
NodeProperty ownerProperty = revisionDescriptor.getProperty(P_OWNER,
NodeProperty.DEFAULT_NAMESPACE);
- // FIXME wihtout servletPath??
+ // FIXME wihtout servletPath??
XMLValue xmlValue = createUserPath(ownerProperty, contextPath);
return xmlValue;
@@ -1932,7 +1932,7 @@
NodeProperty creationUserProperty =
revisionDescriptor.getProperty(P_CREATIONUSER,
NodeProperty.DEFAULT_NAMESPACE);
- // FIXME wihtout servletPath??
+ // FIXME wihtout servletPath??
XMLValue xmlValue = createUserPath(creationUserProperty, contextPath);
return xmlValue;
@@ -1943,7 +1943,7 @@
NodeProperty modificationUserProperty =
revisionDescriptor.getProperty(P_MODIFICATIONUSER,
NodeProperty.DEFAULT_NAMESPACE);
- // FIXME wihtout servletPath??
+ // FIXME wihtout servletPath??
XMLValue xmlValue = createUserPath(modificationUserProperty, contextPath);
return xmlValue;
@@ -2058,13 +2058,12 @@
/**
* Returns <code>true</code> if the given <code>uri</code> is an absolute URL.
*
- * @param serverURL the URL of the server
* @param contextPath the context path.
* @param uri the (slide-) URI of the resource.
*
* @return <code>true</code> if the given <code>uri</code> is an absolute
URL.
*/
- public static boolean isAbsoluteURL(String serverURL, String contextPath,
String uri) {
+ public static boolean isAbsoluteURL(String contextPath, String uri) {
if (uri.startsWith(S_RESOURCE_ID)) {
return true;
}
1.33 +8 -6
jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java
Index: NodeRevisionDescriptor.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/content/NodeRevisionDescriptor.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- NodeRevisionDescriptor.java 11 Feb 2004 11:30:13 -0000 1.32
+++ NodeRevisionDescriptor.java 12 May 2004 12:50:43 -0000 1.33
@@ -5,7 +5,7 @@
*
* ====================================================================
*
- * Copyright 1999-2002 The Apache Software Foundation
+ * Copyright 1999-2002 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -653,7 +653,9 @@
if (resourceType == null) {
return new String();
} else {
- return (String) resourceType.getValue();
+// return (String) resourceType.getValue();
+ return String.valueOf(resourceType.getValue());
+
}
}
1.14 +5 -5
jakarta-slide/src/share/org/apache/slide/search/basic/BasicQueryImpl.java
Index: BasicQueryImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/search/basic/BasicQueryImpl.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- BasicQueryImpl.java 25 Feb 2004 10:04:29 -0000 1.13
+++ BasicQueryImpl.java 12 May 2004 12:50:43 -0000 1.14
@@ -5,7 +5,7 @@
*
* ====================================================================
*
- * Copyright 1999-2002 The Apache Software Foundation
+ * Copyright 1999-2002 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]