1 5 6 package org.infohazard.maverick.flow; 7 8 import java.util.Map ; 9 import javax.servlet.ServletException ; 10 11 14 class TransformWithParams implements Transform 15 { 16 18 protected Transform decorated; 19 protected Map params; 20 21 23 public TransformWithParams(Transform simpler, Map params) 24 { 25 if (params == null) 26 throw new IllegalArgumentException ("Don't use this decorator without params"); 27 28 this.decorated = simpler; 29 this.params = params; 30 } 31 32 35 public TransformStep createStep(TransformContext tctx) throws ServletException 36 { 37 ((MaverickContext)tctx).putAllTransformParams(this.params); 39 40 return this.decorated.createStep(tctx); 41 } 42 } 43 | Popular Tags |