com.ca.jcs.converter.attr
Class MultiValueFlattener
java.lang.Object
com.ca.jcs.converter.attr.MultiValueFlattener
- All Implemented Interfaces:
- AttributeConverter
- Direct Known Subclasses:
- CommaSeparatedMultiValueFlattener, XMLMultiValueFlattener
public abstract class MultiValueFlattener
- extends Object
- implements AttributeConverter
Base class for flatteners which convert a list of values to a single
literal, and vice-versa.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiValueFlattener
public MultiValueFlattener()
isMultiValued
public boolean isMultiValued()
- Specified by:
isMultiValued in interface AttributeConverter
isStructural
public boolean isStructural()
- Description copied from interface:
AttributeConverter
- Returns true if the converter performs a change to the structure of an attribute's values, rather then just transforming individual values themselves.
For instance changing a multi-valued attribute into a String[] is a structural conversion.
- Specified by:
isStructural in interface AttributeConverter
getConverter
public Converter getConverter()
- Description copied from interface:
AttributeConverter
- Can be null for some structural converters.
- Specified by:
getConverter in interface AttributeConverter
isForceWrap
public boolean isForceWrap()
- Return true if even a single value needs to be specially wrapped (the default), override in concrete
converter if this should not be the case.
getStyle
public abstract String getStyle()
writeStart
protected abstract void writeStart(StringWriter writer)
writeValue
protected abstract void writeValue(StringWriter writer,
String value,
boolean firstValue)
writeEnd
protected abstract void writeEnd(StringWriter writer)
convertToString
public String convertToString(Attribute attr)
convertToConnector
public void convertToConnector(Attribute attr)
throws NamingException
- Specified by:
convertToConnector in interface AttributeConverter
- Throws:
NamingException
Created 2009-10-09 16:43 EST