juergen 2003/08/07 22:58:19
Modified: src/webdav/server/org/apache/slide/webdav/util
PropertyHelper.java
Log:
Korrekted computeOwner() (josef)
Revision Changes Path
1.47 +9 -14
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.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- PropertyHelper.java 5 Aug 2003 09:10:38 -0000 1.46
+++ PropertyHelper.java 8 Aug 2003 05:58:18 -0000 1.47
@@ -1978,30 +1978,25 @@
public XMLValue computeOwner(NodeRevisionDescriptors revisionDescriptors,
NodeRevisionDescriptor revisionDescriptor, String contextPath, String serverURL)
throws ObjectLockedException, RevisionDescriptorNotFoundException,
ServiceAccessException, LinkedObjectNotFoundException, AccessDeniedException,
ObjectNotFoundException, LockTokenNotFoundException, JDOMException {
XMLValue xmlValue = new XMLValue();
-
+
NodeProperty ownerProperty = revisionDescriptor.getProperty(P_OWNER,
NodeProperty.DEFAULT_NAMESPACE);
String ownerHref;
NamespaceConfig config = nsaToken.getNamespaceConfig();
- String userCollection = "/";
- String configParam = config.getParameter(AclConstants.P_USER_COLLECTION);
- if ( configParam != null ) {
- if ( configParam.length() > 0 )
- userCollection = "/" + configParam +"/";
- }
-
if ((ownerProperty != null) && (ownerProperty.getValue()!=null) &&
(!"".equals(ownerProperty.getValue().toString()))) {
- ownerHref = contextPath + config.getUsersPath() + userCollection +
ownerProperty.getValue().toString();
+ ownerHref = contextPath + config.getUsersPath() + "/" +
ownerProperty.getValue().toString();
}
else {
- ownerHref = contextPath + config.getUsersPath() + userCollection +
config.getGuestPath();
+ ownerHref = contextPath + config.getUsersPath();
+ if ( config.getGuestPath() != null &&
!config.getGuestPath().equals("") )
+ ownerHref = ownerHref + "/" + config.getGuestPath();
}
Element href = new Element(E_HREF, NamespaceCache.DEFAULT_NAMESPACE);
href.setText(ownerHref);
xmlValue.add(href);
-
+
return xmlValue;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]