org.apache.jetspeed.velocity
Interface JetspeedPowerTool

All Known Implementing Classes:
JetspeedPowerToolImpl

public interface JetspeedPowerTool

JetspeedPowerTool

Version:
$Id: JetspeedPowerTool.java 233226 2005-08-17 18:05:20Z weaver $
Author:
David Sean Taylor

Field Summary
static String DECORATOR_TYPE
           
static String FRAGMENT_ATTR
           
static String FRAGMENT_PROCESSING_ERROR_PREFIX
           
static String GENERIC_TEMPLATE_TYPE
           
static String HIDDEN
           
static String LAYOUT_ATTR
           
static String LAYOUT_TEMPLATE_TYPE
           
 
Method Summary
 String decorateAndInclude(org.apache.jetspeed.om.page.ContentFragment f)
           Decorate and include fragment content.
 String getAbsoluteUrl(String relativePath)
           
 String getBasePath()
           
 List[] getColumns()
           
 List getColumnSizes()
           
 Object getComponent(String name)
           
 org.apache.jetspeed.om.page.ContentFragment getCurrentFragment()
           
 org.apache.jetspeed.om.page.ContentFragment getCurrentLayout()
           
 org.apache.pluto.om.entity.PortletEntity getCurrentPortletEntity()
           
 org.apache.jetspeed.locator.TemplateDescriptor getDecoration(String path, String templateType)
           
 List getDecoratorActions()
          Gets the list of decorator actions for a window.
 boolean getLoggedOn()
           
 org.apache.jetspeed.om.page.Page getPage()
           
 String getPageBasePath()
           
 List getPageDecoratorActions()
          Gets the list of decorator actions for a page.
 org.apache.pluto.om.entity.PortletEntity getPortletEntity(org.apache.jetspeed.om.page.ContentFragment f)
           
 javax.portlet.PortletMode getPortletMode()
          Gets the portlet mode for a current portlet window (fragment)
 Subject getSubject()
           
 org.apache.jetspeed.locator.TemplateDescriptor getTemplate(String path, String templateType)
          Retreives a template using Jetspeed's
 String getTitle(org.apache.pluto.om.entity.PortletEntity entity)
           getTitle
 String getTitle(org.apache.pluto.om.entity.PortletEntity entity, org.apache.jetspeed.om.page.ContentFragment f)
           getTitle
 org.apache.commons.configuration.Configuration getTypeConfiguration(String type, String name, String location)
           
 javax.portlet.WindowState getWindowState()
          Gets the window state for the current portlet window (fragment)
 String includeDecoration(String template, String templateType)
           
 String includeTemplate(String template, String templateType)
           
 boolean isHidden(org.apache.jetspeed.om.page.ContentFragment f)
          Checks the the visibilty of this fragment with respect to the current RenderReqeust.
 void setCurrentFragment(org.apache.jetspeed.om.page.ContentFragment f)
           
 void setCurrentLayout()
           
 void setVelocityContext(org.apache.velocity.context.Context velocityContext)
          Sets the Velocity Context object for this powertool instance.
 

Field Detail

GENERIC_TEMPLATE_TYPE

public static final String GENERIC_TEMPLATE_TYPE
See Also:
Constant Field Values

FRAGMENT_PROCESSING_ERROR_PREFIX

public static final String FRAGMENT_PROCESSING_ERROR_PREFIX
See Also:
Constant Field Values

FRAGMENT_ATTR

public static final String FRAGMENT_ATTR
See Also:
Constant Field Values

LAYOUT_ATTR

public static final String LAYOUT_ATTR
See Also:
Constant Field Values

HIDDEN

public static final String HIDDEN
See Also:
Constant Field Values

LAYOUT_TEMPLATE_TYPE

public static final String LAYOUT_TEMPLATE_TYPE
See Also:
Constant Field Values

DECORATOR_TYPE

public static final String DECORATOR_TYPE
See Also:
Constant Field Values
Method Detail

getWindowState

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

Returns:
The window state for the current window
Throws:
Exception

getPortletMode

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

Returns:
The portlet mode of the current window
Throws:
Exception

getCurrentFragment

public org.apache.jetspeed.om.page.ContentFragment getCurrentFragment()
Returns:

setCurrentFragment

public void setCurrentFragment(org.apache.jetspeed.om.page.ContentFragment f)
Parameters:
f -

setCurrentLayout

public void setCurrentLayout()

getCurrentLayout

public org.apache.jetspeed.om.page.ContentFragment getCurrentLayout()
Returns:

getPage

public org.apache.jetspeed.om.page.Page getPage()
Returns:

getColumns

public List[] getColumns()
Returns:

getColumnSizes

public List getColumnSizes()

getCurrentPortletEntity

public org.apache.pluto.om.entity.PortletEntity getCurrentPortletEntity()
                                                                 throws Exception
Returns:
Throws:
Exception

getPortletEntity

public org.apache.pluto.om.entity.PortletEntity getPortletEntity(org.apache.jetspeed.om.page.ContentFragment f)
                                                          throws Exception
Parameters:
f - Fragment whose PortletEntity we want to retreive.
Returns:
The PortletEntity represented by the current fragment.
Throws:
Exception

isHidden

public boolean isHidden(org.apache.jetspeed.om.page.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

public org.apache.jetspeed.locator.TemplateDescriptor getTemplate(String path,
                                                                  String templateType)
                                                           throws org.apache.jetspeed.locator.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:
org.apache.jetspeed.locator.TemplateLocatorException - if the path does not exist.
See Also:
TemplateLocator

getTypeConfiguration

public org.apache.commons.configuration.Configuration getTypeConfiguration(String type,
                                                                           String name,
                                                                           String location)
                                                                    throws Exception
Throws:
Exception

getDecoration

public org.apache.jetspeed.locator.TemplateDescriptor getDecoration(String path,
                                                                    String templateType)
                                                             throws org.apache.jetspeed.locator.TemplateLocatorException
Throws:
org.apache.jetspeed.locator.TemplateLocatorException

includeTemplate

public String includeTemplate(String template,
                              String templateType)
                       throws IOException
Throws:
IOException

includeDecoration

public String includeDecoration(String template,
                                String templateType)
                         throws IOException
Throws:
IOException

decorateAndInclude

public String decorateAndInclude(org.apache.jetspeed.om.page.ContentFragment f)
                          throws Exception

Decorate and include fragment content.

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

getDecoratorActions

public 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:
Exception

getPageDecoratorActions

public List getPageDecoratorActions()
                             throws 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:
Exception

getTitle

public String getTitle(org.apache.pluto.om.entity.PortletEntity entity,
                       org.apache.jetspeed.om.page.ContentFragment f)

getTitle

Returns the appropriate for the title based on locale prferences

Parameters:
entity -
Returns:

getTitle

public String getTitle(org.apache.pluto.om.entity.PortletEntity entity)

getTitle

Returns the appropriate for the title based on locale prferences

Parameters:
entity -
Returns:

getComponent

public Object getComponent(String name)

getAbsoluteUrl

public String getAbsoluteUrl(String relativePath)

getSubject

public Subject getSubject()

getLoggedOn

public boolean getLoggedOn()

getBasePath

public String getBasePath()

getPageBasePath

public String getPageBasePath()

setVelocityContext

public void setVelocityContext(org.apache.velocity.context.Context velocityContext)
Sets the Velocity Context object for this powertool instance. This is only required if using Velocity based decortaions and layouts.

Parameters:
velocityContext -


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.