1 package org.apache.turbine.pipeline; 2 3 56 57 import java.io.IOException ; 58 59 import org.apache.turbine.Turbine; 60 import org.apache.turbine.TurbineConstants; 61 import org.apache.turbine.RunData; 62 import org.apache.turbine.Resolver; 63 import org.apache.turbine.TurbineException; 64 import org.apache.turbine.ValveContext; 65 import org.apache.turbine.modules.actions.AccessController; 66 67 74 public class DefaultACLCreationValve 75 extends AbstractValve 76 implements TurbineConstants 77 { 78 protected AccessController accessController = null; 79 80 85 public DefaultACLCreationValve() 86 throws Exception 87 { 88 89 } 90 91 92 95 public void initialize() throws Exception { 96 super.initialize(); 97 Resolver r = Turbine.getResolver(); 98 if (r != null) 99 { 100 accessController = (AccessController) 102 r.getModule(ACTIONS, Turbine.getConfiguration() 103 .getString(ACTION_ACCESS_CONTROLLER)); 104 } 105 } 106 109 public void invoke(RunData data, ValveContext context) 110 throws IOException , TurbineException 111 { 112 try 113 { 114 accessController.execute(data); 120 } 121 catch (Exception e) 122 { 123 throw new TurbineException(e); 124 } 125 126 context.invokeNext(data); 128 } 129 } 130 | Popular Tags |