Package io.milton.http.values
Class ValueWriters
java.lang.Object
io.milton.http.values.ValueWriters
Default list of value writers. These are used to format strongly types
property values (eg Date, Boolean, Locks) into the appropriate XML
They also parse string values in PROPPATCH requests into the strongly typed
values.
- Author:
- brad
-
Constructor Summary
ConstructorsConstructorDescriptionInitialised the default set of writersValueWriters(List<ValueWriter> valueWriters) Allows the set of value writers to be injected -
Method Summary
Modifier and TypeMethodDescriptionFind the first ValueWriter which supports the given property and use it to parse the valuevoidwriteValue(XmlWriter writer, QName qname, String prefix, ValueAndType vat, String href, Map<String, String> nsPrefixes) Find the first value writer which supports the given property and use it to output the XML.
-
Constructor Details
-
ValueWriters
Allows the set of value writers to be injected- Parameters:
valueWriters-
-
ValueWriters
public ValueWriters()Initialised the default set of writers
-
-
Method Details
-
writeValue
public void writeValue(XmlWriter writer, QName qname, String prefix, ValueAndType vat, String href, Map<String, String> nsPrefixes) Find the first value writer which supports the given property and use it to output the XML.- Parameters:
writer-qname-prefix-vat-href-nsPrefixes-
-
getValueWriters
-
parse
Find the first ValueWriter which supports the given property and use it to parse the value- Parameters:
qname-valueType-value-- Returns:
-