com.ca.jcs.converter.attr
Class JavaObjectAttributeConverter

java.lang.Object
  extended by com.ca.jcs.converter.attr.AttributeValueConverter
      extended by com.ca.jcs.converter.attr.StructuralAttributeConverter
          extended by com.ca.jcs.converter.attr.JavaObjectAttributeConverter
All Implemented Interfaces:
AttributeConverter

public class JavaObjectAttributeConverter
extends StructuralAttributeConverter

Convert values for attribute to the Java Object matching the value type specified for their DataModelProperty. Attributes with multiple values are wrapped into a single ArrayList value in the toConnector direction (this also happens for single values when forceWrapInCollection is true). In the fromConnector direction, any Collection value is unwrapped into multiple attribute values prior to doing the reverse low-level conversion.


Constructor Summary
JavaObjectAttributeConverter(DataModelType type, boolean multiValued)
           
 
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.
 DataModelValue.ConversionSettings getConversionSettings()
           
 boolean isForceWrapInCollection()
           
 void setConversionSettings(DataModelValue.ConversionSettings cs)
          Delegate down to underlying JavaObjectConverter.
 void setForceWrapInCollection(boolean forceWrapInCollection)
           
 
Methods inherited from class com.ca.jcs.converter.attr.AttributeValueConverter
getConverter, isLossy, isMultiValued, isStructural, setConverter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaObjectAttributeConverter

public JavaObjectAttributeConverter(DataModelType type,
                                    boolean multiValued)
Method Detail

isForceWrapInCollection

public boolean isForceWrapInCollection()

setForceWrapInCollection

public void setForceWrapInCollection(boolean forceWrapInCollection)

convertToConnector

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

Specified by:
convertToConnector in interface AttributeConverter
Overrides:
convertToConnector in class AttributeValueConverter
Throws:
NamingException

convertFromConnector

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

Specified by:
convertFromConnector in interface AttributeConverter
Overrides:
convertFromConnector in class AttributeValueConverter
Throws:
NamingException

getConversionSettings

public DataModelValue.ConversionSettings getConversionSettings()

setConversionSettings

public void setConversionSettings(DataModelValue.ConversionSettings cs)
Delegate down to underlying JavaObjectConverter.



Created 2011-07-14 13:27 EST