|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.sdk.converter.DemoFlattenAttributeConverter
public class DemoFlattenAttributeConverter
A demo flattener that flattens multiple values into a single string literal separated by a
configured valueSeparator string (refer to comments in DemoFlattenPropertyConverter.
Because of the job this converter does it has the following features worthy of special mention:
Converter underneath it as it does its
job on an entire set of attribute values without needing to convert individual ones.
Note that this converter is for demo purposes only as there are a number of production converters included
in the JCS framework which are more useful (refer to
XMLMultiValuePropertyFlattener and other related classes).
| Constructor Summary | |
|---|---|
DemoFlattenAttributeConverter(String valueSeparator)
|
|
| Method Summary | |
|---|---|
void |
convertFromConnector(Attribute connAttr)
Perform the reverse operation of taking a single string literal value stored on the managed native system and splitting it back up in possibly multiple values for the provided attribute. |
void |
convertToConnector(Attribute attr)
Flatten the values for attr into a single string literal (if it has two or more), otherwise
leave it unchanged, for storage on a the managed native system. |
Converter |
getConverter()
Not required by most structural converters. |
boolean |
isLossy()
Returns true if the converter performs a lossy attribute value conversion |
boolean |
isMultiValued()
|
boolean |
isStructural()
Returns true if the converter performs a change to the structure of an attribute's values, rather then just transforming individual values themselves. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DemoFlattenAttributeConverter(String valueSeparator)
| Method Detail |
|---|
public void convertToConnector(Attribute attr)
throws NamingException
attr into a single string literal (if it has two or more), otherwise
leave it unchanged, for storage on a the managed native system. Note that these values are first sorted in
lexicographical order.
convertToConnector in interface AttributeConverterattr - Attribute whosse values need to be flattended.
NamingException
public void convertFromConnector(Attribute connAttr)
throws NamingException
convertFromConnector in interface AttributeConverterconnAttr - Attribute whose value is to be possibly split.
NamingExceptionpublic boolean isMultiValued()
isMultiValued in interface AttributeConverterpublic boolean isStructural()
AttributeConverter
isStructural in interface AttributeConverterpublic boolean isLossy()
AttributeConverter
isLossy in interface AttributeConverterpublic Converter getConverter()
getConverter in interface AttributeConverter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||