org.apache.jetspeed.decoration
Interface Decoration

All Known Subinterfaces:
LayoutDecoration, PortletDecoration

public interface Decoration

Author:
Scott T. Weaver

Nested Class Summary
static class Decoration.ActionsOption
           
static class Decoration.TitleOption
           
 
Field Summary
static java.lang.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 java.lang.String CONFIG_DESKTOP_FILE_NAME
          Decoration desktop configuration filename
static java.lang.String CONFIG_FILE_NAME
          Decoration configuration filename
static java.lang.String DEFAULT_COMMON_STYLE_SHEET
          Default style sheet location
static java.lang.String DEFAULT_DESKTOP_STYLE_SHEET
           
static java.lang.String DEFAULT_PORTAL_STYLE_SHEET
           
static java.lang.String DESKTOP_SUPPORTED_PROPERTY
          Property which indicates whether or not decoration supports desktop mode
static java.lang.String OPTION_ACTIONS
           
static java.lang.String OPTION_DRAGHANDLE
           
static java.lang.String OPTION_TITLE
           
static java.lang.String RESOURCE_BUNDLE_PROP
          Property which specifies the resource bundle locator prefix
static java.lang.String RESOURCES_DIRECTORY_NAME
          Property which specifies the directory name for resource bundle
 
Method Summary
 java.util.List getActions()
          Returns the list of DecoratorActions to be displayed within the portlet window.
 Decoration.ActionsOption getActionsOption()
           
 java.lang.String getBaseCSSClass()
          Returns the base CSS class the template should use to create a proper CSS cascade and style isolation for a decoration.
 java.lang.String getBasePath()
           Returns the base path for the decoration.
 java.lang.String getBasePath(java.lang.String relativePath)
           Returns the base path for the decoration with the relativePath argument added.
 java.lang.String getCurrentModeAction()
          Returns the name of the currently active mode action
 java.lang.String getCurrentStateAction()
          Returns the name of the currently active state action
 java.lang.String getDragHandle()
           
 java.lang.String getName()
          The name of this Decoration.
 java.lang.String getProperty(java.lang.String name)
          Allows access to abritrary properties configured within your decorator.properties config file.
 java.lang.String getResource(java.lang.String path)
           Returns the correct path to the resource based on the relative path argument.
 java.util.ResourceBundle getResourceBundle(java.util.Locale locale, RequestContext context)
           
 java.lang.String getResourceBundleName()
           
 java.lang.String getStyleSheet()
           
 java.lang.String getStyleSheetDesktop()
           
 java.lang.String getStyleSheetPortal()
           
 Decoration.TitleOption getTitleOption()
           
 void setActions(java.util.List actions)
          Set the list of DecoratorActions to be displayed within the portlet window.
 void setCurrentModeAction(java.lang.String currentModeAction)
          Set the name of the currently active mode action
 void setCurrentStateAction(java.lang.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 java.lang.String DEFAULT_COMMON_STYLE_SHEET
Default style sheet location

See Also:
Constant Field Values

DEFAULT_PORTAL_STYLE_SHEET

static final java.lang.String DEFAULT_PORTAL_STYLE_SHEET
See Also:
Constant Field Values

DEFAULT_DESKTOP_STYLE_SHEET

static final java.lang.String DEFAULT_DESKTOP_STYLE_SHEET
See Also:
Constant Field Values

CONFIG_FILE_NAME

static final java.lang.String CONFIG_FILE_NAME
Decoration configuration filename

See Also:
Constant Field Values

CONFIG_DESKTOP_FILE_NAME

static final java.lang.String CONFIG_DESKTOP_FILE_NAME
Decoration desktop configuration filename

See Also:
Constant Field Values

DESKTOP_SUPPORTED_PROPERTY

static final java.lang.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 java.lang.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 java.lang.String RESOURCE_BUNDLE_PROP
Property which specifies the resource bundle locator prefix

See Also:
Constant Field Values

RESOURCES_DIRECTORY_NAME

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

See Also:
Constant Field Values

OPTION_TITLE

static final java.lang.String OPTION_TITLE
See Also:
Constant Field Values

OPTION_ACTIONS

static final java.lang.String OPTION_ACTIONS
See Also:
Constant Field Values

OPTION_DRAGHANDLE

static final java.lang.String OPTION_DRAGHANDLE
See Also:
Constant Field Values
Method Detail

getActionsOption

Decoration.ActionsOption getActionsOption()

getTitleOption

Decoration.TitleOption getTitleOption()

getDragHandle

java.lang.String getDragHandle()

getName

java.lang.String getName()
The name of this Decoration.

Returns:
Name of this decoration.

getBasePath

java.lang.String getBasePath()

Returns the base path for the decoration.

Returns:
the base path for the decoration.

getBasePath

java.lang.String getBasePath(java.lang.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

java.lang.String getResource(java.lang.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

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

getStyleSheetPortal

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

getStyleSheetDesktop

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

getActions

java.util.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(java.util.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

java.lang.String getProperty(java.lang.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

java.lang.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

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

Returns:
the name of the currently active mode action

setCurrentModeAction

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


getCurrentStateAction

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

Returns:
the name of the currently active state action

setCurrentStateAction

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


getResourceBundleName

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

getResourceBundle

java.util.ResourceBundle getResourceBundle(java.util.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-2011 The Apache Software Foundation. All Rights Reserved.