1 16 package org.apache.cocoon.woody.acting; 17 18 import org.apache.cocoon.woody.FormManager; 19 import org.apache.cocoon.acting.Action; 20 import org.apache.avalon.framework.activity.Disposable; 21 import org.apache.avalon.framework.thread.ThreadSafe; 22 import org.apache.avalon.framework.service.Serviceable; 23 import org.apache.avalon.framework.service.ServiceManager; 24 import org.apache.avalon.framework.service.ServiceException; 25 26 31 public abstract class AbstractWoodyAction 32 implements Action, ThreadSafe, Serviceable, Disposable { 33 34 protected ServiceManager manager; 35 36 protected FormManager formManager; 37 38 public void service(ServiceManager serviceManager) throws ServiceException { 39 this.manager = serviceManager; 40 this.formManager = (FormManager)serviceManager.lookup(FormManager.ROLE); 41 } 42 43 public void dispose() { 44 if ( this.manager != null ) { 45 this.manager.release( this.formManager ); 46 this.manager = null; 47 this.formManager = null; 48 } 49 } 50 } 51 | Popular Tags |