com.ca.jcs.converter.meta
Class JSONReverseCompoundValueClassConverter
java.lang.Object
com.ca.jcs.cfg.Vetoable
com.ca.jcs.converter.meta.ClassConverter
com.ca.jcs.converter.meta.JSONCompoundValueClassConverter
com.ca.jcs.converter.meta.JSONReverseCompoundValueClassConverter
public class JSONReverseCompoundValueClassConverter
- extends JSONCompoundValueClassConverter
Does reverse transformation to JSONCompoundValueClassConverter, so can be used by the framework to
take in JSON-string-encoded compound values in LDAP-speak which are converted into nested Attributes
representation in connector-speak (which allows validator and converter plug-ins to be easily applied).
Note we don't configure convertToString=true for super class, because this class needs to handle representation
for SET values specially and this is most easily done when we have binary JSON objects to work with.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONReverseCompoundValueClassConverter
public JSONReverseCompoundValueClassConverter(MetaObjectClassMapping classMap)
convertToConnector
public void convertToConnector(Attributes attrs)
throws NamingException
- Calls
super.convertFromConnector(attrs) after normalizing SET values into a single
JSONArray value.
- Overrides:
convertToConnector in class JSONCompoundValueClassConverter
- Throws:
NamingException
convertToConnector
public ModificationItem[] convertToConnector(ModificationItem[] modItems)
throws NamingException
- Attributes(JSON values) => Attributes (maybe nested), or if inverted then other way around.
- Overrides:
convertToConnector in class JSONCompoundValueClassConverter
- Throws:
NamingException
convertFromConnector
public void convertFromConnector(Attributes attrs)
throws NamingException
- Calls
super.convertToConnector(attrs)
- Overrides:
convertFromConnector in class JSONCompoundValueClassConverter
- Throws:
NamingException
Created 2011-07-14 13:27 EST