org.apache.jetspeed.decoration
Class BaseDecoration
java.lang.Object
org.apache.jetspeed.decoration.BaseDecoration
- All Implemented Interfaces:
- Serializable, org.apache.jetspeed.decoration.Decoration
- Direct Known Subclasses:
- LayoutDecorationImpl, PortletDecorationImpl
public class BaseDecoration
- extends Object
- implements org.apache.jetspeed.decoration.Decoration, Serializable
Base class implementing the most common methods shared between
LayoutDecorations and PortletDecorations.
- Author:
- Scott T. Weaver, Steve Milek
- See Also:
Decoration
,
LayoutDecoration
,
PortletDecoration
,
Serialized Form
Fields inherited from interface org.apache.jetspeed.decoration.Decoration |
BASE_CSS_CLASS_PROP, CONFIG_DESKTOP_FILE_NAME, CONFIG_FILE_NAME, DEFAULT_COMMON_STYLE_SHEET, DEFAULT_DESKTOP_STYLE_SHEET, DEFAULT_PORTAL_STYLE_SHEET, DESKTOP_SUPPORTED_PROPERTY, RESOURCE_BUNDLE_PROP, RESOURCES_DIRECTORY_NAME |
Constructor Summary |
BaseDecoration(Properties config,
org.apache.jetspeed.decoration.ResourceValidator validator,
org.apache.jetspeed.util.Path basePath,
org.apache.jetspeed.util.Path baseClientPath,
org.apache.jetspeed.decoration.PathResolverCache cache)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final org.apache.commons.logging.Log log
NO_SUCH_RESOURCE
protected static final String NO_SUCH_RESOURCE
- See Also:
- Constant Field Values
config
protected transient Properties config
validator
private transient org.apache.jetspeed.decoration.ResourceValidator validator
name
private final String name
basePath
private final org.apache.jetspeed.util.Path basePath
baseClientPath
private final org.apache.jetspeed.util.Path baseClientPath
cache
private transient org.apache.jetspeed.decoration.PathResolverCache cache
commonStylesheet
private final String commonStylesheet
portalStylesheet
private final String portalStylesheet
desktopStylesheet
private final String desktopStylesheet
actions
private List actions
currentModeAction
private String currentModeAction
currentStateAction
private String currentStateAction
supportsDesktop
private boolean supportsDesktop
BaseDecoration
public BaseDecoration(Properties config,
org.apache.jetspeed.decoration.ResourceValidator validator,
org.apache.jetspeed.util.Path basePath,
org.apache.jetspeed.util.Path baseClientPath,
org.apache.jetspeed.decoration.PathResolverCache cache)
- Parameters:
config
- java.util.Properties
object containing configuration infomation
for this Decoration.validator
- The ResourceValidator to be used in looking up fully-qualified resource pathesbaseClientPath
- The "root" of the decroation hierarchy.
- Throws:
InvalidDecorationConfigurationException
init
public void init(Properties config,
org.apache.jetspeed.decoration.ResourceValidator validator,
org.apache.jetspeed.decoration.PathResolverCache cache)
getName
public String getName()
- Specified by:
getName
in interface org.apache.jetspeed.decoration.Decoration
getBasePath
public String getBasePath()
- Specified by:
getBasePath
in interface org.apache.jetspeed.decoration.Decoration
getBasePath
public String getBasePath(String relativePath)
- Specified by:
getBasePath
in interface org.apache.jetspeed.decoration.Decoration
getResource
public String getResource(String path)
- Specified by:
getResource
in interface org.apache.jetspeed.decoration.Decoration
getResource
protected String getResource(org.apache.jetspeed.util.Path rootPath,
org.apache.jetspeed.util.Path searchPath)
- Recursively tries to locate a resource.
- Parameters:
rootPath
- initial path to start looking for the searchPath.
The "pruning" of the rootPath of subsequest recursive calls follows the logic
detailed in the Decoration#getResource(String)
method.searchPath
- relative path to the resource we wish to locate.
- Returns:
- See Also:
Decoration
getStyleSheet
public String getStyleSheet()
- Specified by:
getStyleSheet
in interface org.apache.jetspeed.decoration.Decoration
getStyleSheetPortal
public String getStyleSheetPortal()
- Specified by:
getStyleSheetPortal
in interface org.apache.jetspeed.decoration.Decoration
getStyleSheetDesktop
public String getStyleSheetDesktop()
- Specified by:
getStyleSheetDesktop
in interface org.apache.jetspeed.decoration.Decoration
getActions
public List getActions()
- Specified by:
getActions
in interface org.apache.jetspeed.decoration.Decoration
setActions
public void setActions(List actions)
- Specified by:
setActions
in interface org.apache.jetspeed.decoration.Decoration
getProperty
public String getProperty(String name)
- Specified by:
getProperty
in interface org.apache.jetspeed.decoration.Decoration
getBaseCSSClass
public String getBaseCSSClass()
- Specified by:
getBaseCSSClass
in interface org.apache.jetspeed.decoration.Decoration
getCurrentModeAction
public String getCurrentModeAction()
- Specified by:
getCurrentModeAction
in interface org.apache.jetspeed.decoration.Decoration
setCurrentModeAction
public void setCurrentModeAction(String currentModeAction)
- Specified by:
setCurrentModeAction
in interface org.apache.jetspeed.decoration.Decoration
getCurrentStateAction
public String getCurrentStateAction()
- Specified by:
getCurrentStateAction
in interface org.apache.jetspeed.decoration.Decoration
setCurrentStateAction
public void setCurrentStateAction(String currentStateAction)
- Specified by:
setCurrentStateAction
in interface org.apache.jetspeed.decoration.Decoration
getResourceBundleName
public String getResourceBundleName()
- Specified by:
getResourceBundleName
in interface org.apache.jetspeed.decoration.Decoration
getResourceBundle
public ResourceBundle getResourceBundle(Locale locale,
org.apache.jetspeed.request.RequestContext context)
- Specified by:
getResourceBundle
in interface org.apache.jetspeed.decoration.Decoration
supportsDesktop
public boolean supportsDesktop()
- Specified by:
supportsDesktop
in interface org.apache.jetspeed.decoration.Decoration
Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.