org.apache.jetspeed.decoration
Interface DecorationFactory


public interface DecorationFactory

Factory class used for locating Decorations and Themes for Fragments and pages.

Author:
Scott T. Weaver
See Also:
Decoration, PortletDecoration, LayoutDecoration, Theme

Field Summary
static java.lang.String DEFAULT_NESTED_LAYOUT_PORTLET_DECORATOR
          Default nested layout portlet decorator
 
Method Summary
 void clearCache(RequestContext requestContext)
          Clears the lookup cache of all previous located pathes.
 Decoration getDecoration(ContentPage page, ContentFragment fragment, RequestContext requestContext)
          Returns a Decoration for a specific Fragment contained within the specified Page.
 java.lang.String getDefaultDesktopLayoutDecoration()
          Get the default desktop layout decoration to be used when selected layout decoration does not support /desktop.
 java.lang.String getDefaultDesktopPortletDecoration()
          Get the default desktop portlet decoration to be used when selected portlet decoration does not support /desktop.
 java.lang.String getDefaultLayoutDecoration()
          Get the default portlet layout decoration to be used when selected layout decoration does not support /portal.
 java.lang.String getDefaultPortletDecoration()
          Get the default portal portlet decoration to be used when selected portlet decoration does not support /portal.
 java.util.Set getDesktopPageDecorations(RequestContext request)
          Get the portal-wide list of available desktop page decorations.
 java.util.Set getDesktopPortletDecorations(RequestContext request)
          Get the portal-wide list of desktop portlet decorations.
 LayoutDecoration getLayoutDecoration(java.lang.String name, RequestContext requestContext)
          Returns a named layout Decoration appropriate to the current request conetext.
 java.lang.String getLayoutDecorationsBasePath()
          Get the path to the layout decorations directory.
 java.util.List getLayouts(RequestContext request)
          Get the portal-wide list of available layouts.
 java.util.Set getPageDecorations(RequestContext request)
          Get the portal-wide list of page decorations.
 PortletDecoration getPortletDecoration(java.lang.String name, RequestContext requestContext)
          Returns a names portlet Decoration appropriate to the current request conetext.
 java.util.Set getPortletDecorations(RequestContext request)
          Get the portal-wide list of portlet decorations.
 java.lang.String getPortletDecorationsBasePath()
          Get the path to the portlet decorations directory.
 Theme getTheme(ContentPage page, RequestContext requestContext)
          Returns a theme containing all of the Decorations for all of the layouts on the current page.
 boolean isDesktopEnabled(RequestContext requestContext)
          Indicates whether /desktop is enabled for the current portal request.
 void setDefaultDesktopLayoutDecoration(java.lang.String newOne)
          Set the default desktop layout decoration to be used when selected layout decoration does not support /desktop.
 void setDefaultDesktopPortletDecoration(java.lang.String newOne)
          Set the default desktop portlet decoration to be used when selected portlet decoration does not support /desktop.
 

Field Detail

DEFAULT_NESTED_LAYOUT_PORTLET_DECORATOR

static final java.lang.String DEFAULT_NESTED_LAYOUT_PORTLET_DECORATOR
Default nested layout portlet decorator

See Also:
Constant Field Values
Method Detail

getTheme

Theme getTheme(ContentPage page,
               RequestContext requestContext)
Returns a theme containing all of the Decorations for all of the layouts on the current page.

Parameters:
page - Page whose theme we are requesting
requestContext - Current portal request.
Returns:
Theme for this page based on the current portal request.
See Also:
Theme, RequestContext

getPortletDecoration

PortletDecoration getPortletDecoration(java.lang.String name,
                                       RequestContext requestContext)
Returns a names portlet Decoration appropriate to the current request conetext.

Parameters:
name - Formal name of the decoration.
requestContext - Current portal request.
Returns:
Decoration requested. If the decoration does not exist, an empty Decoration will be created "in memory" and a message should be logged informing the admin that non-existent decoration has been requested.
See Also:
RequestContext, PortletDecoration

getLayoutDecoration

LayoutDecoration getLayoutDecoration(java.lang.String name,
                                     RequestContext requestContext)
Returns a named layout Decoration appropriate to the current request conetext.

Parameters:
name - Formal name of the decoration.
requestContext - Current portal request.
Returns:
Decoration requested. If the decoration does not exist, an empty Decoration will be created "in memory" and a message should be logged informing the admin that non-existent decoration has been requested.
See Also:
LayoutDecoration, RequestContext

getDecoration

Decoration getDecoration(ContentPage page,
                         ContentFragment fragment,
                         RequestContext requestContext)
Returns a Decoration for a specific Fragment contained within the specified Page.

Parameters:
page - Current page
fragment - Fragment whose decoration we require.
requestContext - Current portal request.
Returns:
Decoration requested. If the decoration does not exist, an empty Decoration will be created "in memory" and a message should be logged informing the admin that non-existent decoration has been requested.
See Also:
Page, Fragment, RequestContext

isDesktopEnabled

boolean isDesktopEnabled(RequestContext requestContext)
Indicates whether /desktop is enabled for the current portal request. Located here due to range of jetspeed components which need this information and already have a DecorationFactory reference.

Parameters:
requestContext - current portal request.
Returns:
true if /desktop is enabled for the current portal request, otherwise false

clearCache

void clearCache(RequestContext requestContext)
Clears the lookup cache of all previous located pathes. This only clears the cache the RequestContext's current user. This will generally delegate the cache operation to the PathResolverCache currently in use.

Parameters:
requestContext - Current portal request.
See Also:
RequestContext, PathResolverCache

getPageDecorations

java.util.Set getPageDecorations(RequestContext request)
Get the portal-wide list of page decorations.

Returns:
A list of page decorations of type String

getPortletDecorations

java.util.Set getPortletDecorations(RequestContext request)
Get the portal-wide list of portlet decorations.

Returns:
A list of portlet decorations of type String

getLayouts

java.util.List getLayouts(RequestContext request)
Get the portal-wide list of available layouts.

Returns:
A list of layout portlets of type LayoutInfo

getDesktopPageDecorations

java.util.Set getDesktopPageDecorations(RequestContext request)
Get the portal-wide list of available desktop page decorations.

Returns:
A list of desktop skins of type String

getDesktopPortletDecorations

java.util.Set getDesktopPortletDecorations(RequestContext request)
Get the portal-wide list of desktop portlet decorations.

Returns:
A list of desktop skins of type String

getLayoutDecorationsBasePath

java.lang.String getLayoutDecorationsBasePath()
Get the path to the layout decorations directory.

Returns:
path to layout decorations directory

getPortletDecorationsBasePath

java.lang.String getPortletDecorationsBasePath()
Get the path to the portlet decorations directory.

Returns:
path to portlet decorations directory

getDefaultDesktopLayoutDecoration

java.lang.String getDefaultDesktopLayoutDecoration()
Get the default desktop layout decoration to be used when selected layout decoration does not support /desktop.

Returns:
default desktop layout decoration.

setDefaultDesktopLayoutDecoration

void setDefaultDesktopLayoutDecoration(java.lang.String newOne)
Set the default desktop layout decoration to be used when selected layout decoration does not support /desktop.


getDefaultDesktopPortletDecoration

java.lang.String getDefaultDesktopPortletDecoration()
Get the default desktop portlet decoration to be used when selected portlet decoration does not support /desktop.

Returns:
default desktop portlet decoration.

setDefaultDesktopPortletDecoration

void setDefaultDesktopPortletDecoration(java.lang.String newOne)
Set the default desktop portlet decoration to be used when selected portlet decoration does not support /desktop.


getDefaultPortletDecoration

java.lang.String getDefaultPortletDecoration()
Get the default portal portlet decoration to be used when selected portlet decoration does not support /portal.

Returns:
default desktop portlet decoration.

getDefaultLayoutDecoration

java.lang.String getDefaultLayoutDecoration()
Get the default portlet layout decoration to be used when selected layout decoration does not support /portal.

Returns:
default desktop layout decoration.


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.