| java.lang.Object org.apache.jetspeed.velocity.JetspeedPowerToolImpl
JetspeedPowerToolImpl | public class JetspeedPowerToolImpl implements JetspeedVelocityPowerTool(Code) | |
JetspeedPowerTool
The JetspeedPowerTool is meant to be used by template designers to build
templates for internal Jetspeed portlet applications. It hides the
implementation details of the more common template actions so that future
changes to said implementation have minimal effect on template.
Where applicable, methods have been marked with a BEST PRATICES
meaning that this method should be used instead the synonymous code
listed within the method docuementation.
author: Scott T. Weaver version: $Id: JetspeedPowerToolImpl.java 589933 2007-10-30 01:51:50Z woonsan $ |
Method Summary | |
protected void | checkState() | public String | decorateAndInclude(ContentFragment f)
Decorate and include fragment content. | protected String | decorateAndIncludePortlet(ContentFragment f) | public String | getAbsoluteUrl(String relativePath) | public String | getBasePath() | public List | getColumnSizes() | public List[] | getColumns() | public Object | getComponent(String name) | public ContentFragment | getCurrentFragment() | public ContentFragment | getCurrentLayout() | public PortletEntity | getCurrentPortletEntity() | public TemplateDescriptor | getDecoration(String path, String templateType) | public List | getDecoratorActions() Gets the list of decorator actions for a window. | public boolean | getLoggedOn() | public PortletMode | getMappedPortletMode() | public WindowState | getMappedWindowState() | public Page | getPage() | public String | getPageBasePath() | public List | getPageDecoratorActions() Gets the list of decorator actions for a page. | public PortletEntity | getPortletEntity(ContentFragment f) Parameters: f - Fragment whose PortletEntity we want toretreive. | public PortletMode | getPortletMode() | final protected RequestContext | getRequestContext() | public Subject | getSubject() | public TemplateDescriptor | getTemplate(String path, String templateType) Retreives a template using Jetspeed's
See Also: org.apache.jetspeed.locator.TemplateLocator Parameters: path - Expected to the template. | protected TemplateDescriptor | getTemplate(String path, String templateType, TemplateLocator locator, LocatorDescriptor descriptor) | public String | getTitle(PortletEntity entity, ContentFragment f) | public String | getTitle(PortletEntity entity) | public Configuration | getTypeConfiguration(String type, String name, String location) | public WindowState | getWindowState() | protected void | handleError(Exception e, String msg, ContentFragment fragment) | public String | includeDecoration(String template, String templateType) | public String | includeTemplate(String template, String templateType) | public boolean | isHidden(ContentFragment f) Checks the the visibilty of this fragment with respect to the current
RenderReqeust. | public String | renderPortletEntity(String entityId, String portletId) | protected void | setAttribute(String name, Object object) Sets an attribute for use within your layout and decoration templates. | public void | setCurrentFragment(ContentFragment f) | public void | setCurrentLayout() | public void | setVelocityContext(Context velocityContext) |
COLUMNS_ATTR | final protected static String COLUMNS_ATTR(Code) | | |
COLUMN_SIZES | final protected static String COLUMN_SIZES(Code) | | |
PORTLET_CONFIG_ATTR | final protected static String PORTLET_CONFIG_ATTR(Code) | | |
RENDER_REQUEST_ATTR | final protected static String RENDER_REQUEST_ATTR(Code) | | |
RENDER_RESPONSE_ATTR | final protected static String RENDER_RESPONSE_ATTR(Code) | | |
log | final protected static Log log(Code) | | |
portletConfig | protected PortletConfig portletConfig(Code) | | |
renderRequest | protected RenderRequest renderRequest(Code) | | |
renderResponse | protected RenderResponse renderResponse(Code) | | |
velocityContext | protected Context velocityContext(Code) | | |
decorateAndInclude | public String decorateAndInclude(ContentFragment f) throws Exception(Code) | |
Decorate and include fragment content.
Parameters: f - Fragment to include and decorate throws: Exception - String path to the decorator. |
decorateAndIncludePortlet | protected String decorateAndIncludePortlet(ContentFragment f) throws Exception(Code) | |
The decorator template itself is responsible for including the content of
the target Fragment which is easily acheived like so:
in Velocity:
$jetspeed.include($jetspeed.currentFragment)
In JSP:
<%
JetspeedPowerTool jetspeed = new JetspeedPowerTool(renderRequest, renderResponse, portletConfig);
jetspeed.include(jetspeed.getCurrentFragment());
%>
Parameters: f - Portlet fragment to "decorate" throws: Exception - |
getDecoratorActions | public List getDecoratorActions()(Code) | | Gets the list of decorator actions for a window. Each window (on each
page) has its own collection of actionAccess flags associated with it.
A list of actions available to the current window, filtered bysecurty access and current state. throws: Exception - |
getLoggedOn | public boolean getLoggedOn()(Code) | | |
getMappedPortletMode | public PortletMode getMappedPortletMode() throws Exception(Code) | | Gets the internal (portal) portlet mode for a current portlet window (fragment)
The portlet mode of the current window throws: Exception - |
getMappedWindowState | public WindowState getMappedWindowState() throws Exception(Code) | | Gets the internal (portal) window state for the current portlet window (fragment)
The window state for the current window throws: Exception - |
getPageDecoratorActions | public List getPageDecoratorActions() throws Exception(Code) | | 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.
A list of actions available to the current window, filtered bysecurty access and current state. throws: Exception - |
getPortletEntity | public PortletEntity getPortletEntity(ContentFragment f) throws Exception(Code) | | Parameters: f - Fragment whose PortletEntity we want toretreive. The PortletEntity represented by the current fragment. throws: Exception - |
getPortletMode | public PortletMode getPortletMode() throws Exception(Code) | | Gets the portlet mode for a current portlet window (fragment)
The portlet mode of the current window throws: Exception - |
getTitle | public String getTitle(PortletEntity entity, ContentFragment f)(Code) | |
getTitle
Returns the appropriate for the title based on locale prferences
Parameters: entity - |
getTitle | public String getTitle(PortletEntity entity)(Code) | |
getTitle
Returns the appropriate for the title based on locale prferences
Parameters: entity - |
getWindowState | public WindowState getWindowState() throws Exception(Code) | | Gets the window state for the current portlet window (fragment)
The window state for the current window throws: Exception - |
isHidden | public boolean isHidden(ContentFragment f)(Code) | | Checks the the visibilty of this fragment with respect to the current
RenderReqeust.
Parameters: f - Fragment whether or not the Fragment in question should be consideredvisible during rendering. |
setAttribute | protected void setAttribute(String name, Object object)(Code) | | Sets an attribute for use within your layout and decoration templates.
The value is always stored within the current
javax.portlet.Renderrequest and is also stored within the
current org.apache.velocity.Context if it is available.
Parameters: name - to store the attribute under. Parameters: obj - object to set. |
setCurrentLayout | public void setCurrentLayout()(Code) | | |
setVelocityContext | public void setVelocityContext(Context velocityContext)(Code) | | |
|
|