Java Doc for JetspeedPowerToolImpl.java in  » Portal » jetspeed-2.1.3 » org » apache » jetspeed » velocity » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » jetspeed 2.1.3 » org.apache.jetspeed.velocity 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $


Field Summary
final protected static  StringCOLUMNS_ATTR
    
final protected static  StringCOLUMN_SIZES
    
final protected static  StringPORTLET_CONFIG_ATTR
    
final protected static  StringRENDER_REQUEST_ATTR
    
final protected static  StringRENDER_RESPONSE_ATTR
    
protected  CapabilityMapcapabilityMap
    
protected  TemplateLocatordecorationLocator
    
protected  LocatorDescriptordecorationLocatorDescriptor
    
protected  PortletEntityAccessComponententityAccess
    
protected  Localelocale
    
final protected static  Loglog
    
protected  PortletConfigportletConfig
    
protected  RenderRequestrenderRequest
    
protected  RenderResponserenderResponse
    
protected  RequestContextrequestContext
    
protected  TemplateLocatortemplateLocator
    
protected  LocatorDescriptortemplateLocatorDescriptor
    
protected  WritertemplateWriter
    
protected  ContextvelocityContext
    
protected  PortletWindowAccessorwindowAccess
    

Constructor Summary
public  JetspeedPowerToolImpl(RequestContext requestContext, DynamicTitleService titleService, PortletRenderer renderer)
    

Method Summary
protected  voidcheckState()
    
public  StringdecorateAndInclude(ContentFragment f)
    

Decorate and include fragment content.

protected  StringdecorateAndIncludePortlet(ContentFragment f)
    
public  StringgetAbsoluteUrl(String relativePath)
    
public  StringgetBasePath()
    
public  ListgetColumnSizes()
    
public  List[]getColumns()
    
public  ObjectgetComponent(String name)
    
public  ContentFragmentgetCurrentFragment()
    
public  ContentFragmentgetCurrentLayout()
    
public  PortletEntitygetCurrentPortletEntity()
    
public  TemplateDescriptorgetDecoration(String path, String templateType)
    
public  ListgetDecoratorActions()
     Gets the list of decorator actions for a window.
public  booleangetLoggedOn()
    
public  PortletModegetMappedPortletMode()
    
public  WindowStategetMappedWindowState()
    
public  PagegetPage()
    
public  StringgetPageBasePath()
    
public  ListgetPageDecoratorActions()
     Gets the list of decorator actions for a page.
public  PortletEntitygetPortletEntity(ContentFragment f)
    
Parameters:
  f - Fragment whose PortletEntity we want toretreive.
public  PortletModegetPortletMode()
    
final protected  RequestContextgetRequestContext()
    
public  SubjectgetSubject()
    
public  TemplateDescriptorgetTemplate(String path, String templateType)
     Retreives a template using Jetspeed's
See Also:   org.apache.jetspeed.locator.TemplateLocator
Parameters:
  path - Expected to the template.
protected  TemplateDescriptorgetTemplate(String path, String templateType, TemplateLocator locator, LocatorDescriptor descriptor)
    
public  StringgetTitle(PortletEntity entity, ContentFragment f)
    
public  StringgetTitle(PortletEntity entity)
    
public  ConfigurationgetTypeConfiguration(String type, String name, String location)
    
public  WindowStategetWindowState()
    
protected  voidhandleError(Exception e, String msg, ContentFragment fragment)
    
public  StringincludeDecoration(String template, String templateType)
    
public  StringincludeTemplate(String template, String templateType)
    
public  booleanisHidden(ContentFragment f)
     Checks the the visibilty of this fragment with respect to the current RenderReqeust.
public  StringrenderPortletEntity(String entityId, String portletId)
    
protected  voidsetAttribute(String name, Object object)
     Sets an attribute for use within your layout and decoration templates.
public  voidsetCurrentFragment(ContentFragment f)
    
public  voidsetCurrentLayout()
    
public  voidsetVelocityContext(Context velocityContext)
    

Field Detail
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)



capabilityMap
protected CapabilityMap capabilityMap(Code)



decorationLocator
protected TemplateLocator decorationLocator(Code)



decorationLocatorDescriptor
protected LocatorDescriptor decorationLocatorDescriptor(Code)



entityAccess
protected PortletEntityAccessComponent entityAccess(Code)



locale
protected Locale locale(Code)



log
final protected static Log log(Code)



portletConfig
protected PortletConfig portletConfig(Code)



renderRequest
protected RenderRequest renderRequest(Code)



renderResponse
protected RenderResponse renderResponse(Code)



requestContext
protected RequestContext requestContext(Code)



templateLocator
protected TemplateLocator templateLocator(Code)



templateLocatorDescriptor
protected LocatorDescriptor templateLocatorDescriptor(Code)



templateWriter
protected Writer templateWriter(Code)



velocityContext
protected Context velocityContext(Code)



windowAccess
protected PortletWindowAccessor windowAccess(Code)




Constructor Detail
JetspeedPowerToolImpl
public JetspeedPowerToolImpl(RequestContext requestContext, DynamicTitleService titleService, PortletRenderer renderer) throws Exception(Code)




Method Detail
checkState
protected void checkState()(Code)

throws:
  java.lang.IllegalStateException - if the PortletConfig,RenderRequest or RenderReponseis null.



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 -



getAbsoluteUrl
public String getAbsoluteUrl(String relativePath)(Code)



getBasePath
public String getBasePath()(Code)



getColumnSizes
public List getColumnSizes()(Code)



getColumns
public List[] getColumns()(Code)



getComponent
public Object getComponent(String name)(Code)



getCurrentFragment
public ContentFragment getCurrentFragment()(Code)



getCurrentLayout
public ContentFragment getCurrentLayout()(Code)



getCurrentPortletEntity
public PortletEntity getCurrentPortletEntity() throws Exception(Code)

throws:
  Exception -



getDecoration
public TemplateDescriptor getDecoration(String path, String templateType) throws TemplateLocatorException(Code)



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 -



getPage
public Page getPage()(Code)



getPageBasePath
public String getPageBasePath()(Code)



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 -



getRequestContext
final protected RequestContext getRequestContext()(Code)

getRequestContext




getSubject
public Subject getSubject()(Code)



getTemplate
public TemplateDescriptor getTemplate(String path, String templateType) throws TemplateLocatorException(Code)
Retreives a template using Jetspeed's
See Also:   org.apache.jetspeed.locator.TemplateLocator
Parameters:
  path - Expected to the template. This may actually be changed by theTL service based the capability and localization informationprovided by the client.
Parameters:
  templateType - Type off template we are interested in. Template object containng the pertinent information required toinlcude the request template path in the current response
throws:
  TemplateLocatorException - if the path does not exist.



getTemplate
protected TemplateDescriptor getTemplate(String path, String templateType, TemplateLocator locator, LocatorDescriptor descriptor) throws TemplateLocatorException(Code)



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 -



getTypeConfiguration
public Configuration getTypeConfiguration(String type, String name, String location) throws Exception(Code)



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 -



handleError
protected void handleError(Exception e, String msg, ContentFragment fragment)(Code)

handleError


Parameters:
  e -
Parameters:
  msg -



includeDecoration
public String includeDecoration(String template, String templateType) throws IOException(Code)



includeTemplate
public String includeTemplate(String template, String templateType) throws IOException(Code)



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.



renderPortletEntity
public String renderPortletEntity(String entityId, String portletId)(Code)



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.



setCurrentFragment
public void setCurrentFragment(ContentFragment f)(Code)

Parameters:
  f -



setCurrentLayout
public void setCurrentLayout()(Code)



setVelocityContext
public void setVelocityContext(Context velocityContext)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.