remm 01/03/28 14:26:02
Modified: src/webdav/server/org/apache/slide/webdav/method
PropFindMethod.java
Log:
- Should now be possible to extend the PROPFIND method handler.
Revision Changes Path
1.17 +46 -46
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropFindMethod.java
Index: PropFindMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropFindMethod.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- PropFindMethod.java 2001/03/28 06:05:41 1.16
+++ PropFindMethod.java 2001/03/28 22:26:00 1.17
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropFindMethod.java,v
1.16 2001/03/28 06:05:41 msmith Exp $
- * $Revision: 1.16 $
- * $Date: 2001/03/28 06:05:41 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PropFindMethod.java,v
1.17 2001/03/28 22:26:00 remm Exp $
+ * $Revision: 1.17 $
+ * $Date: 2001/03/28 22:26:00 $
*
* ====================================================================
*
@@ -87,7 +87,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Remy Maucherat</a>
*/
-public final class PropFindMethod extends WebdavMethod {
+public class PropFindMethod extends WebdavMethod {
// -------------------------------------------------------------- Constants
@@ -96,37 +96,37 @@
/**
* Root node URI.
*/
- private static final String DIRECTORY = "/";
+ protected static final String DIRECTORY = "/";
/**
* Default depth is infite.
*/
- private static final int INFINITY = 3; // To limit tree browsing a bit
+ protected static final int INFINITY = 3; // To limit tree browsing a bit
/**
* Specify a property mask.
*/
- private static final int FIND_BY_PROPERTY = 0;
+ protected static final int FIND_BY_PROPERTY = 0;
/**
* Display all properties.
*/
- private static final int FIND_ALL_PROP = 1;
+ protected static final int FIND_ALL_PROP = 1;
/**
* Return property names.
*/
- private static final int FIND_PROPERTY_NAMES = 2;
+ protected static final int FIND_PROPERTY_NAMES = 2;
/**
* Supported locks property value.
*/
- private static final String SUPPORTED_LOCK = "<lockentry>"
+ protected static final String SUPPORTED_LOCK = "<lockentry>"
+ "<lockscope><exclusive/></lockscope>"
+ "<locktype><write/></locktype>"
+ "</lockentry>"
@@ -139,14 +139,14 @@
/**
* Supported privilege set.
*/
- private static final String SUPPORTED_PRIVILEGE_SET =
+ protected static final String SUPPORTED_PRIVILEGE_SET =
"supported-privilege-set";
/**
* Supported privileges.
*/
- private static final String SUPPORTED_PRIVILEGES =
+ protected static final String SUPPORTED_PRIVILEGES =
"<supported-privilege>"
+ "<privilege><all/></privilege>"
+ "<abstract/>"
@@ -173,7 +173,7 @@
/**
* ACL semantics.
*/
- private static final String SLIDE_ACL_SEMANTICS =
+ protected static final String SLIDE_ACL_SEMANTICS =
"<acl-sem>"
+ "<ace-combination><no-deny/></ace-combination>"
+ "</acl-sem>"
@@ -191,63 +191,63 @@
/**
* Current user privilege set.
*/
- private static final String CURRENT_USER_PRIVILEGE_SET =
+ protected static final String CURRENT_USER_PRIVILEGE_SET =
"current-user-privilege-set";
/**
* Principal collection set.
*/
- private static final String PRINCIPAL_COLLECTION_SET =
+ protected static final String PRINCIPAL_COLLECTION_SET =
"principal-collection-set";
/**
* ACL semantics.
*/
- private static final String ACL_SEMANTICS = "acl-semantics";
+ protected static final String ACL_SEMANTICS = "acl-semantics";
/**
* ACL.
*/
- private static final String ACL = "acl";
+ protected static final String ACL = "acl";
/**
* ACE.
*/
- private static final String ACE = "ace";
+ protected static final String ACE = "ace";
/**
* GRANT.
*/
- private static final String GRANT = "grant";
+ protected static final String GRANT = "grant";
/**
* DENY.
*/
- private static final String DENY = "deny";
+ protected static final String DENY = "deny";
/**
* PRINCIPAL.
*/
- private static final String PRINCIPAL = "principal";
+ protected static final String PRINCIPAL = "principal";
/**
* PRIVILEGE.
*/
- private static final String PRIVILEGE = "privilege";
+ protected static final String PRIVILEGE = "privilege";
/**
* INHERITED.
*/
- private static final String INHERITED = "inherited";
+ protected static final String INHERITED = "inherited";
// ----------------------------------------------------- Instance Variables
@@ -256,37 +256,37 @@
/**
* Depth.
*/
- private int depth;
+ protected int depth;
/**
* Type of the PROPFIND method.
*/
- private int propFindType;
+ protected int propFindType;
/**
* Properties to display
*/
- private Vector propertyVector;
+ protected Vector propertyVector;
/**
* MS Proprietary properties support.
*/
- private boolean msProprietarySupport;
+ protected boolean msProprietarySupport;
/**
* Current namespace number used to generate namespace abbreviations.
*/
- private int namespaceNumber = 0;
+ protected int namespaceNumber = 0;
/**
* Namespaces list. Keyed by namespace names.
*/
- private Hashtable namespaceAbbrevs;
+ protected Hashtable namespaceAbbrevs;
// ----------------------------------------------------------- Constructors
@@ -319,7 +319,7 @@
* @exception WebdavException Bad request
*/
protected void parseRequest()
- throws WebdavException {
+ throws WebdavException {
msProprietarySupport = isMsProprietarySupport();
@@ -906,7 +906,7 @@
}
- // -------------------------------------------------------- Private Methods
+ // ------------------------------------------------------ Protected Methods
/**
@@ -915,7 +915,7 @@
* @param node The DOM node to parse
* @return The corresponding Property object
*/
- private Property getProperty(Node node) {
+ protected Property getProperty(Node node) {
Property property = new Property();
@@ -946,7 +946,7 @@
*
* @param namespaceName Name of the namespace
*/
- private void generateNamespaceAbbreviation(String namespaceName) {
+ protected void generateNamespaceAbbreviation(String namespaceName) {
if (namespaceAbbrevs.get(namespaceName) != null)
return;
@@ -968,7 +968,7 @@
*
* @return String namespace attributes
*/
- private String generateNamespaceDeclarations() {
+ protected String generateNamespaceDeclarations() {
StringBuffer result = new StringBuffer();
@@ -994,8 +994,8 @@
*
* @exception WebdavException Something is wrong with the servlet container
*/
- private void showLockDiscoveryInfo(NodeLock token,
- XMLPrinter generatedXML)
+ protected void showLockDiscoveryInfo(NodeLock token,
+ XMLPrinter generatedXML)
throws WebdavException {
generatedXML.writeElement(null, "lockdiscovery", XMLPrinter.OPENING);
@@ -1056,7 +1056,7 @@
/**
* WebDAV ACL DAV:supported-privilege-set property.
*/
- private void showSupportedPrivilegeSet(XMLPrinter generatedXML)
+ protected void showSupportedPrivilegeSet(XMLPrinter generatedXML)
throws WebdavException {
generatedXML.writeElement(null, SUPPORTED_PRIVILEGE_SET,
@@ -1076,7 +1076,7 @@
/**
* WebDAV ACL DAV:current-user-privilege-set property.
*/
- private void showCurrentUserPrivilegeSet
+ protected void showCurrentUserPrivilegeSet
(ObjectNode object, XMLPrinter generatedXML)
throws WebdavException {
@@ -1190,8 +1190,8 @@
/**
* Write a privilege.
*/
- private void writePrivilege(XMLPrinter generatedXML, String privilege,
- String namespace) {
+ protected void writePrivilege(XMLPrinter generatedXML, String privilege,
+ String namespace) {
generatedXML.writeElement(null, "privilege", XMLPrinter.OPENING);
generatedXML.writeElement(namespace, privilege, XMLPrinter.NO_CONTENT);
generatedXML.writeElement(null, "privilege", XMLPrinter.CLOSING);
@@ -1201,7 +1201,7 @@
/**
* WebDAV ACL DAV:acl property.
*/
- private void showAcl(ObjectNode object, XMLPrinter generatedXML)
+ protected void showAcl(ObjectNode object, XMLPrinter generatedXML)
throws WebdavException {
generatedXML.writeElement(null, ACL, XMLPrinter.OPENING);
@@ -1445,7 +1445,7 @@
/**
* Write principal.
*/
- private void writePrincipal(XMLPrinter generatedXML, String principal) {
+ protected void writePrincipal(XMLPrinter generatedXML, String principal) {
generatedXML.writeElement(null, PRINCIPAL, XMLPrinter.OPENING);
// FIXME: Apparently, there are or will be some other cases, but it
// isn't very clear in the spec
@@ -1466,7 +1466,7 @@
/**
* Write grant / deny.
*/
- private void writePrivilege(XMLPrinter generatedXML, String name,
+ protected void writePrivilege(XMLPrinter generatedXML, String name,
boolean standard) {
generatedXML.writeElement(null, PRIVILEGE, XMLPrinter.OPENING);
if (standard) {
@@ -1482,7 +1482,7 @@
/**
* WebDAV ACL DAV:acl-semantics property.
*/
- private void showAclSemantics(XMLPrinter generatedXML) {
+ protected void showAclSemantics(XMLPrinter generatedXML) {
generatedXML.writeElement(null, ACL_SEMANTICS, XMLPrinter.OPENING);
generatedXML.writeText(SLIDE_ACL_SEMANTICS);
generatedXML.writeElement(null, ACL_SEMANTICS, XMLPrinter.CLOSING);
@@ -1492,7 +1492,7 @@
/**
* WebDAV ACL DAV:principal-collection-set property.
*/
- private void showPrincipalCollectionSet(XMLPrinter generatedXML) {
+ protected void showPrincipalCollectionSet(XMLPrinter generatedXML) {
NamespaceConfig config = token.getNamespaceConfig();
generatedXML.writeElement(null, PRINCIPAL_COLLECTION_SET,
XMLPrinter.OPENING);
@@ -1507,7 +1507,7 @@
// --------------------------------------------------- Property Inner Class
- private class Property {
+ protected class Property {
public String name;
public String value;