com.ca.jcs.converter.meta
Class JSONReverseCompoundValueClassConverter

java.lang.Object
  extended by com.ca.jcs.cfg.Vetoable
      extended by com.ca.jcs.converter.meta.ClassConverter
          extended by com.ca.jcs.converter.meta.JSONCompoundValueClassConverter
              extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.ca.jcs.converter.meta.JSONCompoundValueClassConverter
JSONCompoundValueClassConverter.Config
 
Field Summary
 
Fields inherited from class com.ca.jcs.converter.meta.ClassConverter
classMap, converterConfig
 
Constructor Summary
JSONReverseCompoundValueClassConverter(MetaObjectClassMapping classMap)
           
 
Method Summary
 void convertFromConnector(Attributes attrs)
          Calls super.convertToConnector(attrs)
 void convertToConnector(Attributes attrs)
          Calls super.convertFromConnector(attrs) after normalizing SET values into a single JSONArray value.
 ModificationItem[] convertToConnector(ModificationItem[] modItems)
          Attributes(JSON values) => Attributes (maybe nested), or if inverted then other way around.
 
Methods inherited from class com.ca.jcs.converter.meta.JSONCompoundValueClassConverter
convertPropertyFromJSON, doConvertFromConnector, doConvertToConnector, isStructural, parseJSON
 
Methods inherited from class com.ca.jcs.cfg.Vetoable
isVetoed, setVetoed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONReverseCompoundValueClassConverter

public JSONReverseCompoundValueClassConverter(MetaObjectClassMapping classMap)
Method Detail

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