com.cc.framework.ui.painter.imp
Class PainterContextWrapper

java.lang.Object
  extended bycom.cc.framework.ui.painter.imp.PainterContextWrapper
All Implemented Interfaces:
HttpContext, PainterContext, RequestContext
Direct Known Subclasses:
CellPainterContext

public class PainterContextWrapper
extends java.lang.Object
implements PainterContext

Wrapper for a painter context

Author:
P001002

Field Summary
private  PainterContext nested
          The nested painter context
 
Constructor Summary
PainterContextWrapper(PainterContext nested)
          Constructor
 
Method Summary
 java.lang.String attr(java.lang.Object raw)
          Converts a String to a valid HTML Attribute
 java.lang.String attr(java.lang.Object raw, boolean filter)
          Converts a String to a valid HTML Attribute
 java.lang.String attr(java.lang.Object raw, boolean filter, int maxlength)
          Converts a String to a valid HTML Attribute
 void close()
          After the painter context has been used it has to be closed.
 ActionPainter createActionPainter(ControlActionDef action)
          Creates an ActionPainter.
 ActionPainter createActionPainter(ControlActionDef action, java.lang.String actionName)
          Creates an ActionPainter.
 org.apache.ecs.html.IMG createImage(ImageModel image)
          Retrieves an image for the specified Id
 org.apache.ecs.html.IMG createImage(int size, java.lang.String resourceId)
          Retrieves an image for the specified Id
 org.apache.ecs.html.IMG createImage(java.lang.String resourceId)
          Retrieves an image for the specified Id
 org.apache.ecs.html.IMG createImage(java.lang.String resourceId, java.lang.Object param)
          Retrieves an image for the specified Id
 org.apache.ecs.html.Input createInput(ImageModel image)
          Retrieves an image for the specified Id
 org.apache.ecs.html.Input createInput(java.lang.String resourceId)
          Retrieves an image for the specified Id
 java.lang.String decorateURL(java.lang.String url)
          Decorates the URL with RequestDecorator settings and appends the JSESSIONID when URL-rewriting is enabled to track sessions Every URL has to be decorated this way!
 java.lang.String getAsString(Converter converter, java.lang.Object value)
          Uses a Bean Converter to convert the given object to a String representation.
 java.lang.Object getAttribute(java.lang.String key, boolean searchParent)
          Gets an Attribute from the Painter Context hierarchy
 java.lang.Object getAttribute(java.lang.String name, HttpScope scope)
          Returns the attribute with the given name from the specified scope
 java.awt.Color getAwtColor(java.lang.String resourceId)
          Retrieves an color for the specified Id
 Color getColor(java.lang.String resourceId)
          Retrieves an color for the specified Id
 Control getControl()
           
 java.lang.String getElementName()
          Retrieves the name of the HTML element.
 java.lang.String getFrameworkString(java.lang.String resourceId)
          Returns a framework string resource
 java.lang.String getFrameworkString(java.lang.String resourceId, java.lang.Object[] arguments)
          Returns a framework string resource
 ImageModel getImage(int size, java.lang.String resourceId)
          Retrieves an image for the specified Id
 ImageModel getImage(java.lang.String resourceId)
          Retrieves an image for the specified Id
 ImageModel getImage(java.lang.String resourceId, java.lang.Object param)
          Retrieves an image for the specified Id
 java.lang.String getImageSrc(int size, java.lang.String resourceId)
          Retrieves an image for the specified Id
 java.lang.String getImageSrc(java.lang.String resourceId)
          Retrieves an image for the specified Id
 java.lang.String getImageSrc(java.lang.String resourceId, java.lang.Object param)
          Retrieves an image for the specified Id
 java.util.Locale getLocale()
          Gets the Locale Setting for this Control
 RequestContext getNestedContext()
          Gets the nested Action Context
 javax.servlet.jsp.PageContext getPageContext()
          Gets the Page Context
 Principal getPrincipal()
          Returns the Principal Object in the current User session
 java.lang.String getResourceDir()
          Returns the base directory used for resource by the painter factory
 javax.servlet.ServletContext getServletContext()
          Returns the Servlet Context
 java.lang.String getSource(ImageModel image)
          Gets the localized resource name
 java.lang.String getSource(java.lang.String base, java.lang.String src)
          Returns the localized Image resource name
 java.lang.String getStringResource(java.lang.String stringOrKey)
          Returns a string resource
 java.lang.String getStyleId()
          Returns the Style Id of the control.
 boolean hasAttribute(java.lang.String key, boolean searchParent)
          Gets an Attribute from the Painter Context hierarchy
 java.lang.String html(java.lang.Object raw)
          Converts a String to an equivalent HTML-String
 java.lang.String html(java.lang.Object raw, boolean filter)
          Converts a String to an equivalent HTML-String
 java.lang.String html(java.lang.Object raw, boolean filter, int maxlength)
          Converts a String to an equivalent HTML-String
 boolean isDisplayOnly()
          This method checks if a control that is rendered within this painter context has to be "display only"
 boolean isRunAtClient()
          This Method checks if the control should run on the client
 java.lang.String localize(java.lang.String keyOrString)
          Localizes a string depending on the localization settings of the Painter context
 java.lang.String localize(java.lang.String keyOrString, java.util.Locale locale)
          Localizes a string depending on the localization settings of the Painter context
 java.lang.String localize(java.lang.String keyOrString, java.lang.Object[] arguments)
          Localizes a string depending on the localization settings of the Painter context
 java.lang.String localizeKey(java.lang.String resourceId, java.lang.Object[] arguments, boolean returnNull)
          Localizes a string depending on the localization settings of the Painter context.
 void open()
          The painter context has to be opened before it can be used.
 void popAttributes()
          Restores the attributes from the Stack all current attributes are lost
 void pushAttributes()
          Pushes the current attributes on a stack for later restore
 java.lang.Object removeAttribute(java.lang.String key)
          Removes an Attribute for this Painter
 java.lang.String removeHtml(java.lang.Object html)
          Removes all HTML formatting from the given HTML-String
 java.lang.String removeHtml(java.lang.Object html, boolean filter)
          Removes all HTML formatting from the given HTML-String depending on the filter setting
 javax.servlet.http.HttpServletRequest request()
          Returns the HTTP Request
 javax.servlet.http.HttpServletResponse response()
          Returns the HTTP Response
 javax.servlet.http.HttpSession session()
          Gets the session object
 void setAttribute(java.lang.String key, java.lang.Object value)
          Sets an Attribute for this Painter
 void setFactory(PainterFactory factory)
          Sets the painter factory
 boolean showComments()
          This method checks if HTML comments should be written to the output
 java.lang.String truncate(java.lang.Object obj, int maxlength)
          Truncates a given string to a maximum number of characters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nested

private PainterContext nested
The nested painter context

Constructor Detail

PainterContextWrapper

public PainterContextWrapper(PainterContext nested)
Constructor

Parameters:
nested - the painter context that should be wrapped
Method Detail

close

public void close()
Description copied from interface: PainterContext
After the painter context has been used it has to be closed. This will remove some internal variables from the request

Specified by:
close in interface PainterContext
See Also:
PainterContext.close()

createActionPainter

public ActionPainter createActionPainter(ControlActionDef action,
                                         java.lang.String actionName)
Description copied from interface: PainterContext
Creates an ActionPainter. The Painter is used by Controls to render Actions into the user interface

Specified by:
createActionPainter in interface PainterContext
Parameters:
action - ControlAction
actionName - Additional Action Name
Returns:
ActionPainter
See Also:
PainterContext.createActionPainter(com.cc.framework.ui.control.ControlActionDef, java.lang.String)

createActionPainter

public ActionPainter createActionPainter(ControlActionDef action)
Description copied from interface: PainterContext
Creates an ActionPainter. The Painter is used by Controls to render Actions into the user interface

Specified by:
createActionPainter in interface PainterContext
Parameters:
action - ControlAction
Returns:
ActionPainter
See Also:
PainterContext.createActionPainter(com.cc.framework.ui.control.ControlActionDef)

createImage

public org.apache.ecs.html.IMG createImage(ImageModel image)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
createImage in interface PainterContext
Parameters:
image - Image
Returns:
The Image or null
See Also:
PainterContext.createImage(com.cc.framework.ui.model.ImageModel)

createImage

public org.apache.ecs.html.IMG createImage(int size,
                                           java.lang.String resourceId)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
createImage in interface PainterContext
Parameters:
size - Image size
resourceId - Image Code
Returns:
The Image or null
See Also:
PainterContext.createImage(int, java.lang.String)

createImage

public org.apache.ecs.html.IMG createImage(java.lang.String resourceId,
                                           java.lang.Object param)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
createImage in interface PainterContext
Parameters:
resourceId - Image Code
param - Markup parameter
Returns:
The Image or null
See Also:
PainterContext.createImage(java.lang.String, java.lang.Object)

createImage

public org.apache.ecs.html.IMG createImage(java.lang.String resourceId)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
createImage in interface PainterContext
Parameters:
resourceId - Image Code
Returns:
The Image or null
See Also:
PainterContext.createImage(java.lang.String)

createInput

public org.apache.ecs.html.Input createInput(ImageModel image)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
createInput in interface PainterContext
Parameters:
image - Image
Returns:
The Image or null
See Also:
PainterContext.createInput(com.cc.framework.ui.model.ImageModel)

createInput

public org.apache.ecs.html.Input createInput(java.lang.String resourceId)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
createInput in interface PainterContext
Parameters:
resourceId - Image Code
Returns:
The Image or null
See Also:
PainterContext.createInput(java.lang.String)

decorateURL

public java.lang.String decorateURL(java.lang.String url)
Description copied from interface: PainterContext
Decorates the URL with RequestDecorator settings and appends the JSESSIONID when URL-rewriting is enabled to track sessions Every URL has to be decorated this way!

Specified by:
decorateURL in interface PainterContext
Parameters:
url - the URL to encode
Returns:
encoded URL
See Also:
PainterContext.decorateURL(java.lang.String)

getAsString

public java.lang.String getAsString(Converter converter,
                                    java.lang.Object value)
                             throws ConverterException
Description copied from interface: PainterContext
Uses a Bean Converter to convert the given object to a String representation.

Specified by:
getAsString in interface PainterContext
Parameters:
converter - The converter to use or null to use a default Converter
value - The Bean to convert
Returns:
String or null
Throws:
ConverterException - Is thrown when a conversion exception occurs
See Also:
PainterContext.getAsString(com.cc.framework.convert.Converter, java.lang.Object)

getAttribute

public java.lang.Object getAttribute(java.lang.String key,
                                     boolean searchParent)
Description copied from interface: PainterContext
Gets an Attribute from the Painter Context hierarchy

Specified by:
getAttribute in interface PainterContext
Parameters:
key - Attribute Key
searchParent - if set to true the attribute will be search up the PainterContext hierarchy
Returns:
Value or null
See Also:
PainterContext.getAttribute(java.lang.String, boolean)

getAwtColor

public java.awt.Color getAwtColor(java.lang.String resourceId)
Description copied from interface: PainterContext
Retrieves an color for the specified Id

Specified by:
getAwtColor in interface PainterContext
Parameters:
resourceId - Color Code
Returns:
The Color or null
See Also:
PainterContext.getAwtColor(java.lang.String)

getColor

public Color getColor(java.lang.String resourceId)
Description copied from interface: PainterContext
Retrieves an color for the specified Id

Specified by:
getColor in interface PainterContext
Parameters:
resourceId - Color Code
Returns:
The Color or null
See Also:
PainterContext.getColor(java.lang.String)

getControl

public Control getControl()
Specified by:
getControl in interface PainterContext
Returns:
Gets the Control
See Also:
PainterContext.getControl()

getElementName

public java.lang.String getElementName()
Description copied from interface: PainterContext
Retrieves the name of the HTML element. This could be a path name when the control is nested within another control

Specified by:
getElementName in interface PainterContext
Returns:
The name to use for the name-attribute of a HTML element
See Also:
PainterContext.getElementName()

getFrameworkString

public java.lang.String getFrameworkString(java.lang.String resourceId,
                                           java.lang.Object[] arguments)
Description copied from interface: PainterContext
Returns a framework string resource

Specified by:
getFrameworkString in interface PainterContext
Parameters:
resourceId - Id of the resource/key
arguments - MessageFormat arguments
Returns:
The value for the resource id
See Also:
PainterContext.getFrameworkString(java.lang.String, java.lang.Object[])

getFrameworkString

public java.lang.String getFrameworkString(java.lang.String resourceId)
Description copied from interface: PainterContext
Returns a framework string resource

Specified by:
getFrameworkString in interface PainterContext
Parameters:
resourceId - Id of the resource/key
Returns:
The value for the resource id
See Also:
PainterContext.getFrameworkString(java.lang.String)

getImage

public ImageModel getImage(int size,
                           java.lang.String resourceId)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
getImage in interface PainterContext
Parameters:
size - Image size
resourceId - Image Code
Returns:
The Image or null
See Also:
PainterContext.getImage(int, java.lang.String)

getImage

public ImageModel getImage(java.lang.String resourceId,
                           java.lang.Object param)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
getImage in interface PainterContext
Parameters:
resourceId - Image Code
param - Markup parameter
Returns:
The Image or null
See Also:
PainterContext.getImage(java.lang.String, java.lang.Object)

getImage

public ImageModel getImage(java.lang.String resourceId)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
getImage in interface PainterContext
Parameters:
resourceId - Image Code
Returns:
The Image or null
See Also:
PainterContext.getImage(java.lang.String)

getImageSrc

public java.lang.String getImageSrc(int size,
                                    java.lang.String resourceId)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
getImageSrc in interface PainterContext
Parameters:
size - Image size
resourceId - Image Code
Returns:
The Image Source
See Also:
PainterContext.getImageSrc(int, java.lang.String)

getImageSrc

public java.lang.String getImageSrc(java.lang.String resourceId,
                                    java.lang.Object param)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
getImageSrc in interface PainterContext
Parameters:
resourceId - Image Code
param - Markup Parameter
Returns:
The Image Source
See Also:
PainterContext.getImageSrc(java.lang.String, java.lang.Object)

getImageSrc

public java.lang.String getImageSrc(java.lang.String resourceId)
Description copied from interface: PainterContext
Retrieves an image for the specified Id

Specified by:
getImageSrc in interface PainterContext
Parameters:
resourceId - Image Code
Returns:
The Image Source
See Also:
PainterContext.getImageSrc(java.lang.String)

getLocale

public java.util.Locale getLocale()
Description copied from interface: PainterContext
Gets the Locale Setting for this Control

Specified by:
getLocale in interface PainterContext
Returns:
Locale Setting
See Also:
PainterContext.getLocale()

getPageContext

public javax.servlet.jsp.PageContext getPageContext()
Description copied from interface: PainterContext
Gets the Page Context

Specified by:
getPageContext in interface PainterContext
Returns:
PageContext
See Also:
PainterContext.getPageContext()

getResourceDir

public java.lang.String getResourceDir()
Description copied from interface: PainterContext
Returns the base directory used for resource by the painter factory

Specified by:
getResourceDir in interface PainterContext
Returns:
The web resource directory
See Also:
PainterContext.getResourceDir()

getSource

public java.lang.String getSource(ImageModel image)
Description copied from interface: PainterContext
Gets the localized resource name

Specified by:
getSource in interface PainterContext
Parameters:
image - Image Model
Returns:
localized resource name
See Also:
PainterContext.getSource(com.cc.framework.ui.model.ImageModel)

getSource

public java.lang.String getSource(java.lang.String base,
                                  java.lang.String src)
Description copied from interface: PainterContext
Returns the localized Image resource name

Specified by:
getSource in interface PainterContext
Parameters:
base - Base Directory or resource Identifier
src - Resource name
Returns:
localized resource name
See Also:
PainterContext.getSource(java.lang.String, java.lang.String)

getStringResource

public java.lang.String getStringResource(java.lang.String stringOrKey)
Description copied from interface: PainterContext
Returns a string resource

Specified by:
getStringResource in interface PainterContext
Parameters:
stringOrKey - Id of the resource/key
Returns:
The value for the resource id
See Also:
PainterContext.getStringResource(java.lang.String)

getStyleId

public java.lang.String getStyleId()
Description copied from interface: PainterContext
Returns the Style Id of the control. Under some circumstances this method will generate an unique Style id if no style id is explicit set.

Specified by:
getStyleId in interface PainterContext
Returns:
style id for this control
See Also:
PainterContext.getStyleId()

hasAttribute

public boolean hasAttribute(java.lang.String key,
                            boolean searchParent)
Description copied from interface: PainterContext
Gets an Attribute from the Painter Context hierarchy

Specified by:
hasAttribute in interface PainterContext
Parameters:
key - Attribute Key
searchParent - if set to true the attribute will be search up the PainterContext hierarchy
Returns:
Value or null
See Also:
PainterContext.hasAttribute(java.lang.String, boolean)

html

public java.lang.String html(java.lang.Object raw,
                             boolean filter,
                             int maxlength)
Description copied from interface: PainterContext
Converts a String to an equivalent HTML-String

Specified by:
html in interface PainterContext
Parameters:
raw - Object
filter - Filter
maxlength - The maximum number of visible characters
Returns:
String
See Also:
PainterContext.html(java.lang.Object, boolean, int)

html

public java.lang.String html(java.lang.Object raw,
                             boolean filter)
Description copied from interface: PainterContext
Converts a String to an equivalent HTML-String

Specified by:
html in interface PainterContext
Parameters:
raw - Object
filter - Filter
Returns:
String
See Also:
PainterContext.html(java.lang.Object, boolean)

removeHtml

public java.lang.String removeHtml(java.lang.Object html)
Description copied from interface: PainterContext
Removes all HTML formatting from the given HTML-String

Specified by:
removeHtml in interface PainterContext
Parameters:
html - Object in HTML format
Returns:
String
See Also:
PainterContext.removeHtml(java.lang.Object)

removeHtml

public java.lang.String removeHtml(java.lang.Object html,
                                   boolean filter)
Description copied from interface: PainterContext
Removes all HTML formatting from the given HTML-String depending on the filter setting

Specified by:
removeHtml in interface PainterContext
Parameters:
html - Object in HTML format
filter - Filter
Returns:
String
See Also:
PainterContext.removeHtml(java.lang.Object, boolean)

html

public java.lang.String html(java.lang.Object raw)
Description copied from interface: PainterContext
Converts a String to an equivalent HTML-String

Specified by:
html in interface PainterContext
Parameters:
raw - Object
Returns:
String
See Also:
PainterContext.html(java.lang.Object)

attr

public java.lang.String attr(java.lang.Object raw,
                             boolean filter,
                             int maxlength)
Description copied from interface: PainterContext
Converts a String to a valid HTML Attribute

Specified by:
attr in interface PainterContext
Parameters:
raw - Object
filter - Filter
maxlength - The maximum number of visible characters
Returns:
String
See Also:
PainterContext.attr(java.lang.Object, boolean, int)

attr

public java.lang.String attr(java.lang.Object raw,
                             boolean filter)
Description copied from interface: PainterContext
Converts a String to a valid HTML Attribute

Specified by:
attr in interface PainterContext
Parameters:
raw - Object
filter - Filter
Returns:
String
See Also:
PainterContext.attr(java.lang.Object, boolean)

attr

public java.lang.String attr(java.lang.Object raw)
Description copied from interface: PainterContext
Converts a String to a valid HTML Attribute

Specified by:
attr in interface PainterContext
Parameters:
raw - Object
Returns:
String
See Also:
PainterContext.attr(java.lang.Object)

isDisplayOnly

public boolean isDisplayOnly()
Description copied from interface: PainterContext
This method checks if a control that is rendered within this painter context has to be "display only"

Specified by:
isDisplayOnly in interface PainterContext
Returns:
returns true if a control should be rendered as display only
See Also:
PainterContext.isDisplayOnly()

isRunAtClient

public boolean isRunAtClient()
Description copied from interface: PainterContext
This Method checks if the control should run on the client

Specified by:
isRunAtClient in interface PainterContext
Returns:
Returns true when the component should run on the client
See Also:
PainterContext.isRunAtClient()

localize

public java.lang.String localize(java.lang.String keyOrString,
                                 java.util.Locale locale)
Description copied from interface: PainterContext
Localizes a string depending on the localization settings of the Painter context

Specified by:
localize in interface PainterContext
Parameters:
keyOrString - String Literal or Resource Key
locale - the locale to use
Returns:
localized String
See Also:
PainterContext.localize(java.lang.String, java.util.Locale)

localize

public java.lang.String localize(java.lang.String keyOrString,
                                 java.lang.Object[] arguments)
Description copied from interface: PainterContext
Localizes a string depending on the localization settings of the Painter context

Specified by:
localize in interface PainterContext
Parameters:
keyOrString - String Literal or Resource Key
arguments - MessageFormat arguments
Returns:
localized String
See Also:
PainterContext.localize(java.lang.String, java.lang.Object[])

localize

public java.lang.String localize(java.lang.String keyOrString)
Description copied from interface: PainterContext
Localizes a string depending on the localization settings of the Painter context

Specified by:
localize in interface PainterContext
Parameters:
keyOrString - String Literal or Resource Key
Returns:
localized String
See Also:
PainterContext.localize(java.lang.String)

localizeKey

public java.lang.String localizeKey(java.lang.String resourceId,
                                    java.lang.Object[] arguments,
                                    boolean returnNull)
Description copied from interface: PainterContext
Localizes a string depending on the localization settings of the Painter context. A key is searched in the following order:
  1. If no user defined resource bundle is used. The resource is searched under the STRUTS_MESSAGES_KEY.
  2. If an user defined resource bundle is used (key@bundle) the resource is searched in the specified resource bundle.
  3. If the key was not found before, the resource is searched in the framework resource bundle under the key Globals.MESSAGE.

Specified by:
localizeKey in interface PainterContext
Parameters:
resourceId - The resource key.
arguments - MessageFormat arguments or null
returnNull - controls whether to return null or a not present indicator
Returns:
localized String
See Also:
PainterContext.localizeKey(java.lang.String, java.lang.Object[], boolean)

open

public void open()
Description copied from interface: PainterContext
The painter context has to be opened before it can be used. It initializes some internal variables

Specified by:
open in interface PainterContext
See Also:
PainterContext.open()

popAttributes

public void popAttributes()
Description copied from interface: PainterContext
Restores the attributes from the Stack all current attributes are lost

Specified by:
popAttributes in interface PainterContext
See Also:
PainterContext.popAttributes()

pushAttributes

public void pushAttributes()
Description copied from interface: PainterContext
Pushes the current attributes on a stack for later restore

Specified by:
pushAttributes in interface PainterContext
See Also:
PainterContext.pushAttributes()

removeAttribute

public java.lang.Object removeAttribute(java.lang.String key)
Description copied from interface: PainterContext
Removes an Attribute for this Painter

Specified by:
removeAttribute in interface PainterContext
Parameters:
key - Attribute Key
Returns:
Value or null
See Also:
PainterContext.removeAttribute(java.lang.String)

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Description copied from interface: PainterContext
Sets an Attribute for this Painter

Specified by:
setAttribute in interface PainterContext
Parameters:
key - Attribute Key
value - Attribute Value
See Also:
PainterContext.setAttribute(java.lang.String, java.lang.Object)

setFactory

public void setFactory(PainterFactory factory)
Description copied from interface: PainterContext
Sets the painter factory

Specified by:
setFactory in interface PainterContext
Parameters:
factory - Painter factory
See Also:
PainterContext.setFactory(com.cc.framework.ui.painter.PainterFactory)

showComments

public boolean showComments()
Description copied from interface: PainterContext
This method checks if HTML comments should be written to the output

Specified by:
showComments in interface PainterContext
Returns:
false when comments should be hidden
See Also:
PainterContext.showComments()

truncate

public java.lang.String truncate(java.lang.Object obj,
                                 int maxlength)
Description copied from interface: PainterContext
Truncates a given string to a maximum number of characters

Specified by:
truncate in interface PainterContext
Parameters:
obj - The string to truncate
maxlength - The maximum number of characters
Returns:
truncated string
See Also:
PainterContext.truncate(java.lang.Object, int)

getNestedContext

public RequestContext getNestedContext()
Description copied from interface: RequestContext
Gets the nested Action Context

Specified by:
getNestedContext in interface RequestContext
Returns:
The nested Action Context
See Also:
RequestContext.getNestedContext()

getPrincipal

public Principal getPrincipal()
Description copied from interface: RequestContext
Returns the Principal Object in the current User session

Specified by:
getPrincipal in interface RequestContext
Returns:
The object which implements the principal interface
See Also:
RequestContext.getPrincipal()

getAttribute

public java.lang.Object getAttribute(java.lang.String name,
                                     HttpScope scope)
Description copied from interface: HttpContext
Returns the attribute with the given name from the specified scope

Specified by:
getAttribute in interface HttpContext
Parameters:
name - the attribute name
scope - the scope to search
Returns:
attribute value or null
See Also:
HttpContext.getAttribute(java.lang.String, com.cc.framework.http.HttpScope)

getServletContext

public javax.servlet.ServletContext getServletContext()
Description copied from interface: HttpContext
Returns the Servlet Context

Specified by:
getServletContext in interface HttpContext
Returns:
ServletContext
See Also:
HttpContext.getServletContext()

request

public javax.servlet.http.HttpServletRequest request()
Description copied from interface: HttpContext
Returns the HTTP Request

Specified by:
request in interface HttpContext
Returns:
the HttpServletRequest
See Also:
HttpContext.request()

response

public javax.servlet.http.HttpServletResponse response()
Description copied from interface: HttpContext
Returns the HTTP Response

Specified by:
response in interface HttpContext
Returns:
the HttpServletResponse
See Also:
HttpContext.response()

session

public javax.servlet.http.HttpSession session()
Description copied from interface: HttpContext
Gets the session object

Specified by:
session in interface HttpContext
Returns:
HttpSession
See Also:
HttpContext.session()


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.