org.apache.jetspeed.decoration
Interface Decoration

All Known Subinterfaces:
LayoutDecoration, PortletDecoration

public interface Decoration

Author:
Scott T. Weaver

Field Summary
static String BASE_CSS_CLASS_PROP
          Property for specifying the base CSS class to be used to create a proper CSS cascade and style isolation for a decoration.
static String CONFIG_DESKTOP_FILE_NAME
          Decoration desktop configuration filename
static String CONFIG_FILE_NAME
          Decoration configuration filename
static String DEFAULT_COMMON_STYLE_SHEET
          Default style sheet location
static String DEFAULT_DESKTOP_STYLE_SHEET
           
static String DEFAULT_PORTAL_STYLE_SHEET
           
static String DESKTOP_SUPPORTED_PROPERTY
          Property which indicates whether or not decoration supports desktop mode
static String RESOURCE_BUNDLE_PROP
          Property which specifies the resource bundle locator prefix
static String RESOURCES_DIRECTORY_NAME
          Property which specifies the directory name for resource bundle
 
Method Summary
 List getActions()
          Returns the list of DecoratorActions to be displayed within the portlet window.
 String getBaseCSSClass()
          Returns the base CSS class the template should use to create a proper CSS cascade and style isolation for a decoration.
 String getBasePath()
           Returns the base path for the decoration.
 String getBasePath(String relativePath)
           Returns the base path for the decoration with the relativePath argument added.
 String getCurrentModeAction()
          Returns the name of the currently active mode action
 String getCurrentStateAction()
          Returns the name of the currently active state action
 String getName()
          The name of this Decoration.
 String getProperty(String name)
          Allows access to abritrary properties configured within your decorator.properties config file.
 String getResource(String path)
           Returns the correct path to the resource based on the relative path argument.
 ResourceBundle getResourceBundle(Locale locale, RequestContext context)
           
 String getResourceBundleName()
           
 String getStyleSheet()
           
 String getStyleSheetDesktop()
           
 String getStyleSheetPortal()
           
 void setActions(List actions)
          Set the list of DecoratorActions to be displayed within the portlet window.
 void setCurrentModeAction(String currentModeAction)
          Set the name of the currently active mode action
 void setCurrentStateAction(String currentStateAction)
          Set the name of the currently active state action
 boolean supportsDesktop()
          Indicates whether the decorator supports /desktop
 

Field Detail

DEFAULT_COMMON_STYLE_SHEET

static final String DEFAULT_COMMON_STYLE_SHEET
Default style sheet location

See Also:
Constant Field Values

DEFAULT_PORTAL_STYLE_SHEET

static final String DEFAULT_PORTAL_STYLE_SHEET
See Also:
Constant Field Values

DEFAULT_DESKTOP_STYLE_SHEET

static final String DEFAULT_DESKTOP_STYLE_SHEET
See Also:
Constant Field Values

CONFIG_FILE_NAME

static final String CONFIG_FILE_NAME
Decoration configuration filename

See Also:
Constant Field Values

CONFIG_DESKTOP_FILE_NAME

static final String CONFIG_DESKTOP_FILE_NAME
Decoration desktop configuration filename

See Also:
Constant Field Values

DESKTOP_SUPPORTED_PROPERTY

static final String DESKTOP_SUPPORTED_PROPERTY
Property which indicates whether or not decoration supports desktop mode

See Also:
Constant Field Values

BASE_CSS_CLASS_PROP

static final String BASE_CSS_CLASS_PROP
Property for specifying the base CSS class to be used to create a proper CSS cascade and style isolation for a decoration.

See Also:
Constant Field Values

RESOURCE_BUNDLE_PROP

static final String RESOURCE_BUNDLE_PROP
Property which specifies the resource bundle locator prefix

See Also:
Constant Field Values

RESOURCES_DIRECTORY_NAME

static final String RESOURCES_DIRECTORY_NAME
Property which specifies the directory name for resource bundle

See Also:
Constant Field Values
Method Detail

getName

String getName()
The name of this Decoration.

Returns:
Name of this decoration.

getBasePath

String getBasePath()

Returns the base path for the decoration.

Returns:
the base path for the decoration.

getBasePath

String getBasePath(String relativePath)

Returns the base path for the decoration with the relativePath argument added.

Parameters:
relativePath -
Returns:
the base path for the decoration with the relativePath argument added.

getResource

String getResource(String path)

Returns the correct path to the resource based on the relative path argument. This usually entails locating the resource that is most appropriate for the current users client and locale.

 Example Criterion:
 
 Relative Path: images/myimage.gif
 Client:        web browser
 Language:      en 
 Country:       US 
 
 

The implementation should now attempt to resolve the resource using logic that starts at the most specific and ends at the most general path.

For exmaples sake, lets say we are concerned with finding the image, myimage.gif, within the layout decoration, tigris. The logical progression to find the resourc, myimage.gif, would be as follows:

 
 /decorations/layout/tigris/html/en/US/images/myimage.gif
 /decorations/layout/tigris/html/en/images/myimage.gif
 /decorations/layout/tigris/html/images/myimage.gif
 /decorations/layout/tigris/images/myimage.gif
 /decorations/layout/images/myimage.gif
 /decorations/layout/images/myimage.gif
 

Parameters:
path -
Returns:
the correct path to the resource based on the relative path argument.

getStyleSheet

String getStyleSheet()
Returns:
The appropriate stylesheet to be used with this decoration.

getStyleSheetPortal

String getStyleSheetPortal()
Returns:
the /portal specific stylesheet to be used with this decoration; defined only when decoration supports /desktop.

getStyleSheetDesktop

String getStyleSheetDesktop()
Returns:
the /desktop specific stylesheet to be used with this decoration; defined only when decoration supports /desktop.

getActions

List getActions()
Returns the list of DecoratorActions to be displayed within the portlet window.

Returns:
the list of DecoratorActions to be displayed within the portlet window.
See Also:
org.apache.jetspeed.decoration.DecoratorAction

setActions

void setActions(List actions)
Set the list of DecoratorActions to be displayed within the portlet window.

Parameters:
actions - actions to displayed within this portlet window.
See Also:
org.apache.jetspeed.decoration.DecoratorAction

getProperty

String getProperty(String name)
Allows access to abritrary properties configured within your decorator.properties config file.

Parameters:
name -
Returns:
value of decoration property which matches name argument.

getBaseCSSClass

String getBaseCSSClass()
Returns the base CSS class the template should use to create a proper CSS cascade and style isolation for a decoration.

Returns:
the base CSS class the template should use.

getCurrentModeAction

String getCurrentModeAction()
Returns the name of the currently active mode action

Returns:
the name of the currently active mode action

setCurrentModeAction

void setCurrentModeAction(String currentModeAction)
Set the name of the currently active mode action


getCurrentStateAction

String getCurrentStateAction()
Returns the name of the currently active state action

Returns:
the name of the currently active state action

setCurrentStateAction

void setCurrentStateAction(String currentStateAction)
Set the name of the currently active state action


getResourceBundleName

String getResourceBundleName()
Returns:
the resource bundle locator prefix.

getResourceBundle

ResourceBundle getResourceBundle(Locale locale,
                                 RequestContext context)
Returns:
the resource bundle for the given Locale and RequestContext.

supportsDesktop

boolean supportsDesktop()
Indicates whether the decorator supports /desktop



Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.