Java Doc for ContainerProviderContext.java in  » Portal » Open-Portal » com » sun » portal » providers » context » 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 » com.sun.portal.providers.context 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.portal.providers.context.ContainerProviderContext

All known Subclasses:   com.sun.portal.harness.HarnessProviderContext,  com.sun.portal.desktop.context.PSContainerProviderContext,
ContainerProviderContext
public interface ContainerProviderContext extends ProviderContext(Code)
An environment for container provider execution. More formally, this class adds container channel functionality to the ProviderContext interface. Container channel functionality includes getting provider objects, fetching content, content caching features, and getting / setting selected and available channel lists.
See Also:   com.sun.portal.providers.context.ProviderContext


Field Summary
public  charCHANNEL_NAME_SEPARATOR
     Separator character for nested channel names. Channels configuration can be defined in a nested, hierarchical manner within containers.


Method Summary
public  voidcopyChannel(String srcName, String dstName)
     Copies a channel. A copy of the source channel is created and named as the destination channel. All properties of the source channel are copied to the destination channel.
public  voidcreateChannel(String channelName, String providerName)
     Creates a new channel. A new channel is created based on the named provider.
public  voidcreateContainer(String channelName, String providerName)
     Creates a new container channel.
public  booleanexistsChannel(String channel)
     Tests if channel configuration exists.
Parameters:
  channel - a String, the channel name.
public  ListgetAvailableChannels(String container)
     Gets the available channels for the container channel that this is providing an environment for.
Parameters:
  container - Container channel name.
public  StringBuffergetCachedContent(String name)
     Gets the cached content view for a channel.
public  longgetCachedTime(String name)
     Gets the content view cache time for a channel.
public  StringBuffergetContent(HttpServletRequest req, HttpServletResponse res, String container, String channel)
     Gets the content view for the named channel. This method is provided for convenience.
public  MapgetContent(HttpServletRequest req, HttpServletResponse res, String container, List channels, int timeout)
     Gets the content view for a set of channels.
public  ProvidergetProvider(HttpServletRequest req, String container, String channel)
     Gets a provider. This method returns an instance of a Provider object for the named channel.
public  ListgetSelectedChannels(String container)
     Gets the selected channels for the container channel that this is providing an environment for.
public  voidinitProviders(HttpServletRequest req, String container, List channels, int timeout)
     Initializes a set of channels.
public  voidputCachedContent(String name, StringBuffer content)
     Puts the cached content into a map and using the provider name as the key.
public  voidremoveChannel(String channelName)
     Removes a global scope channel.
public  voidsetAvailableChannels(String container, List available)
     Sets the available channels for the container channel that this is providing an environment for.
public  voidsetSelectedChannels(String container, List selelected)
     Sets the selected channels for the container channel that this is providing an environment for.

Field Detail
CHANNEL_NAME_SEPARATOR
public char CHANNEL_NAME_SEPARATOR(Code)
Separator character for nested channel names. Channels configuration can be defined in a nested, hierarchical manner within containers. This affects the name of the channel. For example, if channel A was defined with container X, the full name of the channel would be X + CHANNEL_NAME_SEPARATOR + A. This name is used in all ContainerProviderContext and ProviderContext methods that accept a channel name. Examples of this are:
  • ProviderContext.getProvider()
  • ProviderContext.getContent()
  • ContainerProviderContext.copyChannel()
  • ContainerProviderContext.createChannel()





Method Detail
copyChannel
public void copyChannel(String srcName, String dstName) throws ProviderContextException(Code)
Copies a channel. A copy of the source channel is created and named as the destination channel. All properties of the source channel are copied to the destination channel. The destination channel will use the same provider as the source. To copy a channel into a container, supply a hierarchical channel name. For example, to copy channel A inside of container X, renaming it as channel B: copyChannel("A", "X" + CHANNEL_NAME_SEPARATOR + "B");

This method only modifies the underlying configuration and does not create a Provider object. After calling this method, to get the provider object that backs this channel, call getProvider().

This method copies container channels as well as channels. To copy a container channel, simply supply its name as the source.
Parameters:
  srcName - Name of the source channel, the channel to be copied.
Parameters:
  dstName - Name of the destination channe, the channel copy.
exception:
  ProviderContextException - if an error occurs copying the channel.
See Also:   ContainerProviderContext.getProvider(HttpServletRequest,String,String)




createChannel
public void createChannel(String channelName, String providerName) throws ProviderContextException(Code)
Creates a new channel. A new channel is created based on the named provider. To create a nested channel, supply a hierarchical channel name. For example, to create channel A inside of container X, based on provider P:

createChannel("X" + CHANNEL_NAME_SEPARATOR + "A", "P");

This method only modifies the underlying configuration and does not create a Provider object. After calling this method, to get the provider object that backs this channel, call getProvider().
Parameters:
  channelName - Name of the channel being created.
Parameters:
  providerName - Symbolic name of the provider that will back the channel being created.
exception:
  ProviderContextException - if an error occurs in creating thenew global scope channel.
See Also:   ContainerProviderContext.getProvider(HttpServletRequest,String,String)




createContainer
public void createContainer(String channelName, String providerName) throws ProviderContextException(Code)
Creates a new container channel. A new container channel is created based on the named provider. To create a nested container channel, supply a hierarchical channel name. For example, to create container C inside of container X, based on provider P:

createContainer("X" + CHANNEL_NAME_SEPARATOR + "C", "P");

This method only modifies the underlying configuration and does not create a Provider object. After calling this method, to get the provider object that backs this channel, call getProvider().
Parameters:
  channelName - Name of the channel being created.
Parameters:
  providerName - Symbolic name of the provider that will back the container being created.
exception:
  ProviderContextException - if an error occurs in creating aglobal scope container channel.
See Also:   ContainerProviderContext.getProvider(HttpServletRequest,String,String)




existsChannel
public boolean existsChannel(String channel)(Code)
Tests if channel configuration exists.
Parameters:
  channel - a String, the channel name. a boolean, true if thechannel has been added, otherwise false.



getAvailableChannels
public List getAvailableChannels(String container) throws ProviderContextException(Code)
Gets the available channels for the container channel that this is providing an environment for.
Parameters:
  container - Container channel name. A List of Strings; the channel names.
exception:
  ProviderContextException - if an error occurs in getting theavailable channels for the named container.



getCachedContent
public StringBuffer getCachedContent(String name)(Code)
Gets the cached content view for a channel. When a channel's content view is retrieved from a channel, it is cached if the channel's provider object returns non-zero from its getRefreshTime() method. This method then gets this cached content for the channel. If containers wish to support this type of content caching, they can use this method.

Note that neither of the getContent() methods in this interface call this method automatically. It is up to the client of this interface to manually check the cache time and either call this method or call getContent() for the channel. It is not mandatory that a container channel use these features and thereby support content caching.
Parameters:
  name - a String, the channel name. a StringBuffer, the cached content, or null if there is no cached content for the channel.
See Also:   com.sun.portal.providers.Provider.getRefreshTime
See Also:   ContainerProviderContext.getCachedTime(String)



getCachedTime
public long getCachedTime(String name)(Code)
Gets the content view cache time for a channel. When the content view for a channel is cached (see getCachedContent()) the time that it was cached is also recorded. This information can be used by the client to decide if the cached value is stale.
Parameters:
  name - a String, the channel name. a long, the cache time, in milliseconds, or -1if the content is not cached.
See Also:   ContainerProviderContext.getCachedContent(String)



getContent
public StringBuffer getContent(HttpServletRequest req, HttpServletResponse res, String container, String channel) throws ProviderException(Code)
Gets the content view for the named channel. This method is provided for convenience. It gets the provider object for the named channel and calls Provider.getContent(HttpServletRequest, HttpServletResponse).
Parameters:
  req - an HttpServletRequest object to pass on to theprovider object.
Parameters:
  res - an HttpServletResponse object to pass on to theprovider object.
Parameters:
  container - Container channel name, or null if thechannel is not contained.
Parameters:
  name - Channel name. a StringBuffer that is the channels content view, ornull if there is an error in getting the channel content or if the channel is not presentable for that particular client type.
exception:
  ProviderException - if an error occurs in the provider'sgetContent() method.
See Also:   com.sun.portal.providers.Provider.getContent(HttpServletRequestHttpServletResponse)



getContent
public Map getContent(HttpServletRequest req, HttpServletResponse res, String container, List channels, int timeout) throws ProviderException(Code)
Gets the content view for a set of channels. This method is provided for convenience. It gets the provider object for each channel and calls its Provider.getContent() method. Fetching a channel's content view can be an expensive operation. This method allows said operation to be done in bulk for all of the channels constributing to the page allowing for optimizations such as parallelization.
Parameters:
  req - a HttpServletRequest object passed to eachchannel in the request for its content view.
Parameters:
  res - a HttpServletResponse object passed to eachchannel in the request for its content view.
Parameters:
  container - Container channel name, or null if thechannel is not contained.
Parameters:
  channels - a List object of Strings;the channel names.
Parameters:
  timeout - an int specifying the time to wait forall channels to complete getting their content view. a Map object; mapping String channel names toStringBuffer content, or mapping String channel names to null if there is an error in getting the channel content or if the channel is not presentable for that particular client type.
exception:
  ProviderException - if an error occurs in the provider'sgetContent() method.
See Also:   com.sun.portal.providers.Provider.getContent(HttpServletRequestHttpServletResponse)



getProvider
public Provider getProvider(HttpServletRequest req, String container, String channel)(Code)
Gets a provider. This method returns an instance of a Provider object for the named channel. This method will return null if the provider object is not available.

The HTTP request object parameter must contain implementation specific initialization information.
Parameters:
  req - an HttpServletRequest object containing provider initialization information.
Parameters:
  container - Container channel name, or null if thechannel is not contained.
Parameters:
  channel - a String, the channel name. Provider object for the given channel name.



getSelectedChannels
public List getSelectedChannels(String container) throws ProviderContextException(Code)
Gets the selected channels for the container channel that this is providing an environment for. Note that the selected channels are independent of the available channels. In other words, there may be channels that are selected but not available. This method will still include those channels and does not manipulate the result in any way. Ideally, however, a set of selected channels should be a subset of availble channels.
Parameters:
  container - Container channel name.channel is not contained.
exception:
  ProviderContextException - if an error occurs in getting theselected channels for the named container. A List of Strings; the channel names.



initProviders
public void initProviders(HttpServletRequest req, String container, List channels, int timeout)(Code)
Initializes a set of channels. This method is provided for convenience. It gets the provider object for each channel and calls its Provider.init() method. Channel initialization can be an expenesive operation. This method allows said operation to be done for all channels at one time allowing for optimizations such as parallelization.
Parameters:
  req - a HttpServletRequest object passed to eachchannel for initialized.
Parameters:
  container - Container channel name, or null if thechannel is not contained.
Parameters:
  channels - a List of String objects; the channel names.
Parameters:
  timeout - an int specifying the time to wait forall channels to complete initialization.
See Also:   com.sun.portal.providers.Provider.init(StringHttpServletRequest)



putCachedContent
public void putCachedContent(String name, StringBuffer content)(Code)
Puts the cached content into a map and using the provider name as the key. The cached map is controlled internally in the implementation of this interface.


Parameters:
  name - a String, the channel name.
Parameters:
  content - StringBuffer, the cached contentfor the channel.



removeChannel
public void removeChannel(String channelName) throws ProviderContextException(Code)
Removes a global scope channel.

This method only modifies the underlying configuration and does not modify the references of the channel in other places in the configuration.
Parameters:
  channelName - Name of the channel being removed.
exception:
  ProviderContextException - if an error occurs in removing theglobal scope channel.




setAvailableChannels
public void setAvailableChannels(String container, List available) throws ProviderContextException(Code)
Sets the available channels for the container channel that this is providing an environment for.
Parameters:
  container - Container channel name.
Parameters:
  available - List of Strings; the channel names.
exception:
  ProviderContextException - if an error occurs in setting theavailable channels for the named container.



setSelectedChannels
public void setSelectedChannels(String container, List selelected) throws ProviderContextException(Code)
Sets the selected channels for the container channel that this is providing an environment for.
Parameters:
  container - Container channel name.
Parameters:
  selected - List of Strings; the channel names.
exception:
  ProviderContextException - if an error occurs in setting theselected channels for the named container.



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