org.spicefactory.cinnamon.config.shared
Class AbstractClassMappingParser

java.lang.Object
  extended by org.spicefactory.cinnamon.config.shared.AbstractClassMappingParser

public abstract class AbstractClassMappingParser
extends Object

Abstract base class containing parsing logic for class mapping configuration. Will be used in the default XML configuration parser and the Spring NamespaceHandler.

Author:
Jens Halm

Constructor Summary
AbstractClassMappingParser()
           
 
Method Summary
protected abstract  void addBeanClassMapping(String alias, String asClass, Class<?> javaClass, Class<? extends MappedObjectFactory<?>> javaFactory, Set<String> omittedSet)
          Adds a bean class mapping to the configuration.
protected abstract  void addExternalizableClassMapping(String alias, String asClass, Class<?> javaClass, Class<? extends MappedObjectFactory<?>> javaFactory, Class<? extends Externalizer<?,?>> externalizer)
          Adds an externalizable class mapping to the configuration.
 void process(ElementWrapper element, boolean externalizable)
          Processes the given XML element representing a single class mapping configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractClassMappingParser

public AbstractClassMappingParser()
Method Detail

process

public void process(ElementWrapper element,
                    boolean externalizable)
Processes the given XML element representing a single class mapping configuration.

Parameters:
element - the wrapper for the XML element
externalizable - whether this is an externalizable class mapping or a bean class mapping

addBeanClassMapping

protected abstract void addBeanClassMapping(String alias,
                                            String asClass,
                                            Class<?> javaClass,
                                            Class<? extends MappedObjectFactory<?>> javaFactory,
                                            Set<String> omittedSet)
Adds a bean class mapping to the configuration. Subclasses implementing this method should create a ClassMapping instance and add it to the CinnamonConfig instance under construction. The exact mechanism depends on the configuration method in use (i.e. XML vs. Spring).

Parameters:
alias - the alias for the mapping as registered in ActionScript with registerClassAlias or the [RemoteClass] metadata tag
asClass - the fully qualified name of the ActionScript class
javaClass - the Java class
javaFactory - the (optional) Java factory
omittedSet - a set of property names to exclude from the mapping

addExternalizableClassMapping

protected abstract void addExternalizableClassMapping(String alias,
                                                      String asClass,
                                                      Class<?> javaClass,
                                                      Class<? extends MappedObjectFactory<?>> javaFactory,
                                                      Class<? extends Externalizer<?,?>> externalizer)
Adds an externalizable class mapping to the configuration. Subclasses implementing this method should create a ClassMapping instance and add it to the CinnamonConfig instance under construction. The exact mechanism depends on the configuration method in use (i.e. XML vs. Spring).

Parameters:
alias - the alias for the mapping as registered in ActionScript with registerClassAlias or the [RemoteClass] metadata tag
asClass - the fully qualified name of the ActionScript class
javaClass - the Java class
javaFactory - the (optional) Java factory
externalizer - the (optional) Externalizer implementation to use for this mapping