Neil,
Is it possible to clearly separate in the jira system proposals that change the Bridge spec (api) from one's that don't? I.e. -- first step of this bridge work is to reimplement the internals to make it more open/extensible without impacting the JSR 329 APIs. I.e. I neither want to run a foul of the JCP nor want to start a JSR yet. Once this is done and you guys are either consuming it or otherwise show that you pass the expected portions of the JSR 329 TCK we can move forward with a new JSR where we can address updating the API and deprecating parts that are no longer needed. Sound reasonable?
    -Mike-

On 3/31/2011 3:23 PM, Neil Griffin (JIRA) wrote:
      [ 
https://issues.apache.org/jira/browse/PORTLETBRIDGE-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Neil Griffin updated PORTLETBRIDGE-205:
---------------------------------------

     Description:
Proposal is to do this in Bridge.java:

        /** @deprecated replaced by {@link Bridge#BRIDGE_CONTEXT_ATTRIBUTE} and 
{@link BridgeContext#getPortletLifecyclePhase()} */
        @Deprecated     public static final String PORTLET_LIFECYCLE_PHASE = 
"javax.portlet.faces.phase";

And to refactor BridgeUtil.getPortletRequestPhase() to something like this:

        public static Bridge.PortletPhase getPortletRequestPhase() {

                Bridge.PortletPhase portletRequestPhase = null;
                FacesContext facesContext = FacesContext.getCurrentInstance();
                BridgeContext bridgeContext = (BridgeContext) 
facesContext.getAttributes().get(Bridge.BRIDGE_CONTEXT_ATTRIBUTE);

                if (bridgeContext != null) {
                        portletRequestPhase = 
bridgeContext.getPortletRequestPhase();
                }

                return portletRequestPhase;
        }

And refactor BridgeUtil.isPortletRequest() to something like this:

        public static boolean isPortletRequest() {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                BridgeContext bridgeContext = (BridgeContext) 
facesContext.getAttributes().get(Bridge.BRIDGE_CONTEXT_ATTRIBUTE);

                return (bridgeContext != null);
        }


   was:
Proposal is to do this in Bridge.java:

        /** @deprecated replaced by {@link Bridge#BRIDGE_CONTEXT_ATTRIBUTE} and 
{@link BridgeContext#getPortletLifecyclePhase()} */
        @Deprecated     public static final String PORTLET_LIFECYCLE_PHASE = 
"javax.portlet.faces.phase";

And to refactor BridgeUtil.getPortletRequestPhase() to something like this:

        public static Bridge.PortletPhase getPortletRequestPhase() {

                Bridge.PortletPhase portletRequestPhase = null;
                FacesContext facesContext = FacesContext.getCurrentInstance();
                ExternalContext externalContext = 
facesContext.getExternalContext();
                Map<String, Object>  requestMap = 
externalContext.getRequestMap();

                BridgeContext bridgeContext = (BridgeContext) 
requestMap.get(Bridge.BRIDGE_CONTEXT_ATTRIBUTE);

                if (bridgeContext != null) {
                        portletRequestPhase = 
bridgeContext.getPortletRequestPhase();
                }

                return portletRequestPhase;
        }

And refactor BridgeUtil.isPortletRequest() to something like this:

        public static boolean isPortletRequest() {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                ExternalContext externalContext = 
facesContext.getExternalContext();
                Map<String, Object>  requestMap = 
externalContext.getRequestMap();
                BridgeContext bridgeContext = (BridgeContext) 
requestMap.get(Bridge.BRIDGE_CONTEXT_ATTRIBUTE);

                return (bridgeContext != null);
        }



Proposal for 3.0 API: Deprecate constant Bridge.PORTLET_LIFECYCLE_PHASE and 
refactor BridgeUtil methods accordingly
-------------------------------------------------------------------------------------------------------------------

                 Key: PORTLETBRIDGE-205
                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-205
             Project: MyFaces Portlet Bridge
          Issue Type: New Feature
          Components: General
    Affects Versions: 3.0.0
            Reporter: Neil Griffin
            Assignee: Michael Freedman

Proposal is to do this in Bridge.java:
        /** @deprecated replaced by {@link Bridge#BRIDGE_CONTEXT_ATTRIBUTE} and 
{@link BridgeContext#getPortletLifecyclePhase()} */
        @Deprecated     public static final String PORTLET_LIFECYCLE_PHASE = 
"javax.portlet.faces.phase";
And to refactor BridgeUtil.getPortletRequestPhase() to something like this:
        public static Bridge.PortletPhase getPortletRequestPhase() {
                Bridge.PortletPhase portletRequestPhase = null;
                FacesContext facesContext = FacesContext.getCurrentInstance();
                BridgeContext bridgeContext = (BridgeContext) 
facesContext.getAttributes().get(Bridge.BRIDGE_CONTEXT_ATTRIBUTE);
                if (bridgeContext != null) {
                        portletRequestPhase = 
bridgeContext.getPortletRequestPhase();
                }
                return portletRequestPhase;
        }
And refactor BridgeUtil.isPortletRequest() to something like this:
        public static boolean isPortletRequest() {
                FacesContext facesContext = FacesContext.getCurrentInstance();
                BridgeContext bridgeContext = (BridgeContext) 
facesContext.getAttributes().get(Bridge.BRIDGE_CONTEXT_ATTRIBUTE);
                return (bridgeContext != null);
        }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to