1 package org.apache.turbine.modules.screens; 2 3 18 19 import org.apache.turbine.services.velocity.TurbineVelocity; 20 import org.apache.turbine.util.RunData; 21 22 import org.apache.velocity.context.Context; 23 24 38 public abstract class VelocitySecureScreen 39 extends VelocityScreen 40 { 41 48 protected abstract void doBuildTemplate(RunData data, 49 Context context) 50 throws Exception ; 51 52 59 protected void doBuildTemplate(RunData data) 60 throws Exception 61 { 62 if (isAuthorized(data)) 63 { 64 doBuildTemplate(data, TurbineVelocity.getContext(data)); 65 } 66 } 67 68 78 protected abstract boolean isAuthorized(RunData data) 79 throws Exception ; 80 } 81 | Popular Tags |