pnever 2003/10/13 09:55:42
Modified: src/webdav/server/org/apache/slide/webdav/util
PropertyHelper.java AclConstants.java
src/webdav/server/org/apache/slide/webdav/util/resourcekind
AbstractResourceKind.java DeltavCompliantImpl.java
PrincipalImpl.java
src/webdav/server/org/apache/slide/webdav/method
ReportMethod.java
Log:
Preparing for support of ACL-Draft 12
Revision Changes Path
1.54 +3 -45
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.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- PropertyHelper.java 10 Oct 2003 11:30:28 -0000 1.53
+++ PropertyHelper.java 13 Oct 2003 16:55:42 -0000 1.54
@@ -634,9 +634,6 @@
else if (P_ACL.equals(propertyName)) {
property = new NodeProperty(propertyName,
computeAcl(revisionDescriptors, revisionDescriptor, contextPath, serverURL));
}
- else if (P_ACL_SEMANTICS.equals(propertyName)) {
- property = new NodeProperty(propertyName,
computeAclSemantics(revisionDescriptors, revisionDescriptor, contextPath, serverURL));
- }
else if (P_PRINCIPAL_COLLECTION_SET.equals(propertyName)) {
property = new NodeProperty(propertyName,
computePrincipalCollectionSet(revisionDescriptors, revisionDescriptor, contextPath,
serverURL));
}
@@ -2017,45 +2014,6 @@
}
return principal;
- }
-
- /**
- * Returns an XMLValue containing the value of the
- * <code><acl-semantics></code> property.
- *
- * @param revisionDescriptors the NodeRevisionDescriptors of the resource.
- * @param revisionDescriptor the NodeRevisionDescriptor of the resource.
- * @param contextPath the context path of the
NodeRevisionDescriptors' uri.
- * The concatenation of <code>serverURL</code>/
- *
<code>contextPath</code>/<code>revisionDescriptor.getUri()</code>
- * gives the absolute URL of the resource.
- * @param serverURL the URL of the server (e.g.
<code>http://www.abc.com</code>).
- *
- * @return the value of the <code><acl-semantics></code> property.
- *
- * @throws ObjectLockedException
- * @throws RevisionDescriptorNotFoundException
- * @throws ServiceAccessException
- * @throws LinkedObjectNotFoundException
- * @throws AccessDeniedException
- * @throws ObjectNotFoundException
- * @throws JDOMException
- */
- public XMLValue computeAclSemantics(NodeRevisionDescriptors
revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, String contextPath,
String serverURL) throws ObjectLockedException, RevisionDescriptorNotFoundException,
ServiceAccessException, LinkedObjectNotFoundException, AccessDeniedException,
ObjectNotFoundException, LockTokenNotFoundException, JDOMException {
-
- XMLValue xmlValue = new XMLValue();
-
- Element aceCombination = new Element(E_ACE_COMBINATION,
NamespaceCache.DEFAULT_NAMESPACE);
- xmlValue.add(aceCombination);
- Element allGrantBeforeDeny = new Element(E_ALL_GRANT_BEFORE_DENY,
NamespaceCache.DEFAULT_NAMESPACE);
- aceCombination.addContent(allGrantBeforeDeny);
-
- Element requiredPrincipal = new Element(E_REQUIRED_PRINCIPAL,
NamespaceCache.DEFAULT_NAMESPACE);
- xmlValue.add(requiredPrincipal);
- Element all = new Element(E_ALL, NamespaceCache.DEFAULT_NAMESPACE);
- requiredPrincipal.addContent(all);
-
- return xmlValue;
}
1.17 +19 -14
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/AclConstants.java
Index: AclConstants.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/AclConstants.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- AclConstants.java 22 Sep 2003 15:48:56 -0000 1.16
+++ AclConstants.java 13 Oct 2003 16:55:42 -0000 1.17
@@ -76,6 +76,11 @@
*/
public interface AclConstants extends WebdavConstants {
+ /** Internal constants */
+ String P_USER_COLLECTION = "user_collection";
+ String P_GROUP_COLLECTION = "group_collection";
+ String P_ROLE_COLLECTION = "role_collection";
+
/** Resource Kinds */
String K_PRINCIPAL = "principal";
@@ -84,31 +89,31 @@
/** Live Properties */
String P_ALTERNATE_URI_SET = "alternate-URI-set";
+ String P_PRINCIPAL_URL = "principal-URL";
+ String P_GROUP_MEMBER_SET = "group-member-set";
+ String P_GROUP_MEMBERSHIP = "group-membership";
String P_OWNER = "owner";
String P_MODIFICATIONUSER = "modificationuser";
String P_SUPPORTED_PRIVILEGE_SET = "supported-privilege-set";
String P_CURRENT_USER_PRIVILEGE_SET = "current-user-privilege-set";
String P_ACL = "acl";
- String P_ACL_SEMANTICS = "acl-semantics";
+ String P_ACL_RESTRICTIONS = "acl-restrictions";
+ String P_INHERITED_ACL_SET = "inherited-acl-set";
String P_PRINCIPAL_COLLECTION_SET = "principal-collection-set";
- String P_ACE = "ace";
- String P_USER_COLLECTION = "user_collection";
- String P_GROUP_COLLECTION = "group_collection";
- String P_ROLE_COLLECTION = "role_collection";
- String P_PRINCIPAL_URL = "principal-URL";
- String P_GROUP_MEMBERSHIP = "group-membership";
- String P_GROUP_MEMBER_SET = "group-member-set";
String[] ACL_PROPERTIES = new String[] {
P_ALTERNATE_URI_SET,
+ P_PRINCIPAL_URL,
+ P_GROUP_MEMBER_SET,
+ P_GROUP_MEMBERSHIP,
P_OWNER,
P_MODIFICATIONUSER,
P_SUPPORTED_PRIVILEGE_SET,
P_CURRENT_USER_PRIVILEGE_SET,
P_ACL,
- P_ACL_SEMANTICS,
- P_PRINCIPAL_COLLECTION_SET,
- P_ACE
+ P_ACL_RESTRICTIONS,
+ P_INHERITED_ACL_SET,
+ P_PRINCIPAL_COLLECTION_SET
};
List ACL_PROPERTY_LIST =
Collections.unmodifiableList(Arrays.asList(ACL_PROPERTIES));
1.22 +7 -4
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/resourcekind/AbstractResourceKind.java
Index: AbstractResourceKind.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/resourcekind/AbstractResourceKind.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- AbstractResourceKind.java 18 Sep 2003 11:01:43 -0000 1.21
+++ AbstractResourceKind.java 13 Oct 2003 16:55:42 -0000 1.22
@@ -185,7 +185,6 @@
// Computed properties
computedProperties.add( P_ACL);
- computedProperties.add( P_ACL_SEMANTICS);
computedProperties.add( P_ACTIVITY_CHECKOUT_SET );
computedProperties.add( P_ACTIVITY_VERSION_SET );
computedProperties.add( P_BASELINE_CONTROLLED_COLLECTION_SET );
@@ -210,6 +209,8 @@
// Protected properties
protectedProperties.addAll( computedProperties );
+ protectedProperties.add( P_ACL_RESTRICTIONS ); // TODO: make computed
+ protectedProperties.add( P_ALTERNATE_URI_SET ); // TODO: make computed??
protectedProperties.add( P_AUTO_UPDATE );
protectedProperties.add( P_BASELINE_COLLECTION );
protectedProperties.add( P_BASELINE_CONTROLLED_COLLECTION );
@@ -222,6 +223,8 @@
// protectedProperties.add( P_GETCONTENTTYPE ); // so what ... let the
client set the content-type via PROPPATCH
protectedProperties.add( P_GETCONTENTLENGTH );
protectedProperties.add( P_GETETAG );
+ protectedProperties.add( P_GROUP_MEMBERSHIP ); // TODO: make computed??
+ protectedProperties.add( P_INHERITED_ACL_SET ); // TODO: make computed
protectedProperties.add( P_LABEL_NAME_SET );
protectedProperties.add( P_PARENT_SET );
protectedProperties.add( P_PREDECESSOR_SET );
1.6 +7 -4
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/resourcekind/DeltavCompliantImpl.java
Index: DeltavCompliantImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/resourcekind/DeltavCompliantImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DeltavCompliantImpl.java 18 Aug 2003 07:04:56 -0000 1.5
+++ DeltavCompliantImpl.java 13 Oct 2003 16:55:42 -0000 1.6
@@ -97,6 +97,7 @@
public Set getSupportedLiveProperties( String[] excludedFeatures ) {
Set s = super.getSupportedLiveProperties( excludedFeatures );
s.add( P_CREATIONDATE );
+ s.add( P_MODIFICATIONDATE );
s.add( P_DISPLAYNAME );
s.add( P_GETCONTENTLANGUAGE );
s.add( P_GETCONTENTLENGTH );
@@ -111,10 +112,12 @@
}
if( isSupportedFeature(F_ACCESS_CONTROL, excludedFeatures) ) {
s.add( P_OWNER );
+ s.add( P_MODIFICATIONUSER );
s.add( P_SUPPORTED_PRIVILEGE_SET );
s.add( P_CURRENT_USER_PRIVILEGE_SET );
s.add( P_ACL );
- s.add( P_ACL_SEMANTICS );
+ s.add( P_ACL_RESTRICTIONS );
+ s.add( P_INHERITED_ACL_SET );
s.add( P_PRINCIPAL_COLLECTION_SET );
}
if (isSupportedFeature(F_BINDING, excludedFeatures)) {
1.7 +23 -3
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/resourcekind/PrincipalImpl.java
Index: PrincipalImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/resourcekind/PrincipalImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- PrincipalImpl.java 14 Aug 2002 15:36:39 -0000 1.6
+++ PrincipalImpl.java 13 Oct 2003 16:55:42 -0000 1.7
@@ -84,6 +84,26 @@
*/
protected PrincipalImpl() {
}
+
+ /**
+ * Get the set properties supported by this resource kind.
+ * @param filter Q_PROTECTED_ONLY or Q_COMPUTED_ONLY (no filtering if null)
+ * @param excludedFeatures array of F_* constants (no filtering if null or
empty)
+ * @see org.apache.slide.webdav.util.WebdavConstants
+ * @see org.apache.slide.webdav.util.DeltavConstants
+ * @see org.apache.slide.webdav.util.AclConstants
+ * @see org.apache.slide.webdav.util.DaslConstants
+ */
+ public Set getSupportedLiveProperties( String[] excludedFeatures ) {
+ Set s = super.getSupportedLiveProperties( excludedFeatures );
+ if( isSupportedFeature(F_ACCESS_CONTROL, excludedFeatures) ) {
+ s.add( P_ALTERNATE_URI_SET );
+ s.add( P_PRINCIPAL_URL );
+ s.add( P_GROUP_MEMBER_SET );
+ s.add( P_GROUP_MEMBERSHIP );
+ }
+ return s;
+ }
/**
*
1.58 +5 -5
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/ReportMethod.java
Index: ReportMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/ReportMethod.java,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- ReportMethod.java 18 Sep 2003 11:01:07 -0000 1.57
+++ ReportMethod.java 13 Oct 2003 16:55:42 -0000 1.58
@@ -1032,7 +1032,7 @@
acl = aclprops.getChild(P_ACL, NamespaceCache.DEFAULT_NAMESPACE);
} else return;
- aces = acl.getChildren(P_ACE, NamespaceCache.DEFAULT_NAMESPACE);
+ aces = acl.getChildren(E_ACE, NamespaceCache.DEFAULT_NAMESPACE);
// get Principals
Iterator aceIter = aces.iterator();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]