org.mule.config.spring.parsers.assembly.configuration
Class SimplePropertyConfiguration

java.lang.Object
  extended by org.mule.config.spring.parsers.assembly.configuration.SimplePropertyConfiguration
All Implemented Interfaces:
PropertyConfiguration

public class SimplePropertyConfiguration
extends Object
implements PropertyConfiguration

A direct implementation of PropertyConfiguration


Nested Class Summary
static class SimplePropertyConfiguration.MapValueMap
           
static class SimplePropertyConfiguration.NamedValueMap
           
 
Constructor Summary
SimplePropertyConfiguration()
           
 
Method Summary
 void addAlias(String alias, String propertyName)
           
 void addCollection(String propertyName)
          This will automatically generate a list and accumulate values.
 void addIgnored(String propertyName)
           
 void addMapping(String propertyName, Map mappings)
           
 void addMapping(String propertyName, String mappings)
           
 void addMapping(String propertyName, ValueMap mappings)
           
 void addReference(String propertyName)
           
protected  String dropRef(String name)
           
 String getAttributeAlias(String name)
           
 String getAttributeMapping(String alias)
           
 String getAttributeMapping(String alias, String deflt)
           
 SingleProperty getSingleProperty(String name)
           
 boolean isCollection(String propertyName)
           
 boolean isIgnored(String propertyName)
           
 boolean isReference(String attributeName)
          A property can be explicitly registered as a bean reference via registerBeanReference() or it can simply use the "-ref" suffix.
 void removeIgnored(String propertyName)
           
 void setIgnoredDefault(boolean ignoreAll)
           
 String translateName(String oldName)
          Extract a JavaBean property name from the supplied attribute name.
 Object translateValue(String name, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePropertyConfiguration

public SimplePropertyConfiguration()
Method Detail

addReference

public void addReference(String propertyName)
Specified by:
addReference in interface PropertyConfiguration

addMapping

public void addMapping(String propertyName,
                       Map mappings)
Specified by:
addMapping in interface PropertyConfiguration

addMapping

public void addMapping(String propertyName,
                       String mappings)
Specified by:
addMapping in interface PropertyConfiguration

addMapping

public void addMapping(String propertyName,
                       ValueMap mappings)
Specified by:
addMapping in interface PropertyConfiguration

addAlias

public void addAlias(String alias,
                     String propertyName)
Specified by:
addAlias in interface PropertyConfiguration

addCollection

public void addCollection(String propertyName)
Description copied from interface: PropertyConfiguration
This will automatically generate a list and accumulate values. If the value is a map then instead of generating a list of maps we combine map entries together.

Specified by:
addCollection in interface PropertyConfiguration

addIgnored

public void addIgnored(String propertyName)
Specified by:
addIgnored in interface PropertyConfiguration

removeIgnored

public void removeIgnored(String propertyName)
Specified by:
removeIgnored in interface PropertyConfiguration

setIgnoredDefault

public void setIgnoredDefault(boolean ignoreAll)
Specified by:
setIgnoredDefault in interface PropertyConfiguration

getAttributeMapping

public String getAttributeMapping(String alias)
Specified by:
getAttributeMapping in interface PropertyConfiguration

getAttributeAlias

public String getAttributeAlias(String name)
Specified by:
getAttributeAlias in interface PropertyConfiguration

getAttributeMapping

public String getAttributeMapping(String alias,
                                  String deflt)

isCollection

public boolean isCollection(String propertyName)
Specified by:
isCollection in interface PropertyConfiguration

isIgnored

public boolean isIgnored(String propertyName)
Specified by:
isIgnored in interface PropertyConfiguration

isReference

public boolean isReference(String attributeName)
A property can be explicitly registered as a bean reference via registerBeanReference() or it can simply use the "-ref" suffix.

Specified by:
isReference in interface PropertyConfiguration
Parameters:
attributeName - true if the name appears to correspond to a reference

getSingleProperty

public SingleProperty getSingleProperty(String name)
Specified by:
getSingleProperty in interface PropertyConfiguration

translateName

public String translateName(String oldName)
Extract a JavaBean property name from the supplied attribute name.

The default implementation uses the Conventions.attributeNameToPropertyName(String) method to perform the extraction.

The name returned must obey the standard JavaBean property name conventions. For example for a class with a setter method 'setBingoHallFavourite(String)', the name returned had better be 'bingoHallFavourite' (with that exact casing).

Specified by:
translateName in interface PropertyConfiguration
Parameters:
oldName - the attribute name taken straight from the XML element being parsed; will never be null
Returns:
the extracted JavaBean property name; must never be null

dropRef

protected String dropRef(String name)

translateValue

public Object translateValue(String name,
                             String value)
Specified by:
translateValue in interface PropertyConfiguration


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.