1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.config.spring.parsers.specific; |
8 | |
|
9 | |
import org.mule.api.MuleContext; |
10 | |
import org.mule.api.context.MuleContextAware; |
11 | |
import org.mule.component.DefaultJavaComponent; |
12 | |
|
13 | |
import java.util.Map; |
14 | |
|
15 | |
import org.springframework.beans.factory.config.AbstractFactoryBean; |
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | 0 | public class SimpleComponentFactoryBean extends AbstractFactoryBean implements MuleContextAware |
21 | |
{ |
22 | 0 | private Class muleComponentClass = DefaultJavaComponent.class; |
23 | |
|
24 | |
private Class componentClass; |
25 | |
|
26 | |
private Map properties; |
27 | |
|
28 | |
private MuleContext muleContext; |
29 | |
|
30 | |
public void setMuleContext(MuleContext context) |
31 | |
{ |
32 | 0 | muleContext = context; |
33 | 0 | } |
34 | |
|
35 | |
@Override |
36 | |
public Class getObjectType() |
37 | |
{ |
38 | 0 | return muleComponentClass; |
39 | |
} |
40 | |
|
41 | |
@Override |
42 | |
protected Object createInstance() throws Exception |
43 | |
{ |
44 | 0 | DefaultJavaComponent component = new DefaultJavaComponent(); |
45 | 0 | return null; |
46 | |
} |
47 | |
|
48 | |
@Override |
49 | |
public boolean isSingleton() |
50 | |
{ |
51 | 0 | return true; |
52 | |
} |
53 | |
|
54 | |
public Class getMuleComponentClass() |
55 | |
{ |
56 | 0 | return muleComponentClass; |
57 | |
} |
58 | |
|
59 | |
public void setMuleComponentClass(Class muleComponentClass) |
60 | |
{ |
61 | 0 | this.muleComponentClass = muleComponentClass; |
62 | 0 | } |
63 | |
|
64 | |
public Class getComponentClass() |
65 | |
{ |
66 | 0 | return componentClass; |
67 | |
} |
68 | |
|
69 | |
public void setComponentClass(Class componentClass) |
70 | |
{ |
71 | 0 | this.componentClass = componentClass; |
72 | 0 | } |
73 | |
|
74 | |
public Map getProperties() |
75 | |
{ |
76 | 0 | return properties; |
77 | |
} |
78 | |
|
79 | |
public void setProperties(Map properties) |
80 | |
{ |
81 | 0 | this.properties = properties; |
82 | 0 | } |
83 | |
} |