|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| 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.
| Nested Class Summary | |
|---|---|
protected static class |
PropertyConverters.AttributeConverterFilter
Filter helper class for AttributeConverters |
static class |
PropertyConverters.ConverterType
Converter implementation classification |
static class |
PropertyConverters.ForceSettingIndex
|
| Constructor Summary | |
|---|---|
PropertyConverters()
|
|
| Method Summary | |
|---|---|
boolean |
applyFlatten(MetaObjectClassMapping classMap,
Attribute unflattenedConnAttr)
Runs any multi-valued structural converters for this property (including flatteners), but performs no other conversions. |
protected void |
applyNonStructural(MetaObjectClassMapping classMap,
Attribute attr)
Destructively apply non-structural converters registered against attribute targeted by provided item. |
protected void |
applyNonStructural(MetaObjectClassMapping classMap,
Attribute attr,
boolean toConnector,
boolean beforeStructural,
boolean afterStructural)
A helper that can run non structural converters which can be registered to run either before or after structural converter or both |
void |
applyToLiteral(Attribute attr,
boolean toConnector)
Apply literal value converters to each of the values in an attribute |
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. |
String |
applyToLiteral(String value,
boolean toConnector,
Converter.ConverterFlag flag,
Collection<PropertyConverters.ConverterType> includeConvTypes,
Collection<PropertyConverters.ConverterType> excludeConvTypes)
|
boolean |
applyUnflatten(MetaObjectClassMapping classMap,
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. |
static boolean |
forceModificationItemOp(ObjectInfo objInfo,
boolean inConnectorSpeak,
ModificationItem item,
boolean[] forceSettings)
Return true if provided ModificationItem requires modification mode to be forcibly changed, refer MetaDataDefs.MD_FORCE_MOD_MODE. |
static boolean |
forceModificationItemOps(ObjectInfo objInfo,
boolean inConnectorSpeak,
ModificationItem[] items)
Return true if forceModificationItemOp(com.ca.jcs.ObjectInfo, boolean, javax.naming.directory.ModificationItem, boolean[]) returns true for any of the provided items. |
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 |
List<PropertyConverter> |
getConvertersOfType(PropertyConverters.ConverterType type)
Return converters matching type, null for all |
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(MetaObjectClassMapping classMap,
Attribute attr)
throws NamingException
NamingException
public boolean applyFlatten(MetaObjectClassMapping classMap,
Attribute unflattenedConnAttr)
throws NamingException
NamingException
public String applyToLiteral(String value,
boolean toConnector,
Converter.ConverterFlag flag,
Collection<PropertyConverters.ConverterType> includeConvTypes,
Collection<PropertyConverters.ConverterType> excludeConvTypes)
throws NamingException
value - Value to converttoConnector - Conversion directionflag - Conversion flagsincludeConvTypes - Include converter types, null means allexcludeConvTypes - Exclude converter types, null means none
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 void applyToLiteral(Attribute attr,
boolean toConnector)
throws NamingException
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 boolean forceModificationItemOp(ObjectInfo objInfo,
boolean inConnectorSpeak,
ModificationItem item,
boolean[] forceSettings)
MetaDataDefs.MD_FORCE_MOD_MODE.
If method returns true and forceSettings array is not null, then it will be populated with status for each ForceSettingIndex setting (by ordinal).
public static boolean forceModificationItemOps(ObjectInfo objInfo,
boolean inConnectorSpeak,
ModificationItem[] items)
forceModificationItemOp(com.ca.jcs.ObjectInfo, boolean, javax.naming.directory.ModificationItem, boolean[]) returns true for any of the provided items.
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.
NamingException
protected void applyNonStructural(MetaObjectClassMapping classMap,
Attribute attr)
throws NamingException
NamingException
protected void applyNonStructural(MetaObjectClassMapping classMap,
Attribute attr,
boolean toConnector,
boolean beforeStructural,
boolean afterStructural)
throws NamingException
NamingException
@Nullable
public List<PropertyConverter> getConvertersOfType(@Nullable
PropertyConverters.ConverterType type)
public void checkSanityConnectorDependantConverters(MetaObjectClassMappings classMaps)
public void registerConnectorWithDependantConverters(MetaConnector connector)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||