1 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 21 22 public class TestCompressionTransformer extends AbstractCompressionTransformer 23 { 24 27 private static final long serialVersionUID = -1742674557192926869L; 28 29 private String beanProperty1; 30 private String containerProperty; 31 32 private int beanProperty2; 33 34 public TestCompressionTransformer() 35 { 36 super(); 37 this.setStrategy(new GZipCompression()); 38 } 39 40 public Object doTransform(Object src, String encoding) throws TransformerException 41 { 42 return null; 43 } 44 45 public String getBeanProperty1() 46 { 47 return beanProperty1; 48 } 49 50 public void setBeanProperty1(String beanProperty1) 51 { 52 this.beanProperty1 = beanProperty1; 53 } 54 55 public int getBeanProperty2() 56 { 57 return beanProperty2; 58 } 59 60 public void setBeanProperty2(int beanProperty2) 61 { 62 this.beanProperty2 = beanProperty2; 63 } 64 65 public String getContainerProperty() 66 { 67 return containerProperty; 68 } 69 70 public void setContainerProperty(String containerProperty) 71 { 72 this.containerProperty = containerProperty; 73 } 74 75 81 public Object clone() throws CloneNotSupportedException 82 { 83 if (containerProperty == null) 84 { 85 throw new IllegalStateException ( 86 "Transformer cannot be cloned until all properties have been set on it"); 87 } 88 return super.clone(); 89 } 90 91 } 92 | Popular Tags |