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