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