com.ca.jcs.sdk.converter
Class DemoFlattenPropertyConverter

java.lang.Object
  extended by com.ca.jcs.cfg.Vetoable
      extended by com.ca.jcs.converter.meta.PropertyConverter
          extended by com.ca.jcs.sdk.converter.DemoFlattenPropertyConverter
All Implemented Interfaces:
AttributeConverter

public class DemoFlattenPropertyConverter
extends PropertyConverter

An example of a property converter, which can be triggered on a attribute according to the presence of one or more metadata settings on it (as defined when it is registered in conf/connector.xml (connector-specific scope) or conf/server_jcs.xml (global scope)). It's constructors can investigate possible target attributes and use Vetoable.setVetoed(boolean) when the converter should not actually be applied to the candidate attribute target.

Note that this converter is a bit of contrived, as the framework has a number of flatteners included in it already (like XMLMultiValueFlattener) but is designed to show what is involved in writing, configuring and registering a converter.

Also note that


Nested Class Summary
static class DemoFlattenPropertyConverter.DemoFlattenConfig
          Sample of a configuration bean that can be initialised via Spring XML and provide more static / larger scoped behavioural settings then those provided for each individual property (aka attribute) via metadata settings.
 
Field Summary
 
Fields inherited from class com.ca.jcs.converter.meta.PropertyConverter
config, prop
 
Constructor Summary
DemoFlattenPropertyConverter(DemoFlattenPropertyConverter.DemoFlattenConfig cfg, DataModelProperty prop)
           
 
Method Summary
 
Methods inherited from class com.ca.jcs.converter.meta.PropertyConverter
convertFromConnector, convertToConnector, getAttrConverter, getConfig, getConverter, getTargetValueOverride, isLossy, isMultiValued, isStructural, setAttrConverter
 
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

DemoFlattenPropertyConverter

public DemoFlattenPropertyConverter(DemoFlattenPropertyConverter.DemoFlattenConfig cfg,
                                    DataModelProperty prop)


Created 2011-07-14 13:27 EST