|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.decoration.BaseDecoration
public class BaseDecoration
Base class implementing the most common methods shared between LayoutDecorations and PortletDecorations.
Decoration,
LayoutDecoration,
PortletDecoration,
Serialized Form| Field Summary | |
|---|---|
protected java.util.Properties |
config
|
protected static java.lang.String |
NO_SUCH_RESOURCE
|
| 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(java.util.Properties config,
ResourceValidator validator,
Path basePath,
Path baseClientPath,
PathResolverCache cache)
|
|
| Method Summary | |
|---|---|
java.util.List |
getActions()
Returns the list of DecoratorActions to be displayed
within the portlet window. |
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 |
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. |
protected java.lang.String |
getResource(Path rootPath,
Path searchPath)
Recursively tries to locate a resource. |
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()
|
void |
init(java.util.Properties config,
ResourceValidator validator,
PathResolverCache cache)
|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String NO_SUCH_RESOURCE
protected transient java.util.Properties config
| Constructor Detail |
|---|
public BaseDecoration(java.util.Properties config,
ResourceValidator validator,
Path basePath,
Path baseClientPath,
PathResolverCache cache)
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.
InvalidDecorationConfigurationException| Method Detail |
|---|
public void init(java.util.Properties config,
ResourceValidator validator,
PathResolverCache cache)
public java.lang.String getName()
Decoration
getName in interface Decorationpublic java.lang.String getBasePath()
DecorationReturns the base path for the decoration.
getBasePath in interface Decorationpublic java.lang.String getBasePath(java.lang.String relativePath)
DecorationReturns the base path for the decoration with the relativePath argument added.
getBasePath in interface Decorationpublic java.lang.String getResource(java.lang.String path)
Decoration
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
getResource in interface Decorationpath argument.
protected java.lang.String getResource(Path rootPath,
Path searchPath)
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.
Decorationpublic java.lang.String getStyleSheet()
getStyleSheet in interface Decorationpublic java.lang.String getStyleSheetPortal()
getStyleSheetPortal in interface Decorationpublic java.lang.String getStyleSheetDesktop()
getStyleSheetDesktop in interface Decorationpublic java.util.List getActions()
DecorationDecoratorActions to be displayed
within the portlet window.
getActions in interface DecorationDecoratorActions to be displayed
within the portlet window.DecoratorActionpublic void setActions(java.util.List actions)
DecorationDecoratorActions to be displayed
within the portlet window.
setActions in interface Decorationactions - actions to displayed within this portlet window.DecoratorActionpublic java.lang.String getProperty(java.lang.String name)
Decorationdecorator.properties config
file.
getProperty in interface Decorationpublic java.lang.String getBaseCSSClass()
Decoration
getBaseCSSClass in interface Decorationpublic java.lang.String getCurrentModeAction()
Decoration
getCurrentModeAction in interface Decorationpublic void setCurrentModeAction(java.lang.String currentModeAction)
Decoration
setCurrentModeAction in interface Decorationpublic java.lang.String getCurrentStateAction()
Decoration
getCurrentStateAction in interface Decorationpublic void setCurrentStateAction(java.lang.String currentStateAction)
Decoration
setCurrentStateAction in interface Decorationpublic java.lang.String getResourceBundleName()
getResourceBundleName in interface Decoration
public java.util.ResourceBundle getResourceBundle(java.util.Locale locale,
RequestContext context)
getResourceBundle in interface Decorationpublic boolean supportsDesktop()
Decoration
supportsDesktop in interface Decoration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||