Java Doc for AbstractMuleBeanDefinitionParser.java in  » ESB » mule » org » mule » config » spring » parsers » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » mule » org.mule.config.spring.parsers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser

All known Subclasses:   org.mule.config.spring.parsers.collection.OrphanMapDefinitionParser,  org.mule.config.spring.parsers.generic.OrphanDefinitionParser,  org.mule.module.management.config.JmxAgentDefinitionParser,  org.mule.config.spring.parsers.AbstractHierarchicalDefinitionParser,
AbstractMuleBeanDefinitionParser
abstract public class AbstractMuleBeanDefinitionParser extends AbstractBeanDefinitionParser implements MuleDefinitionParser(Code)
This parser extends the Spring provided AbstractBeanDefinitionParser to provide additional features for consistently customising bean representations for Mule bean definition parsers. Most custom bean definition parsers in Mule will use this base class. The following enhancements are made -
  1. A property name which ends with the suffix "-ref" is assumed to be a reference to another bean. Alternatively, a property can be explicitly registered as a bean reference via registerBeanReference()

    For example, <bpm:connector bpms-ref="testBpms"/< will automatically set a property "bpms" on the connector to reference a bean named "testBpms"

  2. Attribute mappings can be registered to control how an attribute name in Mule Xml maps to the bean name in the object being created.

    For example - addAlias("poolExhaustedAction", "poolExhaustedActionString"); Maps the 'poolExhaustedAction' to the 'poolExhaustedActionString' property on the bean being created.

  3. Value Mappings can be used to map key value pairs from selection lists in the XML schema to property values on the bean being created. These are a comma-separated list of key=value pairs.

    For example - addMapping("action", "NONE=0,ALWAYS_BEGIN=1,BEGIN_OR_JOIN=2,JOIN_IF_POSSIBLE=3"); The first argument is the bean name to set, the second argument is the set of possible key=value pairs

  4. Provides an automatic way of setting the 'init-method' and 'destroy-method' for this object. This will then automatically wire the bean into the lifecycle of the Application context.
  5. The 'singleton' property provides a fixed way to make sure the bean is always a singleton or not.
  6. Collections will be automatically created and extended if the setter matches "property+s".

Note that this class is not multi-thread safe. The internal state is reset before each "use" by AbstractMuleBeanDefinitionParser.preProcess(org.w3c.dom.Element) which assumes sequential access.


See Also:   AbstractBeanDefinitionParser


Field Summary
final public static  StringATTRIBUTE_CLASS
    
final public static  StringATTRIBUTE_ID
    
final public static  StringATTRIBUTE_NAME
    
final public static  StringATTRIBUTE_REF
    
final public static  StringATTRIBUTE_REFS
    
final public static  StringATTRIBUTE_REFS_SUFFIX
    
final public static  StringATTRIBUTE_REF_SUFFIX
    
final public static  StringROOT_ELEMENT
    
protected  ReusablePropertyConfigurationbeanPropertyConfiguration
    
protected transient  Loglogger
    
protected  booleansingleton
    

Constructor Summary
public  AbstractMuleBeanDefinitionParser()
    

Method Summary
public  MuleDefinitionParserConfigurationaddAlias(String alias, String propertyName)
    
public  MuleDefinitionParserConfigurationaddBeanFlag(String flag)
    
public  MuleDefinitionParserConfigurationaddCollection(String propertyName)
    
public  MuleDefinitionParserConfigurationaddIgnored(String propertyName)
    
public  MuleDefinitionParserConfigurationaddMapping(String propertyName, Map mappings)
    
public  MuleDefinitionParserConfigurationaddMapping(String propertyName, String mappings)
    
public  MuleDefinitionParserConfigurationaddMapping(String propertyName, ValueMap mappings)
    
public  MuleDefinitionParserConfigurationaddReference(String propertyName)
    
protected  voidcheckElementNameUnique(Element element)
    
protected  BeanDefinitionBuildercreateBeanDefinitionBuilder(Element element, Class beanClass)
    
protected  voiddoParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)
     Parse the supplied Element and populate the supplied BeanDefinitionBuilder as required.
protected  BeanAssemblergetBeanAssembler(Element element, BeanDefinitionBuilder bean)
     Restricted use - does not include a target.
public  BeanAssemblerFactorygetBeanAssemblerFactory()
    
abstract protected  ClassgetBeanClass(Element element)
     Determine the bean class corresponding to the supplied Element .
protected  ClassgetBeanClassFromAttribute(Element element)
     Determine the bean class corresponding to the supplied Element based on an explicit "class" attribute.
public  StringgetBeanName(Element element)
    
protected  ClassgetClassConstraint()
    
protected  ClassgetClassInternal(Element element)
    
protected  ParserContextgetParserContext()
    
protected  BeanDefinitionRegistrygetRegistry()
    
protected  booleanisAllowClassAttribute()
    
protected  booleanisSingleton()
    
protected  booleanisTopLevel(Element element)
    
public  AbstractBeanDefinitionmuleParse(Element element, ParserContext parserContext)
    
protected  AbstractBeanDefinitionparseInternal(Element element, ParserContext parserContext)
     Creates a BeanDefinitionBuilder instance for the AbstractMuleBeanDefinitionParser.getBeanClass bean Class and passes it to the AbstractMuleBeanDefinitionParser.doParse strategy method.
protected  voidpostProcess(ParserContext context, BeanAssembler assembler, Element element)
     Hook method that derived classes can implement to inspect/change a bean definition after parsing is complete.
protected  voidpreProcess(Element element)
     Hook method that derived classes can implement to modify internal state before processing.
protected  voidprocessProperty(Attr attribute, BeanAssembler assembler)
    
public  MuleDefinitionParserConfigurationregisterPostProcessor(PostProcessor postProcessor)
    
public  MuleDefinitionParserConfigurationregisterPreProcessor(PreProcessor preProcessor)
    
public  MuleDefinitionParserConfigurationremoveIgnored(String propertyName)
    
protected  StringresolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext)
    
protected  voidsetAllowClassAttribute(boolean allowClassAttribute)
    
public  voidsetBeanAssemblerFactory(BeanAssemblerFactory beanAssemblerFactory)
    
protected  voidsetClassConstraint(Class classConstraint)
    
public  MuleDefinitionParserConfigurationsetIgnoredDefault(boolean ignoreAll)
    
protected  voidsetParserContext(ParserContext parserContext)
    
protected  voidsetRegistry(BeanDefinitionRegistry registry)
    

Field Detail
ATTRIBUTE_CLASS
final public static String ATTRIBUTE_CLASS(Code)



ATTRIBUTE_ID
final public static String ATTRIBUTE_ID(Code)



ATTRIBUTE_NAME
final public static String ATTRIBUTE_NAME(Code)



ATTRIBUTE_REF
final public static String ATTRIBUTE_REF(Code)



ATTRIBUTE_REFS
final public static String ATTRIBUTE_REFS(Code)



ATTRIBUTE_REFS_SUFFIX
final public static String ATTRIBUTE_REFS_SUFFIX(Code)



ATTRIBUTE_REF_SUFFIX
final public static String ATTRIBUTE_REF_SUFFIX(Code)



ROOT_ELEMENT
final public static String ROOT_ELEMENT(Code)



beanPropertyConfiguration
protected ReusablePropertyConfiguration beanPropertyConfiguration(Code)



logger
protected transient Log logger(Code)
logger used by this class



singleton
protected boolean singleton(Code)




Constructor Detail
AbstractMuleBeanDefinitionParser
public AbstractMuleBeanDefinitionParser()(Code)




Method Detail
addAlias
public MuleDefinitionParserConfiguration addAlias(String alias, String propertyName)(Code)

Parameters:
  alias - The attribute name
Parameters:
  propertyName - The bean property name This instance, allowing chaining during use, avoiding subclasses



addBeanFlag
public MuleDefinitionParserConfiguration addBeanFlag(String flag)(Code)



addCollection
public MuleDefinitionParserConfiguration addCollection(String propertyName)(Code)

Parameters:
  propertyName - Property that is a collection This instance, allowing chaining during use, avoiding subclasses



addIgnored
public MuleDefinitionParserConfiguration addIgnored(String propertyName)(Code)

Parameters:
  propertyName - Property that is to be ignored This instance, allowing chaining during use, avoiding subclasses



addMapping
public MuleDefinitionParserConfiguration addMapping(String propertyName, Map mappings)(Code)



addMapping
public MuleDefinitionParserConfiguration addMapping(String propertyName, String mappings)(Code)



addMapping
public MuleDefinitionParserConfiguration addMapping(String propertyName, ValueMap mappings)(Code)



addReference
public MuleDefinitionParserConfiguration addReference(String propertyName)(Code)



checkElementNameUnique
protected void checkElementNameUnique(Element element)(Code)



createBeanDefinitionBuilder
protected BeanDefinitionBuilder createBeanDefinitionBuilder(Element element, Class beanClass)(Code)



doParse
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)(Code)
Parse the supplied Element and populate the supplied BeanDefinitionBuilder as required.

The default implementation delegates to the doParse version without ParserContext argument.
Parameters:
  element - the XML element being parsed
Parameters:
  parserContext - the object encapsulating the current state of the parsing process
Parameters:
  builder - used to define the BeanDefinition




getBeanAssembler
protected BeanAssembler getBeanAssembler(Element element, BeanDefinitionBuilder bean)(Code)
Restricted use - does not include a target. If possible, use org.mule.config.spring.parsers.AbstractHierarchicalDefinitionParser.getBeanAssembler(org.w3c.dom.Elementorg.springframework.beans.factory.support.BeanDefinitionBuilder)
Parameters:
  bean - The bean being constructed An assembler that automates Mule-specific logic for bean construction



getBeanAssemblerFactory
public BeanAssemblerFactory getBeanAssemblerFactory()(Code)



getBeanClass
abstract protected Class getBeanClass(Element element)(Code)
Determine the bean class corresponding to the supplied Element .
Parameters:
  element - the Element that is being parsed the Class of the bean that is being defined via parsing the supplied Element(must not be null)
See Also:   AbstractMuleBeanDefinitionParser.parseInternal(org.w3c.dom.Element,ParserContext)



getBeanClassFromAttribute
protected Class getBeanClassFromAttribute(Element element)(Code)
Determine the bean class corresponding to the supplied Element based on an explicit "class" attribute.
Parameters:
  element - the Element that is being parsed the Class of the bean that is being defined via parsing the supplied Element(must not be null)
See Also:   AbstractMuleBeanDefinitionParser.parseInternal(org.w3c.dom.Element,ParserContext)



getBeanName
public String getBeanName(Element element)(Code)



getClassConstraint
protected Class getClassConstraint()(Code)



getClassInternal
protected Class getClassInternal(Element element)(Code)



getParserContext
protected ParserContext getParserContext()(Code)



getRegistry
protected BeanDefinitionRegistry getRegistry()(Code)



isAllowClassAttribute
protected boolean isAllowClassAttribute()(Code)



isSingleton
protected boolean isSingleton()(Code)



isTopLevel
protected boolean isTopLevel(Element element)(Code)

Parameters:
  element - The element to test true if the element's parent is or similar



muleParse
public AbstractBeanDefinition muleParse(Element element, ParserContext parserContext)(Code)



parseInternal
protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext)(Code)
Creates a BeanDefinitionBuilder instance for the AbstractMuleBeanDefinitionParser.getBeanClass bean Class and passes it to the AbstractMuleBeanDefinitionParser.doParse strategy method.
Parameters:
  element - the element that is to be parsed into a single BeanDefinition
Parameters:
  parserContext - the object encapsulating the current state of the parsing process the BeanDefinition resulting from the parsing of the supplied Element
throws:
  IllegalStateException - if the bean Class returned fromAbstractMuleBeanDefinitionParser.getBeanClass(org.w3c.dom.Element) is null
See Also:   AbstractMuleBeanDefinitionParser.doParse



postProcess
protected void postProcess(ParserContext context, BeanAssembler assembler, Element element)(Code)
Hook method that derived classes can implement to inspect/change a bean definition after parsing is complete.
Parameters:
  assembler - the parsed (and probably totally defined) bean definition being built
Parameters:
  element - the XML element that was the source of the bean definition's metadata



preProcess
protected void preProcess(Element element)(Code)
Hook method that derived classes can implement to modify internal state before processing. Here we make sure that the internal property configuration state is reset to the initial configuration for each element (it may be modified by the BeanAssembler) and that other mutable instance variables are cleared.



processProperty
protected void processProperty(Attr attribute, BeanAssembler assembler)(Code)



registerPostProcessor
public MuleDefinitionParserConfiguration registerPostProcessor(PostProcessor postProcessor)(Code)



registerPreProcessor
public MuleDefinitionParserConfiguration registerPreProcessor(PreProcessor preProcessor)(Code)



removeIgnored
public MuleDefinitionParserConfiguration removeIgnored(String propertyName)(Code)



resolveId
protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext) throws BeanDefinitionStoreException(Code)



setAllowClassAttribute
protected void setAllowClassAttribute(boolean allowClassAttribute)(Code)



setBeanAssemblerFactory
public void setBeanAssemblerFactory(BeanAssemblerFactory beanAssemblerFactory)(Code)



setClassConstraint
protected void setClassConstraint(Class classConstraint)(Code)



setIgnoredDefault
public MuleDefinitionParserConfiguration setIgnoredDefault(boolean ignoreAll)(Code)



setParserContext
protected void setParserContext(ParserContext parserContext)(Code)



setRegistry
protected void setRegistry(BeanDefinitionRegistry registry)(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.