KickJava   Java API By Example, From Geeks To Geeks.

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


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 com.ibm.webdav.*;
18
19
20 /** A LiveProperty represents some property whose semantics is controlled
21  * or managed in some way by the server. A live property may be considered
22  * an abstraction of a function call for properties. There are a number of
23  * contributors of live properties including:
24  * <ul>
25  * <li>WebDAV defined live properties that are independent of any repository manager</li>
26  * <li>live properties that are specific to a particular repository manager</li>
27  * <li>user defined live properties</li>
28  * </ul></p>
29  * <p>
30  * Subclasses provide the specifics for each live property.
31  * @author Jim Amsden &lt;jamsden@us.ibm.com&gt;
32  * @see com.ibm.webdav.PropertyValue
33  * @see com.ibm.webdav.impl.ResourceImpl#updateLiveProperties
34  * @see com.ibm.webdav.impl.ResourceImpl#removeLiveProperties
35  * @see com.ibm.webdav.impl.PropertiesManager#updateLiveProperties
36  * @see com.ibm.webdav.impl.PropertiesManager#removeLiveProperties
37  */

38 public abstract class LiveProperty extends Object JavaDoc {
39 /**
40  * Get the name of this live property.
41  * @return the live property name (XML namespace+localpart)
42  */

43 public String JavaDoc getName() {
44     return getNSName()+getNSLocalName();
45 }
46 /**
47  * Get the XML tag name (without a prefix) of this live property.
48  * @return the live property tag name without a prefix
49  */

50 public abstract String JavaDoc getNSLocalName();
51 /**
52  * Get the XML namespace name (not the prefix) of this live property.
53  * The default is "DAV:". Subclasses may want to override this method
54  * with their specific namespace name.
55  * @return the live property namespace name
56  */

57 public String JavaDoc getNSName() {
58     return "DAV:";
59 }
60 /**
61  * Get the preferred namespace prefix for this live property.
62  * @return the XML namespace prefix for this property
63  */

64 public abstract String JavaDoc getPreferredPrefix();
65 /**
66  * Get the value of this live property.
67  * @return the live property value
68  */

69 public abstract PropertyValue getValueFor(ResourceImpl resource);
70 /**
71  * Is this live property updatable by the user?
72  * @return true if the use can update this live property, false if only
73  * the server can update the property.
74  */

75 public abstract boolean isUserUpdatable();
76 }
77
Popular Tags