1
2
3
4
5
6
7
8
9
10
11 package org.mule.extras.spring.config;
12
13 import org.mule.MuleException;
14 import org.mule.util.MuleObjectHelper;
15
16 import java.beans.PropertyEditorSupport;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20
21
22
23
24
25 public class TransformerEditor extends PropertyEditorSupport
26 {
27
28
29
30 protected static final Log logger = LogFactory.getLog(TransformerEditor.class);
31
32 public void setAsText(String text)
33 {
34 try
35 {
36 setValue(MuleObjectHelper.getTransformer(text, (text.indexOf(",") > -1 ? "," : " ")));
37 }
38 catch (MuleException e)
39 {
40 logger.error(e.getMessage(), e);
41 }
42 }
43 }