1 16 package org.apache.cocoon.portal.coplets.basket; 17 18 import org.apache.avalon.framework.activity.Disposable; 19 import org.apache.avalon.framework.service.ServiceException; 20 import org.apache.avalon.framework.service.ServiceManager; 21 import org.apache.cocoon.transformation.AbstractSAXTransformer; 22 23 28 public abstract class AbstractBasketTransformer extends AbstractSAXTransformer 29 implements Disposable { 30 31 32 public static final String NAMESPACE_URI = "http://apache.org/cocoon/portal/basket/1.0"; 33 34 35 protected BasketManager basketManager; 36 37 40 public AbstractBasketTransformer() { 41 super.defaultNamespaceURI = NAMESPACE_URI; 42 } 43 44 47 public void service(ServiceManager manager) throws ServiceException { 48 super.service(manager); 49 this.basketManager = (BasketManager) this.manager.lookup(BasketManager.ROLE); 50 } 51 52 55 public void dispose() { 56 if (this.manager != null) { 57 this.manager.release(this.basketManager); 58 } 59 super.dispose(); 60 } 61 } 62 | Popular Tags |