com.ca.jcs.converter.attr
Class AttributeValueConverter

java.lang.Object
  extended by com.ca.jcs.converter.attr.AttributeValueConverter
All Implemented Interfaces:
AttributeConverter
Direct Known Subclasses:
BoolAttributeConverter, DNAttributeConverter, EncryptAttributeConverter, ForceCaseAttributeConverter, GeneralizedTimeAttributeConverter, MapAttributeConverter, NumericBaseAttributeConverter, PadAttributeConverter, RegexAttributeConverter, StructuralAttributeConverter, TimeNumericPropertyConverter.TimeNumericAttributeConverter, TrimAttributeConverter, XMLSQLDateTimeAttributeConverter, XMLSQLTimeAttributeConverter

public class AttributeValueConverter
extends Object
implements AttributeConverter

Destructively convert all of an attributes values, either to suit connector (toConnector) or back to JCS standard format (fromConnector).


Constructor Summary
AttributeValueConverter(Converter converter)
           
AttributeValueConverter(Converter converter, boolean multiValued, boolean structural)
           
AttributeValueConverter(Converter converter, boolean multiValued, boolean structural, boolean lossy)
           
 
Method Summary
 void convertFromConnector(Attribute connAttr)
          Convert connAttr's values from connector-speak to LDAP.
 void convertToConnector(Attribute attr)
          Convert attr's values from LDAP to connector-speak.
 Converter getConverter()
          Returns lower level core converter to which this converter delegates single-value conversions.
 boolean isLossy()
          Returns true for converters that are "lossy" where a converted value will not be convertible back to its input form
 boolean isMultiValued()
          Returns true if converter specifically targets multi-valued attributes, of interest when isStructural() returns true.
 boolean isStructural()
          Returns true for structural converters modify the structural form of an attribute, rather then just the syntax of its values.
protected  void setConverter(Converter converter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeValueConverter

public AttributeValueConverter(Converter converter,
                               boolean multiValued,
                               boolean structural,
                               boolean lossy)

AttributeValueConverter

public AttributeValueConverter(Converter converter,
                               boolean multiValued,
                               boolean structural)

AttributeValueConverter

public AttributeValueConverter(Converter converter)
Method Detail

isMultiValued

public boolean isMultiValued()
Returns true if converter specifically targets multi-valued attributes, of interest when isStructural() returns true.

Specified by:
isMultiValued in interface AttributeConverter

isStructural

public boolean isStructural()
Returns true for structural converters modify the structural form of an attribute, rather then just the syntax of its values. For example refer to StringArrayAttributeConverter.

Specified by:
isStructural in interface AttributeConverter

isLossy

public boolean isLossy()
Returns true for converters that are "lossy" where a converted value will not be convertible back to its input form

Specified by:
isLossy in interface AttributeConverter

setConverter

protected void setConverter(Converter converter)

getConverter

public Converter getConverter()
Returns lower level core converter to which this converter delegates single-value conversions.

Specified by:
getConverter in interface AttributeConverter

convertToConnector

public void convertToConnector(Attribute attr)
                        throws NamingException
Convert attr's values from LDAP to connector-speak.

Specified by:
convertToConnector in interface AttributeConverter
Throws:
NamingException

convertFromConnector

public void convertFromConnector(Attribute connAttr)
                          throws NamingException
Convert connAttr's values from connector-speak to LDAP.

Specified by:
convertFromConnector in interface AttributeConverter
Throws:
NamingException


Created 2011-07-14 13:27 EST