org.apache.jetspeed.layout
Interface JetspeedPowerTool


public interface JetspeedPowerTool

JetspeedPowerTool

Version:
$Id: JetspeedPowerTool.java 516448 2007-03-09 16:25:47Z ate $
Author:
David Sean Taylor

Field Summary
static java.lang.String DECORATOR_TYPE
           
static java.lang.String FRAGMENT_ATTR
           
static java.lang.String FRAGMENT_PROCESSING_ERROR_PREFIX
           
static java.lang.String GENERIC_TEMPLATE_TYPE
           
static java.lang.String HIDDEN
           
static java.lang.String LAYOUT_ATTR
           
static java.lang.String LAYOUT_TEMPLATE_TYPE
           
 
Method Summary
 java.lang.String decorateAndInclude(ContentFragment f)
           Decorate and include fragment content.
 java.lang.String getAbsoluteUrl(java.lang.String relativePath)
           
 java.lang.String getBasePath()
           
 java.util.List[] getColumns()
           
 java.util.List getColumnSizes()
           
 java.lang.Object getComponent(java.lang.String name)
           
 ContentFragment getCurrentFragment()
           
 ContentFragment getCurrentLayout()
           
 TemplateDescriptor getDecoration(java.lang.String path, java.lang.String templateType)
           
 java.util.List getDecoratorActions()
          Gets the list of decorator actions for a window.
 java.lang.String getElementHtmlString(HeadElement element)
          Returns stringified one from the element
 java.util.List<KeyValue<java.lang.String,HeadElement>> getHeadElements()
          Returns all the contributed head elements from the current fragment and its child fragments.
 java.util.List<KeyValue<java.lang.String,HeadElement>> getHeadElements(ContentFragment f)
          Returns all the contributed head elements from the fragment and its child fragments.
 boolean getLoggedOn()
           
 javax.portlet.PortletMode getMappedPortletMode()
          Gets the internal (portal) portlet mode for a current portlet window (fragment)
 javax.portlet.WindowState getMappedWindowState()
          Gets the internal (portal) window state for the current portlet window (fragment)
 ContentPage getPage()
           
 java.lang.String getPageBasePath()
           
 java.util.List getPageDecoratorActions()
          Gets the list of decorator actions for a page.
 PortalConfiguration getPortalConfiguration()
           
 javax.portlet.PortletMode getPortletMode()
          Gets the portlet mode for a current portlet window (fragment)
 PortletWindow getPortletWindow(ContentFragment f)
           
 javax.security.auth.Subject getSubject()
           
 TemplateDescriptor getTemplate(java.lang.String path, java.lang.String templateType)
          Retreives a template using Jetspeed's
 java.lang.String getTitle()
           getTitle
 java.lang.String getTitle(ContentFragment f)
           getTitle
 java.lang.String getUserAttribute(java.lang.String attributeName, java.lang.String defaultValue)
           
 java.util.Map<java.lang.String,java.lang.String> getUserAttributes()
           
 javax.portlet.WindowState getWindowState()
          Gets the window state for the current portlet window (fragment)
 java.lang.String includeDecoration(java.lang.String template, java.lang.String templateType)
           
 java.lang.String includeTemplate(java.lang.String template, java.lang.String templateType)
           
 boolean isAjaxCustomizationEnabled()
          Determine if ajax customization is enabled
 boolean isDojoEnabled(java.util.List<KeyValue<java.lang.String,HeadElement>> headElements)
          Returns true if head element has dojo library inclusion.
 boolean isHidden(ContentFragment f)
          Checks the the visibilty of this fragment with respect to the current RenderReqeust.
 java.lang.String renderPortletWindow(java.lang.String windowId, java.lang.String portletId)
           
 void setCurrentFragment(ContentFragment f)
           
 void setCurrentLayout()
           
 

Field Detail

GENERIC_TEMPLATE_TYPE

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

FRAGMENT_PROCESSING_ERROR_PREFIX

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

FRAGMENT_ATTR

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

LAYOUT_ATTR

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

HIDDEN

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

LAYOUT_TEMPLATE_TYPE

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

DECORATOR_TYPE

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

getWindowState

javax.portlet.WindowState getWindowState()
                                         throws java.lang.Exception
Gets the window state for the current portlet window (fragment)

Returns:
The window state for the current window
Throws:
java.lang.Exception

getMappedWindowState

javax.portlet.WindowState getMappedWindowState()
                                               throws java.lang.Exception
Gets the internal (portal) window state for the current portlet window (fragment)

Returns:
The window state for the current window
Throws:
java.lang.Exception

getPortletMode

javax.portlet.PortletMode getPortletMode()
                                         throws java.lang.Exception
Gets the portlet mode for a current portlet window (fragment)

Returns:
The portlet mode of the current window
Throws:
java.lang.Exception

getMappedPortletMode

javax.portlet.PortletMode getMappedPortletMode()
                                               throws java.lang.Exception
Gets the internal (portal) portlet mode for a current portlet window (fragment)

Returns:
The portlet mode of the current window
Throws:
java.lang.Exception

getCurrentFragment

ContentFragment getCurrentFragment()
Returns:

setCurrentFragment

void setCurrentFragment(ContentFragment f)
Parameters:
f -

setCurrentLayout

void setCurrentLayout()

getCurrentLayout

ContentFragment getCurrentLayout()
Returns:

getPage

ContentPage getPage()
Returns:

getColumns

java.util.List[] getColumns()
Returns:

getColumnSizes

java.util.List getColumnSizes()

getPortletWindow

PortletWindow getPortletWindow(ContentFragment f)
                               throws java.lang.Exception
Parameters:
f - Fragment whose PortletWindow we want to retrieve.
Returns:
The PortletWindow represented by the current fragment.
Throws:
java.lang.Exception

isHidden

boolean isHidden(ContentFragment f)
Checks the the visibilty of this fragment with respect to the current RenderReqeust.

Parameters:
f - Fragment
Returns:
whether or not the Fragment in question should be considered visible during rendering.

getTemplate

TemplateDescriptor getTemplate(java.lang.String path,
                               java.lang.String templateType)
                               throws TemplateLocatorException
Retreives a template using Jetspeed's

Parameters:
path - Expected to the template. This may actually be changed by the TL service based the capability and localization information provided by the client.
templateType - Type off template we are interested in.
Returns:
Template object containng the pertinent information required to inlcude the request template path in the current response
Throws:
TemplateLocatorException - if the path does not exist.
See Also:
TemplateLocator

getDecoration

TemplateDescriptor getDecoration(java.lang.String path,
                                 java.lang.String templateType)
                                 throws TemplateLocatorException
Throws:
TemplateLocatorException

includeTemplate

java.lang.String includeTemplate(java.lang.String template,
                                 java.lang.String templateType)
                                 throws java.io.IOException
Throws:
java.io.IOException

includeDecoration

java.lang.String includeDecoration(java.lang.String template,
                                   java.lang.String templateType)
                                   throws java.io.IOException
Throws:
java.io.IOException

decorateAndInclude

java.lang.String decorateAndInclude(ContentFragment f)
                                    throws java.lang.Exception

Decorate and include fragment content.

Parameters:
f - Fragment to include and decorate
Returns:
String path to the decorator.
Throws:
java.lang.Exception

getDecoratorActions

java.util.List getDecoratorActions()
Gets the list of decorator actions for a window. Each window (on each page) has its own collection of actionAccess flags associated with it.

Returns:
A list of actions available to the current window, filtered by securty access and current state.
Throws:
java.lang.Exception

getPageDecoratorActions

java.util.List getPageDecoratorActions()
                                       throws java.lang.Exception
Gets the list of decorator actions for a page. Each layout fragment on a page has its own collection of actionAccess flags associated with it.

Returns:
A list of actions available to the current window, filtered by securty access and current state.
Throws:
java.lang.Exception

getTitle

java.lang.String getTitle(ContentFragment f)

getTitle

Returns the appropriate for the title based on locale prferences

Parameters:
f -
Returns:

getTitle

java.lang.String getTitle()

getTitle

Returns the appropriate for the title based on locale prferences

Returns:

getComponent

java.lang.Object getComponent(java.lang.String name)

getAbsoluteUrl

java.lang.String getAbsoluteUrl(java.lang.String relativePath)

getSubject

javax.security.auth.Subject getSubject()

getLoggedOn

boolean getLoggedOn()

getBasePath

java.lang.String getBasePath()

getPageBasePath

java.lang.String getPageBasePath()

renderPortletWindow

java.lang.String renderPortletWindow(java.lang.String windowId,
                                     java.lang.String portletId)

getElementHtmlString

java.lang.String getElementHtmlString(HeadElement element)
Returns stringified one from the element

Parameters:
element -
Returns:

getHeadElements

java.util.List<KeyValue<java.lang.String,HeadElement>> getHeadElements(ContentFragment f)
                                                                       throws java.lang.Exception
Returns all the contributed head elements from the fragment and its child fragments.

Parameters:
f -
Returns:
Throws:
java.lang.Exception

getHeadElements

java.util.List<KeyValue<java.lang.String,HeadElement>> getHeadElements()
                                                                       throws java.lang.Exception
Returns all the contributed head elements from the current fragment and its child fragments.

Returns:
Throws:
java.lang.Exception

isDojoEnabled

boolean isDojoEnabled(java.util.List<KeyValue<java.lang.String,HeadElement>> headElements)
Returns true if head element has dojo library inclusion.

Parameters:
headElements -
Returns:

isAjaxCustomizationEnabled

boolean isAjaxCustomizationEnabled()
Determine if ajax customization is enabled

Returns:
true when ajax customization enabled

getUserAttributes

java.util.Map<java.lang.String,java.lang.String> getUserAttributes()
Returns:
an unmodifiable Map of the User "info" attributes or null if not authenticated

getUserAttribute

java.lang.String getUserAttribute(java.lang.String attributeName,
                                  java.lang.String defaultValue)
Returns:
the value for the User "info" attribute or the provided defaultValue if not authenticated or if the attribute is undefined

getPortalConfiguration

PortalConfiguration getPortalConfiguration()


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