Java Doc for PortletURL.java in  » Portal » Open-Portal » javax » portlet » 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 » Open Portal » javax.portlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.portlet.PortletURL

All known Subclasses:   com.sun.portal.portlet.impl.PortletURLImpl,
PortletURL
public interface PortletURL (Code)
The PortletURL interface represents a URL that reference the portlet itself.

A PortletURL is created through the RenderResponse. Parameters, a portlet mode, a window state and a security level can be added to PortletURL objects. The PortletURL must be converted to a String in order to embed it into the markup generated by the portlet.

There are two types of PortletURLs:

  • Action URLs, they are created with RenderResponse.createActionURL, and trigger an action request followed by a render request.
  • Render URLs, they are created with RenderResponse.createRenderURL, and trigger a render request.

The string reprensentation of a PortletURL does not need to be a valid URL at the time the portlet is generating its content. It may contain special tokens that will be converted to a valid URL, by the portal, before the content is returned to the client.





Method Summary
public  voidsetParameter(String name, String value)
     Sets the given String parameter to this URL.
public  voidsetParameter(String name, String[] values)
     Sets the given String array parameter to this URL.
public  voidsetParameters(java.util.Map parameters)
     Sets a parameter map for this URL.

All previously set parameters are cleared.

The PortletURL implementation 'x-www-form-urlencoded' encodes all parameter names and values.

public  voidsetPortletMode(PortletMode portletMode)
     Indicates the portlet mode the portlet must be in, if this portlet URL triggers a request.
public  voidsetSecure(boolean secure)
     Indicated the security setting for this URL.
public  voidsetWindowState(WindowState windowState)
     Indicates the window state the portlet should be in, if this portlet URL triggers a request.
public  StringtoString()
     Returns the portlet URL string representation to be embedded in the markup.
Note that the returned String may not be a valid URL, as it may be rewritten by the portal/portlet-container before returning the markup to the client.



Method Detail
setParameter
public void setParameter(String name, String value)(Code)
Sets the given String parameter to this URL.

This method replaces all parameters with the given key.

The PortletURL implementation 'x-www-form-urlencoded' encodes all parameter names and values. Developers should not encode them.

A portlet container may prefix the attribute names internally in order to preserve a unique namespace for the portlet.
Parameters:
  name - the parameter name
Parameters:
  value - the parameter value
exception:
  java.lang.IllegalArgumentException - if name or value are null.




setParameter
public void setParameter(String name, String[] values)(Code)
Sets the given String array parameter to this URL.

This method replaces all parameters with the given key.

The PortletURL implementation 'x-www-form-urlencoded' encodes all parameter names and values. Developers should not encode them.

A portlet container may prefix the attribute names internally in order to preserve a unique namespace for the portlet.
Parameters:
  name - the parameter name
Parameters:
  values - the parameter values
exception:
  java.lang.IllegalArgumentException - if name or values are null.




setParameters
public void setParameters(java.util.Map parameters)(Code)
Sets a parameter map for this URL.

All previously set parameters are cleared.

The PortletURL implementation 'x-www-form-urlencoded' encodes all parameter names and values. Developers should not encode them.

A portlet container may prefix the attribute names internally, in order to preserve a unique namespace for the portlet.
Parameters:
  parameters - Map containing parameter names for the render phase as keys and parameter values as map values. The keys in the parametermap must be of type String. The values in the parameter map must be of typeString array (String[]).
exception:
  java.lang.IllegalArgumentException - if parameters is null, ifany of the key/values in the Map are null, if any of the keys is not a String, or if any of the values is not a String array.




setPortletMode
public void setPortletMode(PortletMode portletMode) throws PortletModeException(Code)
Indicates the portlet mode the portlet must be in, if this portlet URL triggers a request.

A URL can not have more than one portlet mode attached to it. If more than one portlet mode is set only the last one set is attached to the URL.
Parameters:
  portletMode - the portlet mode
exception:
  PortletModeException - if the portlet cannot switch to this mode,because the portal does not support this mode, the portlet has notdeclared in its deployment descriptor that it supports this mode for the current markup,or the current user is not allowed to switch to this mode.The PortletRequest.isPortletModeAllowed() method can be usedto check if the portlet can set a given portlet mode.
See Also:   PortletRequest.isPortletModeAllowed




setSecure
public void setSecure(boolean secure) throws PortletSecurityException(Code)
Indicated the security setting for this URL.

Secure set to true indicates that the portlet requests a secure connection between the client and the portlet window for this URL. Secure set to false indicates that the portlet does not need a secure connection for this URL. If the security is not set for a URL, it will stay the same as the current request.
Parameters:
  secure - true, if portlet requests to have a secure connectionbetween its portlet window and the client; false, ifthe portlet does not require a secure connection.
throws:
  PortletSecurityException - if the run-time environment doesnot support the indicated setting




setWindowState
public void setWindowState(WindowState windowState) throws WindowStateException(Code)
Indicates the window state the portlet should be in, if this portlet URL triggers a request.

A URL can not have more than one window state attached to it. If more than one window state is set only the last one set is attached to the URL.
Parameters:
  windowState - the portlet window state
exception:
  WindowStateException - if the portlet cannot switch to this state,because the portal does not support this state, the portlet has not declared in its deployment descriptor that it supports this state, or the currentuser is not allowed to switch to this state.The PortletRequest.isWindowStateAllowed() method can be usedto check if the portlet can set a given window state.
See Also:   PortletRequest.isWindowStateAllowed




toString
public String toString()(Code)
Returns the portlet URL string representation to be embedded in the markup.
Note that the returned String may not be a valid URL, as it may be rewritten by the portal/portlet-container before returning the markup to the client. the encoded URL as a string



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