pnever 2003/10/16 03:01:07
Modified: src/webdav/server/org/apache/slide/webdav/util
PropertyHelper.java
Log:
Changed computePrincipalCollectionSet()
Revision Changes Path
1.55 +36 -6
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.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- PropertyHelper.java 13 Oct 2003 16:55:42 -0000 1.54
+++ PropertyHelper.java 16 Oct 2003 10:01:07 -0000 1.55
@@ -2044,9 +2044,39 @@
XMLValue xmlValue = new XMLValue();
NamespaceConfig config = nsaToken.getNamespaceConfig();
- Element href = new Element(E_HREF, NamespaceCache.DEFAULT_NAMESPACE);
- href.setText(getAbsoluteURL(null, contextPath, config.getUsersPath()));
- xmlValue.add(href);
+ Element href;
+ String userCollStr = config.getParameter(P_USER_COLLECTION);
+ String groupCollStr = config.getParameter(P_GROUP_COLLECTION);
+ String roleCollStr = config.getParameter(P_ROLE_COLLECTION);
+ if (userCollStr != null && userCollStr.length() > 0) {
+ if (!userCollStr.startsWith("/")) {
+ userCollStr = "/"+userCollStr;
+ }
+ href = new Element(E_HREF, NamespaceCache.DEFAULT_NAMESPACE);
+ href.setText(getAbsoluteURL(null, contextPath,
config.getUsersPath()+userCollStr));
+ xmlValue.add(href);
+ if (groupCollStr != null && groupCollStr.length() > 0) {
+ if (!groupCollStr.startsWith("/")) {
+ groupCollStr = "/"+groupCollStr;
+ }
+ href = new Element(E_HREF, NamespaceCache.DEFAULT_NAMESPACE);
+ href.setText(getAbsoluteURL(null, contextPath,
config.getUsersPath()+groupCollStr));
+ xmlValue.add(href);
+ }
+ if (roleCollStr != null && roleCollStr.length() > 0) {
+ if (!roleCollStr.startsWith("/")) {
+ roleCollStr = "/"+roleCollStr;
+ }
+ href = new Element(E_HREF, NamespaceCache.DEFAULT_NAMESPACE);
+ href.setText(getAbsoluteURL(null, contextPath,
config.getUsersPath()+roleCollStr));
+ xmlValue.add(href);
+ }
+ }
+ else {
+ href = new Element(E_HREF, NamespaceCache.DEFAULT_NAMESPACE);
+ href.setText(getAbsoluteURL(null, contextPath, config.getUsersPath()));
+ xmlValue.add(href);
+ }
return xmlValue;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]