|
||||||||||
| PREV CLASS NEXT CLASS | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.jcs.converter.eval.PropertyConverters
public class PropertyConverters
Stored for each property that requires one or more conversions be applied to it.
| Constructor Summary | |
|---|---|
PropertyConverters()
|
|
| Method Summary | |
|---|---|
boolean |
applyFlatten(Attribute unflattenedConnAttr)
|
String |
applyToLiteral(String value,
boolean toConnector,
Converter.ConverterFlag flag)
Apply all contained non-structural converters to the provided value, in the direction specified
by toConnector. |
boolean |
applyUnflatten(Attribute attr)
Undoes changes performed by any multi-valued structural converters for this property (including flatteners), but performs no other un-conversions. |
void |
checkSanityConnectorDependantConverters(MetaObjectClassMappings classMaps)
|
static void |
convertAttribute(MetaObjectClassMapping classMap,
Attribute attr,
boolean toConnector,
boolean runStructural)
Run all converters that apply on a single attribute in either direction |
static void |
convertAttributes(MetaObjectClassMapping classMap,
Attributes attrs,
boolean toConnector)
Handle conversion of attributes in either direction, as dictated by the toConnector - including management of ConverterValueCache. |
static ModificationItem[] |
convertModificationItems(ObjectInfo objInfo,
ModificationItem[] items,
LazyConnectorAttributesProxy attrs)
Run all relevant converters on items passed to modify operation, using attrs if
need to access current state of the target object. |
List<MetaPluginConfig> |
getClassConverterConfigs()
|
static PropertyConverters |
getConvertersForAttr(MetaObjectClassMapping classMap,
Attribute attr)
Get all converters that are registered for a single attribute (attribute id in LDAP-speak) |
static PropertyConverters |
getConvertersForLdapAttrId(MetaObjectClassMapping classMap,
String attrId)
Obtain converters for an LDAP-speak attribute ID that are registered |
boolean |
getHasConnectorDependantConverter()
At least one contained converter implements ConnectorDependantAttributeConverter. |
List<PropertyConverter> |
getPropertyConverters()
|
AttributeConverter |
getValueConverter()
|
static ModificationItem[] |
normalizeModificationItemOps(ObjectInfo objInfo,
boolean inConnectorSpeak,
ModificationItem[] items,
LazyConnectorAttributesProxy attrs)
Normalize the provided modification items, which may involve changing the modification op (and hence provided attribute's value list) for any multi-valued properties which have the MetaDataDefs.MD_FORCE_MOD_MODE metadata setting provided, as well as for single-valued
properties being modified with modes other then DirContext.REPLACE_ATTRIBUTE. |
void |
registerConnectorWithDependantConverters(MetaConnector connector)
|
void |
setClassConverterConfigs(List<MetaPluginConfig> convClasses)
|
void |
setPropertyConverters(List<PropertyConverter> pvs)
|
void |
setValueConverter(AttributeConverter valueConverter)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyConverters()
| Method Detail |
|---|
public boolean getHasConnectorDependantConverter()
ConnectorDependantAttributeConverter.
public List<PropertyConverter> getPropertyConverters()
public void setPropertyConverters(List<PropertyConverter> pvs)
public AttributeConverter getValueConverter()
public void setValueConverter(AttributeConverter valueConverter)
public List<MetaPluginConfig> getClassConverterConfigs()
public void setClassConverterConfigs(List<MetaPluginConfig> convClasses)
public boolean applyUnflatten(Attribute attr)
throws NamingException
NamingException
public boolean applyFlatten(Attribute unflattenedConnAttr)
throws NamingException
NamingException
public String applyToLiteral(String value,
boolean toConnector,
Converter.ConverterFlag flag)
throws NamingException
value, in the direction specified
by toConnector. Used to provide the partial conversion, for instance like that required when
dealing with literal values provided in search filters.
NamingException
public static void convertAttributes(MetaObjectClassMapping classMap,
Attributes attrs,
boolean toConnector)
throws NamingException
toConnector - including management of ConverterValueCache.
NamingException
public static void convertAttribute(MetaObjectClassMapping classMap,
Attribute attr,
boolean toConnector,
boolean runStructural)
throws NamingException
NamingException
public static PropertyConverters getConvertersForAttr(MetaObjectClassMapping classMap,
Attribute attr)
public static PropertyConverters getConvertersForLdapAttrId(MetaObjectClassMapping classMap,
String attrId)
public static ModificationItem[] convertModificationItems(ObjectInfo objInfo,
ModificationItem[] items,
LazyConnectorAttributesProxy attrs)
throws NamingException
attrs if
need to access current state of the target object.
NamingException
public static ModificationItem[] normalizeModificationItemOps(ObjectInfo objInfo,
boolean inConnectorSpeak,
ModificationItem[] items,
LazyConnectorAttributesProxy attrs)
throws NamingException
MetaDataDefs.MD_FORCE_MOD_MODE metadata setting provided, as well as for single-valued
properties being modified with modes other then DirContext.REPLACE_ATTRIBUTE.
objInfo - Information for target object to which modifications are to be applied.inConnectorSpeak - True if items are already mapped to connector-speak and false otherwise.items - Array of modification items to be applied.attrs - Proxy which can be used to lookup current attribute values for the target object,
if required.
NamingExceptionpublic void checkSanityConnectorDependantConverters(MetaObjectClassMappings classMaps)
public void registerConnectorWithDependantConverters(MetaConnector connector)
|
||||||||||
| PREV CLASS NEXT CLASS | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||