Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 959 → Rev 960

/backpath/trunk/src/ak/backpath/taglib/EmptyTagBase.java
0,0 → 1,87
package ak.backpath.taglib;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import ak.backpath.BackPath;
 
public abstract class EmptyTagBase extends TagSupport
{
protected String backPathKey = BackPath.DEFAULT_KEY;
 
public String getBackPathKey()
{
return this.backPathKey;
}
 
public void setBackPathKey(String backPathKey)
{
this.backPathKey = backPathKey;
}
 
protected String backPathParam = BackPath.DEFAULT_PARAM;
 
public String getBackPathParam()
{
return this.backPathParam;
}
 
public void setBackPathParam(String backPathParam)
{
this.backPathParam = backPathParam;
}
 
protected String backPathIgnore = null;
 
public String getBackPathIgnore()
{
return this.backPathIgnore;
}
 
public void setBackPathIgnore(String backPathIgnore)
{
this.backPathIgnore = backPathIgnore;
}
 
protected boolean zip = BackPath.DEFAULT_ZIP;
 
public boolean getZip()
{
return this.zip;
}
 
public void setZip(boolean zip)
{
this.zip = zip;
}
 
public void release()
{
super.release();
backPathKey = BackPath.DEFAULT_KEY;
backPathParam = BackPath.DEFAULT_PARAM;
backPathIgnore = null;
zip = BackPath.DEFAULT_ZIP;
}
 
public int doStartTag() throws JspException
{
if (condition())
return (EVAL_BODY_INCLUDE);
else
return (SKIP_BODY);
}
 
public int doEndTag() throws JspException
{
return (EVAL_PAGE);
}
 
protected abstract boolean condition() throws JspException;
 
protected BackPath findBackPath() throws JspException
{
return TaglibUtils.findBackPath(pageContext, backPathKey,
backPathParam, backPathIgnore, zip);
}
}