dirkv 01/09/23 06:15:20
Modified: src/webdav/client/src/org/apache/webdav/lib/properties
AclProperty.java LockDiscoveryProperty.java
PrincipalCollectionSetProperty.java
SupportedLockProperty.java
Log:
custom getPropertyAsString methods
Revision Changes Path
1.4 +18 -4
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java
Index: AclProperty.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AclProperty.java 2001/07/21 13:14:34 1.3
+++ AclProperty.java 2001/09/23 13:15:20 1.4
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java,v
1.3 2001/07/21 13:14:34 dirkv Exp $
- * $Revision: 1.3 $
- * $Date: 2001/07/21 13:14:34 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/AclProperty.java,v
1.4 2001/09/23 13:15:20 dirkv Exp $
+ * $Revision: 1.4 $
+ * $Date: 2001/09/23 13:15:20 $
*
* ====================================================================
*
@@ -83,7 +83,7 @@
*
* @author Remy Maucherat
* @author Dirk Verbeeck
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class AclProperty extends BaseProperty {
@@ -230,5 +230,19 @@
privilegeElement.getLocalName(), null);
}
+ public String getPropertyAsString() {
+ Ace[] aces = getAces();
+
+ if (aces.length==0)
+ return "";
+
+ StringBuffer tmp = new StringBuffer(aces[0].toString());
+ for (int i=1; i<aces.length ; i++) {
+ tmp.append(", ");
+ tmp.append(aces[i].toString());
+ }
+
+ return tmp.toString();
+ }
}
1.10 +18 -4
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/LockDiscoveryProperty.java
Index: LockDiscoveryProperty.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/LockDiscoveryProperty.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- LockDiscoveryProperty.java 2001/07/30 20:00:38 1.9
+++ LockDiscoveryProperty.java 2001/09/23 13:15:20 1.10
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/LockDiscoveryProperty.java,v
1.9 2001/07/30 20:00:38 dirkv Exp $
- * $Revision: 1.9 $
- * $Date: 2001/07/30 20:00:38 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/LockDiscoveryProperty.java,v
1.10 2001/09/23 13:15:20 dirkv Exp $
+ * $Revision: 1.10 $
+ * $Date: 2001/09/23 13:15:20 $
*
* ====================================================================
*
@@ -89,7 +89,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Park, Sung-Gu</a>
* @author Remy Maucherat
* @author Dirk Verbeeck
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
*/
public class LockDiscoveryProperty extends BaseProperty {
@@ -230,6 +230,20 @@
}
+ public String getPropertyAsString() {
+ Lock[] locks = getActiveLocks();
+
+ if (locks.length==0)
+ return "";
+
+ StringBuffer tmp = new StringBuffer(locks[0].toString());
+ for (int i=1; i<locks.length ; i++) {
+ tmp.append(", ");
+ tmp.append(locks[i].toString());
+ }
+
+ return tmp.toString();
+ }
}
1.3 +19 -4
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/PrincipalCollectionSetProperty.java
Index: PrincipalCollectionSetProperty.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/PrincipalCollectionSetProperty.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PrincipalCollectionSetProperty.java 2001/07/21 13:14:34 1.2
+++ PrincipalCollectionSetProperty.java 2001/09/23 13:15:20 1.3
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/PrincipalCollectionSetProperty.java,v
1.2 2001/07/21 13:14:34 dirkv Exp $
- * $Revision: 1.2 $
- * $Date: 2001/07/21 13:14:34 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/PrincipalCollectionSetProperty.java,v
1.3 2001/09/23 13:15:20 dirkv Exp $
+ * $Revision: 1.3 $
+ * $Date: 2001/09/23 13:15:20 $
*
* ====================================================================
*
@@ -81,7 +81,7 @@
* defined in the WebDAV Access Control Protocol specification.
*
* @author Dirk Verbeeck
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class PrincipalCollectionSetProperty extends BaseProperty {
@@ -136,5 +136,20 @@
init();
return this.hrefs;
}
+
+ public String getPropertyAsString() {
+ String[] hrefs = getHrefs();
+
+ if (hrefs.length==0)
+ return "";
+
+ StringBuffer tmp = new StringBuffer(hrefs[0]);
+ for (int i=1; i<hrefs.length ; i++) {
+ tmp.append(", ");
+ tmp.append(hrefs[i]);
+ }
+
+ return tmp.toString();
+ }
}
1.4 +18 -5
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/SupportedLockProperty.java
Index: SupportedLockProperty.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/SupportedLockProperty.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SupportedLockProperty.java 2001/07/21 13:14:34 1.3
+++ SupportedLockProperty.java 2001/09/23 13:15:20 1.4
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/SupportedLockProperty.java,v
1.3 2001/07/21 13:14:34 dirkv Exp $
- * $Revision: 1.3 $
- * $Date: 2001/07/21 13:14:34 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/properties/SupportedLockProperty.java,v
1.4 2001/09/23 13:15:20 dirkv Exp $
+ * $Revision: 1.4 $
+ * $Date: 2001/09/23 13:15:20 $
*
* ====================================================================
*
@@ -79,7 +79,7 @@
/**
* @author BC Holmes
* @author <a href="mailto:[EMAIL PROTECTED]">Park, Sung-Gu</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class SupportedLockProperty extends BaseProperty {
@@ -170,7 +170,20 @@
return new Lock(ls, lt);
}
-
+ public String getPropertyAsString() {
+ Lock[] locks = getLockEntries();
+
+ if (locks.length==0)
+ return "";
+
+ StringBuffer tmp = new StringBuffer(locks[0].toString());
+ for (int i=1; i<locks.length ; i++) {
+ tmp.append(", ");
+ tmp.append(locks[i].toString());
+ }
+
+ return tmp.toString();
+ }
}