1 package com.tonbeller.jpivot.tags; 2 3 import javax.servlet.jsp.JspException ; 4 import javax.servlet.jsp.tagext.TagSupport ; 5 6 import org.apache.log4j.Logger; 7 8 13 public class DestroyQueryTag extends TagSupport { 14 private static final Logger logger = Logger.getLogger(DestroyQueryTag.class); 15 String queryName; 16 17 public int doStartTag() throws JspException { 18 OlapModelProxy omp = OlapModelProxy.instance(id, pageContext.getSession()); 19 try { 20 if (queryName == null) 21 omp.destroyAll(); 22 else 23 omp.destroyQuery(queryName); 24 } catch (Exception e) { 25 logger.error(null, e); 26 throw new JspException (e); 27 } 28 return super.doStartTag(); 29 } 30 31 public void setQueryName(String queryName) { 32 this.queryName = queryName; 33 } 34 } 35 | Popular Tags |