KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ibm > webdav > impl > PropertiesManager


1 package com.ibm.webdav.impl;
2
3 /*
4  * (C) Copyright IBM Corp. 2000 All rights reserved.
5  *
6  * The program is provided "AS IS" without any warranty express or
7  * implied, including the warranty of non-infringement and the implied
8  * warranties of merchantibility and fitness for a particular purpose.
9  * IBM will not be liable for any damages suffered by you as a result
10  * of using the Program. In no event will IBM be liable for any
11  * special, indirect or consequential damages or lost profits even if
12  * IBM has been advised of the possibility of their occurrence. IBM
13  * will not be liable for any third party claims against you.
14  *
15  * Portions Copyright (C) Simulacra Media Ltd, 2004.
16  */

17 import java.io.*;
18 import java.rmi.*;
19
20 import org.w3c.dom.*;
21
22 import com.ibm.webdav.*;
23
24
25 /** PropertiesManager implements all WebDAV property methods that are
26  * dependent on a specific repository manager interface. This manager is
27  * used by ResourceImpl and its subclasses to interface with a particular
28  * repository manager for accessing and controlling resource properties. Implementing
29  * this interface along with NamespaceManager and LockManager is all that
30  * is needed to provide WebDAV access to a particular repository manager.
31  * @author Jim Amsden <jamsden@us.ibm.com>
32  */

33 public interface PropertiesManager {
34 /** Delete all properties.
35 *
36 * @exception com.ibm.webdav.WebDAVException
37 */

38 public void deleteProperties() throws WebDAVException;
39 /** Get all the WebDAV properties WebDAV of the managed resoure.
40 *
41 * @return a MultiStatus of PropertyResponses for the properties of the resouorce.
42 * @exception com.ibm.webdav.WebDAVException
43 */

44 public MultiStatus getProperties() throws WebDAVException;
45 /** Get the named properties for the managed resource.
46 *
47 * @param names an array of property names to retrieve (namespace+localpart)
48 * @return a MultiStatus of PropertyResponses
49 * @exception com.ibm.webdav.WebDAVException
50 */

51
52 public MultiStatus getProperties( PropertyName names[]) throws WebDAVException;
53 /** Get the names of all properties for the managed resource
54 *
55 * @return a MultiStatus of PropertyResponses
56 * (the contained PropertyValue.value is always null, but PropertyValue.status contains the status)
57 * @exception com.ibm.webdav.WebDAVException
58 */

59 public MultiStatus getPropertyNames() throws WebDAVException;
60 /** Initialize this PropertiesManager instance.
61 * @param resource the resource to manager properties for
62 * @param namespaceManager its namespace manager
63 */

64 public void initialize(ResourceImpl resource,
65                        com.ibm.webdav.impl.NamespaceManager namespaceManager);
66 /** Load properties from their persistent store.
67 *
68 * @return an XML document containing a properties element.
69 * @exception com.ibm.webdav.WebDAVException
70 */

71 public Document loadProperties() throws WebDAVException;
72 /** Remove the live DAV properties from the properties document that
73 * do not need to be saved. There is no reason to save them as long
74 * as they are recalculated each time the properties are loaded. This
75 * method removes the ones that are repository specific.
76 *
77 * @param propertiesDocument an XML document containing a properties element.
78 */

79 public void removeLiveProperties(Document propertiesDocument);
80 /** Save the properties to the persistent store.
81 *
82 * @param propertiesDocument an XML document containing a properties element.
83 * @exception com.ibm.webdav.WebDAVException
84 */

85 public void saveProperties(Document propertiesDocument) throws WebDAVException;
86 /** Edit the properties of the managed resource. The updates must refer to a Document containing a WebDAV
87 * propertyupdates element as the document root.
88 *
89 * @param updates an XML Document containing propertyupdate elements
90 * @return a MultiStatus describing the result of the updates
91 * describing the edits to be made
92 * @exception com.ibm.webdav.WebDAVException
93 */

94 public MultiStatus setProperties(Document updates) throws WebDAVException;
95 /** Set a property of the managed resource to a value.
96 *
97 * @param name the property name (namespace+local part of the value element)
98 * @param value the property value
99 * @exception com.ibm.webdav.WebDAVException
100 * @exception IOException
101 * @exception RemoteException
102 */

103 public void setProperty(String JavaDoc name, Element value) throws WebDAVException;
104 /** Update the live properties that are unique to the
105 * repository implementation
106 *
107 * @param document an XML document containing a properties to update.
108 * @exception com.ibm.webdav.WebDAVException
109 */

110 public void updateLiveProperties(Document document) throws WebDAVException;
111 }
112
Popular Tags