[ 
https://issues.apache.org/jira/browse/PORTLETBRIDGE-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030805#comment-13030805
 ] 

Michael Freedman commented on PORTLETBRIDGE-192:
------------------------------------------------

Alexandr -- it looks like you are commenting on Neil's APIs as the above 
doesn't fully describe the set of APIs I have proposed/started to put into use. 
 Could you repost comments pertaining to the APIs that are in the refactored 
code?

As to your points:
1) PortletContext, Request/Response are included in the API because there is a 
short period of time between when the controller is invoked (with a 
BridgeContext) and when it acquires a FacesContext (and if a nonFaces resource 
it never acquires one).  These APIs allow the controller access to these 
portlet objects before they are exposed in Faces.

2) Do we really need another threadlocal (and what do we gain by having one)?  
95%+ of the time we will need to acquire the BridgeContext we will either have 
or also need to acquire the FacesContext.  I had been planning on adding the 
BridgeContext to the FacesContext scope and let extensions/etc. access it there 
as needed.  The only real thing running outside the FacesContext is the 
controller which is passed the BridgeContext explicitly.

3) default viewId's and PortletConfig are in the BridgeConfig

4) Whether or not we have setter methods to allow for object initialization 
(somewhat) depends on the APIs you come up with for the factories.  If the 
factories cleanly allow for this type of object initialization and allows us to 
easily extend add new initialization 'attributes" in the future then you are 
right there is no need to have the set methods.  I included them so as we have 
to support new features in Faces that require additional config/context -- it 
is easy to add a get/set method and have the code using the factory updated to 
do the additional initialization call.

> Proposal for 3.0 API: javax.portlet.faces.context.BridgeContext and 
> associated BridgeContextFactory
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-192
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-192
>             Project: MyFaces Portlet Bridge
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 3.0.0
>            Reporter: Neil Griffin
>            Assignee: Michael Freedman
>
> This class contains contextual information related to the bridge. It is 
> inherently request scoped, and is useful for sharing data between 
> implementations of Bridge.java and ExternalContext.java
> Please refer to the following classes for this proposal: 
> http://svn.portletfaces.org/svn/portletfaces/bridge/portletfaces-bridge-api/trunk/src/main/java/org/portletfaces/bridge/context/BridgeContext.java
> http://svn.portletfaces.org/svn/portletfaces/bridge/portletfaces-bridge-api/trunk/src/main/java/org/portletfaces/bridge/context/BridgeContextFactory.java

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to