com.acsinet_solutions.cetia4.tags.support
Class LogTagSupport

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.acsinet_solutions.cetia4.tags.support.LogTagSupport
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
Direct Known Subclasses:
BreadcrumbTag, DisplayDateRangeTag, DisplayTag, InitTag, OptionTag, ParamTag, SetTag, TextAreaTag, TextFieldTag

public abstract class LogTagSupport
extends javax.servlet.jsp.tagext.TagSupport
implements javax.servlet.jsp.tagext.TryCatchFinally, javax.servlet.jsp.tagext.DynamicAttributes

Extension of TagSupport that includes exception handling, log handling, DynamicAttributes handling, and special convenience methods. Used for empty tags.

Author:
Santiago Arriaga
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
LogTagSupport()
           
 
Method Summary
 void doCatch(java.lang.Throwable throwable)
          Prints error so it's easier to find.
 int doEndTag()
           
 void doFinally()
           
protected  void fillDynamicValues(org.apache.ecs.ElementAttributes tag)
          Fill all dynamic attributes on the given ECS generic tag.
protected  void fillDynamicValues(javax.servlet.jsp.JspWriter writer)
          Fill all dynamic attributes on JSP writer.
protected  Configuration getConfiguration()
          Shortcut for the application-wide configuration object.
protected  java.util.Map<java.lang.String,java.lang.String> getDynamicAttributes()
          Return the dynamic attributes for this class as a not null, maybe empty map.
protected  java.util.Locale getLocale()
          Get the locale configured for the current application.
protected  org.apache.commons.logging.Log getLogger()
          Return the internal logger
protected  java.lang.String getPortalPath()
          Get the portal path if configured, or the context path if not.
protected  javax.servlet.http.HttpServletRequest getRequest()
          Convenience method
protected  javax.servlet.ServletContext getServletContext()
          Convenience method
protected  javax.servlet.http.HttpSession getSession()
          Convenience method
 void setDynamicAttribute(java.lang.String namespace, java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogTagSupport

public LogTagSupport()
Method Detail

doCatch

public void doCatch(java.lang.Throwable throwable)
             throws java.lang.Throwable
Prints error so it's easier to find.

Specified by:
doCatch in interface javax.servlet.jsp.tagext.TryCatchFinally
Throws:
java.lang.Throwable

doFinally

public void doFinally()
Specified by:
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinally

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException

setDynamicAttribute

public void setDynamicAttribute(java.lang.String namespace,
                                java.lang.String name,
                                java.lang.Object value)
                         throws javax.servlet.jsp.JspException
Specified by:
setDynamicAttribute in interface javax.servlet.jsp.tagext.DynamicAttributes
Throws:
javax.servlet.jsp.JspException

getDynamicAttributes

protected final java.util.Map<java.lang.String,java.lang.String> getDynamicAttributes()
Return the dynamic attributes for this class as a not null, maybe empty map.


fillDynamicValues

protected final void fillDynamicValues(org.apache.ecs.ElementAttributes tag)
Fill all dynamic attributes on the given ECS generic tag.


fillDynamicValues

protected final void fillDynamicValues(javax.servlet.jsp.JspWriter writer)
                                throws java.io.IOException
Fill all dynamic attributes on JSP writer.

Throws:
java.io.IOException

getLocale

protected final java.util.Locale getLocale()
Get the locale configured for the current application. JSTL locale configuration is used for this method.


getServletContext

protected final javax.servlet.ServletContext getServletContext()
Convenience method


getRequest

protected final javax.servlet.http.HttpServletRequest getRequest()
Convenience method


getSession

protected final javax.servlet.http.HttpSession getSession()
Convenience method


getLogger

protected final org.apache.commons.logging.Log getLogger()
Return the internal logger


getPortalPath

protected final java.lang.String getPortalPath()
Get the portal path if configured, or the context path if not.

See Also:
ControllerTools.getPortalPath(ServletContext,HttpServletRequest)

getConfiguration

protected final Configuration getConfiguration()
Shortcut for the application-wide configuration object.