|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertyConfiguration
This collects together various constraints/rewrites that can be applied to attributes. It was extracted from AbstractMuleBeanDefinitionParser and should be used as a delegate (see that class for an example).
Ignored, reference and collection flags are all keyed off the "old" name (before any alias or mapping), with any "-ref" dropped. No normalisation of mapping or aliases is attempted.
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)
|
String |
getAttributeAlias(String name)
|
String |
getAttributeMapping(String alias)
|
SingleProperty |
getSingleProperty(String propertyName)
|
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)
|
Method Detail |
---|
void addReference(String propertyName)
void addMapping(String propertyName, Map mappings)
void addMapping(String propertyName, String mappings)
void addMapping(String propertyName, ValueMap mappings)
void addAlias(String alias, String propertyName)
void addCollection(String propertyName)
void addIgnored(String propertyName)
void removeIgnored(String propertyName)
void setIgnoredDefault(boolean ignoreAll)
String getAttributeMapping(String alias)
String getAttributeAlias(String name)
boolean isCollection(String propertyName)
boolean isIgnored(String propertyName)
boolean isReference(String attributeName)
attributeName
- true if the name appears to correspond to a referenceSingleProperty getSingleProperty(String propertyName)
String translateName(String oldName)
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).
oldName
- the attribute name taken straight from the XML element being parsed; will never be null
null
Object translateValue(String name, String value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |