1 package com.bradmcevoy.http;
2
3 /**
4 * Represents support for a given property. The property may be null, blank
5 * or have a value
6 *
7 */
8 public interface CustomProperty {
9
10 /**
11 * Returns a class which is assignable from any value which can be stored
12 * in this property. This should be sufficient to determine a ValueWriter
13 * to parse a PROPPATCH value.
14 *
15 * @return
16 */
17 Class getValueClass();
18
19 /**
20 * Returns the typed value. It should be assumed that this value could
21 * be serialised, although it doesnt require the Serializable interface
22 *
23 * @return
24 */
25 Object getTypedValue();
26
27 /**
28 * Returns a textual representation of the value suitable for consumption
29 * by wedav clients, except that it should not be character encoded as
30 * milton will do that
31 *
32 * @return
33 */
34 String getFormattedValue();
35
36 /**
37 * Set the unencoded string value into this property. This may include
38 * parsing if this is a typed property.
39 *
40 * @param s
41 */
42 void setFormattedValue( String s );
43 }