1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.tck.testmodels.mule; |
12 | |
|
13 | |
import org.mule.transformers.compression.AbstractCompressionTransformer; |
14 | |
import org.mule.umo.transformer.TransformerException; |
15 | |
import org.mule.util.compression.GZipCompression; |
16 | |
|
17 | |
public class TestCompressionTransformer extends AbstractCompressionTransformer |
18 | |
{ |
19 | |
|
20 | |
private String beanProperty1; |
21 | |
private String containerProperty; |
22 | |
|
23 | |
private int beanProperty2; |
24 | |
|
25 | |
public TestCompressionTransformer() |
26 | |
{ |
27 | 0 | super(); |
28 | 0 | this.setStrategy(new GZipCompression()); |
29 | 0 | } |
30 | |
|
31 | |
public Object doTransform(Object src, String encoding) throws TransformerException |
32 | |
{ |
33 | 0 | return null; |
34 | |
} |
35 | |
|
36 | |
public String getBeanProperty1() |
37 | |
{ |
38 | 0 | return beanProperty1; |
39 | |
} |
40 | |
|
41 | |
public void setBeanProperty1(String beanProperty1) |
42 | |
{ |
43 | 0 | this.beanProperty1 = beanProperty1; |
44 | 0 | } |
45 | |
|
46 | |
public int getBeanProperty2() |
47 | |
{ |
48 | 0 | return beanProperty2; |
49 | |
} |
50 | |
|
51 | |
public void setBeanProperty2(int beanProperty2) |
52 | |
{ |
53 | 0 | this.beanProperty2 = beanProperty2; |
54 | 0 | } |
55 | |
|
56 | |
public String getContainerProperty() |
57 | |
{ |
58 | 0 | return containerProperty; |
59 | |
} |
60 | |
|
61 | |
public void setContainerProperty(String containerProperty) |
62 | |
{ |
63 | 0 | this.containerProperty = containerProperty; |
64 | 0 | } |
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
|
71 | |
|
72 | |
public Object clone() throws CloneNotSupportedException |
73 | |
{ |
74 | 0 | if (containerProperty == null) |
75 | |
{ |
76 | 0 | throw new IllegalStateException( |
77 | |
"Transformer cannot be cloned until all properties have been set on it"); |
78 | |
} |
79 | |
|
80 | 0 | return super.clone(); |
81 | |
} |
82 | |
|
83 | |
} |