001: package com.ibm.webdav.impl;
002:
003: /*
004: * (C) Copyright IBM Corp. 2000 All rights reserved.
005: *
006: * The program is provided "AS IS" without any warranty express or
007: * implied, including the warranty of non-infringement and the implied
008: * warranties of merchantibility and fitness for a particular purpose.
009: * IBM will not be liable for any damages suffered by you as a result
010: * of using the Program. In no event will IBM be liable for any
011: * special, indirect or consequential damages or lost profits even if
012: * IBM has been advised of the possibility of their occurrence. IBM
013: * will not be liable for any third party claims against you.
014: *
015: * Portions Copyright (C) Simulacra Media Ltd, 2004.
016: */
017: import java.io.*;
018: import java.rmi.*;
019:
020: import org.w3c.dom.*;
021:
022: import com.ibm.webdav.*;
023:
024: /** PropertiesManager implements all WebDAV property methods that are
025: * dependent on a specific repository manager interface. This manager is
026: * used by ResourceImpl and its subclasses to interface with a particular
027: * repository manager for accessing and controlling resource properties. Implementing
028: * this interface along with NamespaceManager and LockManager is all that
029: * is needed to provide WebDAV access to a particular repository manager.
030: * @author Jim Amsden <jamsden@us.ibm.com>
031: */
032: public interface PropertiesManager {
033: /** Delete all properties.
034: *
035: * @exception com.ibm.webdav.WebDAVException
036: */
037: public void deleteProperties() throws WebDAVException;
038:
039: /** Get all the WebDAV properties WebDAV of the managed resoure.
040: *
041: * @return a MultiStatus of PropertyResponses for the properties of the resouorce.
042: * @exception com.ibm.webdav.WebDAVException
043: */
044: public MultiStatus getProperties() throws WebDAVException;
045:
046: /** Get the named properties for the managed resource.
047: *
048: * @param names an array of property names to retrieve (namespace+localpart)
049: * @return a MultiStatus of PropertyResponses
050: * @exception com.ibm.webdav.WebDAVException
051: */
052:
053: public MultiStatus getProperties(PropertyName names[])
054: throws WebDAVException;
055:
056: /** Get the names of all properties for the managed resource
057: *
058: * @return a MultiStatus of PropertyResponses
059: * (the contained PropertyValue.value is always null, but PropertyValue.status contains the status)
060: * @exception com.ibm.webdav.WebDAVException
061: */
062: public MultiStatus getPropertyNames() throws WebDAVException;
063:
064: /** Initialize this PropertiesManager instance.
065: * @param resource the resource to manager properties for
066: * @param namespaceManager its namespace manager
067: */
068: public void initialize(ResourceImpl resource,
069: com.ibm.webdav.impl.NamespaceManager namespaceManager);
070:
071: /** Load properties from their persistent store.
072: *
073: * @return an XML document containing a properties element.
074: * @exception com.ibm.webdav.WebDAVException
075: */
076: public Document loadProperties() throws WebDAVException;
077:
078: /** Remove the live DAV properties from the properties document that
079: * do not need to be saved. There is no reason to save them as long
080: * as they are recalculated each time the properties are loaded. This
081: * method removes the ones that are repository specific.
082: *
083: * @param propertiesDocument an XML document containing a properties element.
084: */
085: public void removeLiveProperties(Document propertiesDocument);
086:
087: /** Save the properties to the persistent store.
088: *
089: * @param propertiesDocument an XML document containing a properties element.
090: * @exception com.ibm.webdav.WebDAVException
091: */
092: public void saveProperties(Document propertiesDocument)
093: throws WebDAVException;
094:
095: /** Edit the properties of the managed resource. The updates must refer to a Document containing a WebDAV
096: * propertyupdates element as the document root.
097: *
098: * @param updates an XML Document containing propertyupdate elements
099: * @return a MultiStatus describing the result of the updates
100: * describing the edits to be made
101: * @exception com.ibm.webdav.WebDAVException
102: */
103: public MultiStatus setProperties(Document updates)
104: throws WebDAVException;
105:
106: /** Set a property of the managed resource to a value.
107: *
108: * @param name the property name (namespace+local part of the value element)
109: * @param value the property value
110: * @exception com.ibm.webdav.WebDAVException
111: * @exception IOException
112: * @exception RemoteException
113: */
114: public void setProperty(String name, Element value)
115: throws WebDAVException;
116:
117: /** Update the live properties that are unique to the
118: * repository implementation
119: *
120: * @param document an XML document containing a properties to update.
121: * @exception com.ibm.webdav.WebDAVException
122: */
123: public void updateLiveProperties(Document document)
124: throws WebDAVException;
125: }
|