net.sourceforge.cruisecontrol.taglib
Class CruiseControlTagSupport
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
net.sourceforge.cruisecontrol.taglib.CruiseControlTagSupport
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
- BuildInfoTag, CruiseControlBodyTagSupport, CurrentBuildStatusTag, JmxBaseTag, LinkTag, LogLinkTag, NavigationCountTag, TabRowTag, TabTag, XSLTag
- public class CruiseControlTagSupport
- extends javax.servlet.jsp.tagext.TagSupport
A helper class to consolidate tags that deal with log files.
- Author:
- Robert Watkins, Jeff Jensen
- See Also:
- Serialized Form
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
protected java.lang.String |
createUrl(java.lang.String paramToExclude)
|
protected java.lang.String |
createUrl(java.lang.String paramName,
java.lang.String paramValue)
Create a link to the app, including the supplied parameter, but preserving all other parameters. |
protected void |
debug(java.lang.String message)
|
protected void |
debug(java.lang.String message,
java.lang.Throwable throwable)
|
protected void |
err(java.lang.String message)
|
protected void |
err(java.lang.String message,
java.lang.Throwable cause)
|
protected void |
err(java.lang.Throwable exception)
|
protected java.io.File |
findLogDir()
|
protected LogFile |
findLogFile()
Gets the correct log file, based on the project and log file requested
in the query string. |
protected java.lang.String[] |
findProjects()
|
protected java.lang.String |
getBaseLogDir()
|
protected java.lang.String |
getContextParam(java.lang.String name)
|
protected java.util.Locale |
getLocale()
|
static org.apache.commons.logging.Log |
getLog(java.lang.Class clazz)
|
protected javax.servlet.jsp.PageContext |
getPageContext()
|
protected java.lang.String |
getProject()
|
protected javax.servlet.http.HttpServletRequest |
getRequest()
|
protected java.lang.String |
getServletPath()
|
protected void |
info(java.lang.String message)
|
protected boolean |
isSingleProject()
Determine if this is a single project config or not. |
void |
setPageContext(javax.servlet.jsp.PageContext pageContext)
|
void |
setProject(java.lang.String projectName)
|
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG_PARAMETER
protected static final java.lang.String LOG_PARAMETER
- See Also:
- Constant Field Values
CruiseControlTagSupport
public CruiseControlTagSupport()
getLog
public static org.apache.commons.logging.Log getLog(java.lang.Class clazz)
debug
protected void debug(java.lang.String message)
debug
protected void debug(java.lang.String message,
java.lang.Throwable throwable)
info
protected void info(java.lang.String message)
err
protected void err(java.lang.String message)
err
protected void err(java.lang.Throwable exception)
err
protected void err(java.lang.String message,
java.lang.Throwable cause)
getBaseLogDir
protected java.lang.String getBaseLogDir()
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
findLogDir
protected java.io.File findLogDir()
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
findLogFile
protected LogFile findLogFile()
throws javax.servlet.jsp.JspException
- Gets the correct log file, based on the project and log file requested
in the query string.
- Returns:
- The specified log file or the latest log, if no log file is
specified in the request.
- Throws:
javax.servlet.jsp.JspException
- if logDir either does not exist, or is not a directory
findProjects
protected java.lang.String[] findProjects()
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
getContextParam
protected java.lang.String getContextParam(java.lang.String name)
setProject
public void setProject(java.lang.String projectName)
getProject
protected java.lang.String getProject()
isSingleProject
protected boolean isSingleProject()
- Determine if this is a single project config or not.
- Returns:
- true if this is a single project config.
setPageContext
public void setPageContext(javax.servlet.jsp.PageContext pageContext)
getPageContext
protected javax.servlet.jsp.PageContext getPageContext()
getServletPath
protected java.lang.String getServletPath()
getRequest
protected javax.servlet.http.HttpServletRequest getRequest()
createUrl
protected java.lang.String createUrl(java.lang.String paramName,
java.lang.String paramValue)
- Create a link to the app, including the supplied parameter, but preserving all other parameters.
- Parameters:
paramName
- the name of the parameter.paramValue
- the value of the parameter
- Returns:
- a link to the app, including the supplied parameter, but preserving all other parameters.
createUrl
protected java.lang.String createUrl(java.lang.String paramToExclude)
getLocale
protected java.util.Locale getLocale()