org.codehaus.plexus.summit.rundata
Class AbstractRunData

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.codehaus.plexus.summit.AbstractSummitComponent
          extended byorg.codehaus.plexus.summit.rundata.AbstractRunData
All Implemented Interfaces:
org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.logging.LogEnabled, RunData, SummitComponent
Direct Known Subclasses:
DefaultRunData

public abstract class AbstractRunData
extends AbstractSummitComponent
implements RunData, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable

The base class from which all RunData implementations are derived.

Version:
$Id: AbstractRunData.java 2289 2005-07-11 04:22:34Z jvanzyl $
Author:
Jason van Zyl

Field Summary
private  java.lang.String contentType
          Content type.
private  java.lang.Throwable error
           
private  java.util.Map map
          General storage.
private  RequestParameterParser parameterParser
          The RequestParameterParser used to parse the request
private  RequestParameters parameters
          Request parameters.
private  javax.servlet.http.HttpServletRequest request
          Servlet Request.
private  Resolution resolution
          Resolution produced by Resolver.
private  javax.servlet.http.HttpServletResponse response
          Servlet Respsonse.
private  java.util.List resultMessages
           
private  javax.servlet.ServletConfig servletConfig
          Servlet Config.
private  java.lang.String target
          Target view.
 
Fields inherited from class org.codehaus.plexus.summit.AbstractSummitComponent
 
Fields inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
 
Fields inherited from interface org.codehaus.plexus.summit.rundata.RunData
ROLE
 
Constructor Summary
AbstractRunData()
           
 
Method Summary
 void dispose()
           
 java.lang.String getContentType()
          Gets the HTTP content type to return.
 java.lang.String getContextPath()
          Get the servlet's context path for this webapp.
 java.lang.Throwable getError()
          Get the error that occurred during request processing
 java.lang.String getLink(java.lang.String path)
          Create a static link to resources in the webapp space.
 java.util.Map getMap()
          Gets the map attribute of the AbstractRunData object
 RequestParameters getParameters()
          Gets the request parameters.
 javax.servlet.http.HttpServletRequest getRequest()
          Gets the request attribute of the AbstractRunData object
 Resolution getResolution()
          Gets the Resolver attribute of the AbstractRunData object
 javax.servlet.http.HttpServletResponse getResponse()
          Gets the response attribute of the AbstractRunData object
 java.util.List getResultMessages()
           
 java.lang.String getScriptName()
          Get the initial script name.
 java.lang.String getServerName()
          Get the server name.
 int getServerPort()
          Get the server port.
 java.lang.String getServerScheme()
          Get the server scheme.
 javax.servlet.ServletConfig getServletConfig()
          Gets the servletConfig attribute of the AbstractRunData object
 javax.servlet.ServletContext getServletContext()
          Get the servlet context for this turbine webapp.
 javax.servlet.http.HttpSession getSession()
          Gets the session attribute of the AbstractRunData object
 java.lang.String getTarget()
          Gets the target attribute of the AbstractRunData object
 boolean hasError()
          Determine whether an error has occured during request processing
 boolean hasResultMessages()
           
 boolean hasTarget()
          Description of the Method
 void initialize()
           
 void setContentType(java.lang.String contentType)
          Sets the HTTP content type to return.
 void setError(java.lang.Throwable error)
          Set the error that occurred during request processing
 void setMap(java.util.Map map)
          Sets the map attribute of the AbstractRunData object
 void setRequest(javax.servlet.http.HttpServletRequest request)
          Sets the request attribute of the AbstractRunData object
 void setResolution(Resolution resolution)
          Sets the Resolver attribute of the AbstractRunData object
 void setResponse(javax.servlet.http.HttpServletResponse response)
          Sets the response attribute of the AbstractRunData object
 void setResultMessages(java.util.List resultMessages)
           
 void setServletConfig(javax.servlet.ServletConfig servletConfig)
          Sets the servletConfig attribute of the AbstractRunData object
 void setTarget(java.lang.String target)
          Sets the target attribute of the AbstractRunData object
 
Methods inherited from class org.codehaus.plexus.summit.AbstractSummitComponent
contextualize, getContainer, lookup, lookup
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.plexus.summit.SummitComponent
getContainer, lookup, lookup
 

Field Detail

target

private java.lang.String target
Target view.


request

private javax.servlet.http.HttpServletRequest request
Servlet Request.


response

private javax.servlet.http.HttpServletResponse response
Servlet Respsonse.


servletConfig

private javax.servlet.ServletConfig servletConfig
Servlet Config.


contentType

private java.lang.String contentType
Content type.


map

private java.util.Map map
General storage.


resolution

private Resolution resolution
Resolution produced by Resolver.


parameters

private RequestParameters parameters
Request parameters.


parameterParser

private RequestParameterParser parameterParser
The RequestParameterParser used to parse the request


error

private java.lang.Throwable error

resultMessages

private java.util.List resultMessages
Constructor Detail

AbstractRunData

public AbstractRunData()
Method Detail

initialize

public void initialize()
                throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
Specified by:
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException

dispose

public void dispose()
Specified by:
dispose in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable

getTarget

public java.lang.String getTarget()
Gets the target attribute of the AbstractRunData object

Specified by:
getTarget in interface RunData

setTarget

public void setTarget(java.lang.String target)
Sets the target attribute of the AbstractRunData object

Specified by:
setTarget in interface RunData

hasTarget

public boolean hasTarget()
Description of the Method

Specified by:
hasTarget in interface RunData

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)
Sets the request attribute of the AbstractRunData object

Specified by:
setRequest in interface RunData

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Gets the request attribute of the AbstractRunData object

Specified by:
getRequest in interface RunData

setResponse

public void setResponse(javax.servlet.http.HttpServletResponse response)
Sets the response attribute of the AbstractRunData object

Specified by:
setResponse in interface RunData

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Gets the response attribute of the AbstractRunData object

Specified by:
getResponse in interface RunData

getSession

public javax.servlet.http.HttpSession getSession()
Gets the session attribute of the AbstractRunData object

Specified by:
getSession in interface RunData

setServletConfig

public void setServletConfig(javax.servlet.ServletConfig servletConfig)
Sets the servletConfig attribute of the AbstractRunData object

Specified by:
setServletConfig in interface RunData

getServletConfig

public javax.servlet.ServletConfig getServletConfig()
Gets the servletConfig attribute of the AbstractRunData object

Specified by:
getServletConfig in interface RunData

setMap

public void setMap(java.util.Map map)
Sets the map attribute of the AbstractRunData object

Specified by:
setMap in interface RunData

getMap

public java.util.Map getMap()
Gets the map attribute of the AbstractRunData object

Specified by:
getMap in interface RunData

setContentType

public void setContentType(java.lang.String contentType)
Sets the HTTP content type to return.

Specified by:
setContentType in interface RunData
Parameters:
contentType - the new content type.

getContentType

public java.lang.String getContentType()
Gets the HTTP content type to return. If a charset has been specified, it is included in the content type. If the charset has not been specified and the main type of the content type is "text", the default charset is included. If the default charset is undefined, but the default locale is defined and it is not the US locale, a locale specific charset is included.

Specified by:
getContentType in interface RunData
Returns:
the content type or an empty string.

getParameters

public RequestParameters getParameters()
Gets the request parameters.

Specified by:
getParameters in interface RunData

setResolution

public void setResolution(Resolution resolution)
Sets the Resolver attribute of the AbstractRunData object

Specified by:
setResolution in interface RunData

getResolution

public Resolution getResolution()
Gets the Resolver attribute of the AbstractRunData object

Specified by:
getResolution in interface RunData

getLink

public java.lang.String getLink(java.lang.String path)
Create a static link to resources in the webapp space.

Parameters:
path - Path to the static resource in the webapp space.
Returns:
Full URL to the static resource in the webapp space.

getContextPath

public java.lang.String getContextPath()
Description copied from interface: RunData
Get the servlet's context path for this webapp.

Specified by:
getContextPath in interface RunData
See Also:
RunData.getContextPath()

getScriptName

public java.lang.String getScriptName()
Description copied from interface: RunData
Get the initial script name.

Specified by:
getScriptName in interface RunData
See Also:
RunData.getScriptName()

getServerName

public java.lang.String getServerName()
Description copied from interface: RunData
Get the server name.

Specified by:
getServerName in interface RunData
See Also:
RunData.getServerName()

getServerPort

public int getServerPort()
Description copied from interface: RunData
Get the server port.

Specified by:
getServerPort in interface RunData
See Also:
RunData.getServerPort()

getServerScheme

public java.lang.String getServerScheme()
Description copied from interface: RunData
Get the server scheme.

Specified by:
getServerScheme in interface RunData
See Also:
RunData.getServerScheme()

getServletContext

public javax.servlet.ServletContext getServletContext()
Description copied from interface: RunData
Get the servlet context for this turbine webapp.

Specified by:
getServletContext in interface RunData
See Also:
RunData.getServletContext()

hasError

public boolean hasError()
Description copied from interface: RunData
Determine whether an error has occured during request processing

Specified by:
hasError in interface RunData

getError

public java.lang.Throwable getError()
Description copied from interface: RunData
Get the error that occurred during request processing

Specified by:
getError in interface RunData

setError

public void setError(java.lang.Throwable error)
Description copied from interface: RunData
Set the error that occurred during request processing

Specified by:
setError in interface RunData

hasResultMessages

public boolean hasResultMessages()
Specified by:
hasResultMessages in interface RunData

getResultMessages

public java.util.List getResultMessages()
Specified by:
getResultMessages in interface RunData

setResultMessages

public void setResultMessages(java.util.List resultMessages)
Specified by:
setResultMessages in interface RunData