myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfreed...@apache.org
Subject svn commit: r1099295 - in /myfaces/portlet-bridge/core/branches/refactored_3.0.x: ./ controller-api/ controller-api/src/ controller-api/src/main/ controller-api/src/main/java/ controller-api/src/main/java/org/ controller-api/src/main/java/org/apache/ c...
Date Tue, 03 May 2011 23:44:41 GMT
Author: mfreedman
Date: Tue May  3 23:44:40 2011
New Revision: 1099295

URL: http://svn.apache.org/viewvc?rev=1099295&view=rev
Log:
Added new module controller-api to hold the bridge implementation apis.  Modified the apis so they compile.

Added:
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/pom.xml
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeConfig.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeContext.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeController.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeDestroyRequestSystemEvent.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeInitializeRequestSystemEvent.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeLogger.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePostConfigureSystemEvent.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePostConstructFacesContextSystemEvent.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePreReleaseFacesContextSystemEvent.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeRequestScope.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeRequestScopeManager.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeSystemEvent.java
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/resources/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/resources/META-INF/
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/resources/META-INF/NOTICE
Modified:
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/pom.xml
    myfaces/portlet-bridge/core/branches/refactored_3.0.x/pom.xml

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/pom.xml?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/pom.xml (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/pom.xml Tue May  3 23:44:40 2011
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2006 The Apache Software Foundation.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <name>MyFaces Portlet Bridge Controller API</name>
+  <artifactId>portlet-bridge-controller-api</artifactId>
+  <packaging>jar</packaging>
+
+  <parent>
+    <groupId>org.apache.myfaces.portlet-bridge</groupId>
+    <artifactId>portlet-bridge</artifactId>
+    <version>3.0.0-SNAPSHOT</version>
+  </parent>
+      
+  <distributionManagement>
+    <site>
+      <id>apache-site</id>
+      <url>scpexe://minotaur.apache.org/www/myfaces.apache.org/portlet-bridge/3.0/controller-api</url>
+    </site>
+  </distributionManagement>
+  
+  <dependencies>
+    <dependency>
+      <artifactId>servlet-api</artifactId>
+      <groupId>javax.servlet</groupId>
+    </dependency>
+
+    <dependency>
+      <artifactId>portlet-api</artifactId>
+      <groupId>javax.portlet</groupId>
+    </dependency>
+    
+    <dependency>
+      <artifactId>jsp-api</artifactId>
+      <groupId>javax.servlet.jsp</groupId>
+    </dependency>
+    
+    <dependency>
+      <artifactId>jsf-api</artifactId>
+      <groupId>com.sun.faces</groupId>
+    </dependency>
+
+    <dependency>
+      <artifactId>portlet-bridge-api</artifactId>
+      <groupId>org.apache.myfaces.portlet-bridge</groupId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <!-- This is for distribution of the APIDocs for the website.  Must be run after the javadoc:javadoc target -->
+      <plugin>
+        <groupId>org.apache.myfaces.maven</groupId>
+          <artifactId>wagon-maven-plugin</artifactId>
+          <version>1.0.2</version>
+          <configuration>
+            <id>myfaces-nightly-builds</id>
+            <url>scpexe://minotaur.apache.org/www/myfaces.apache.org/portlet-bridge/3.0/controller-api/apidocs</url>
+            <inputDirectory>target/site/apidocs</inputDirectory>
+          </configuration>
+      </plugin>
+      
+      <!-- Generates the Javadocs for the Website.  Wagon will transport it -->
+      <plugin>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <doctitle>MyFaces Portlet Bridge Controller ${project.version} API</doctitle>
+          <windowtitle>MyFaces Portlet Bridge Controller ${project.version} API</windowtitle>
+       </configuration>
+      </plugin>
+      <!-- Allows building of jdev projects (jdev:jdev target) -->
+      <!-- TODO: This is an artifical dependancy on Trinidad, should it be removed? -->
+      <plugin>
+        <groupId>org.apache.myfaces.trinidadbuild</groupId>
+        <artifactId>maven-jdev-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>  
+</project> 

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeConfig.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeConfig.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeConfig.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeConfig.java Tue May  3 23:44:40 2011
@@ -0,0 +1,340 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+import java.util.List;
+
+import java.util.Map;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.faces.BridgeEventHandler;
+import javax.portlet.faces.BridgePublicRenderParameterHandler;
+import javax.portlet.faces.BridgeWriteBehindResponse;
+
+
+/**
+ * The <CODE>BridgeConfig</CODE> represents the set of values a portlet can configure for
+ * a given bridge instance. Currently, by spec, the portlet passes most of this 
+ * configuration to the bridge using <CODE>PortletContext</CODE> attributes.  The bridge,
+ * in its <code>init()</code> method, is responsible for packaging all this configuration
+ * information into a BridgeConfig.  It must then only reference such configuation information
+ * from this object.  I.e. it no longer makes reference to the <CODE>PortletContext</CODE> attributes.
+ * This allows replacable pieces of the bridge implementation to always have a consistent
+ * object to retrieve configuration information from.
+ */
+
+public interface BridgeConfig
+{
+  
+  /**
+   * Sets the <code>PortletConfig</code> object of the portlet that is utilizing this bridge.
+   * 
+   * @param config
+   *          the config object.
+   */
+  public void setPortletConfig(PortletConfig config);
+  
+  /**
+   * Gets the <code>PortletConfig</code> object of the portlet that is utilizing this bridge.
+   * 
+   * @return 
+   *          the config object.
+   */
+  public PortletConfig getPortletConfig();
+  
+
+  /**
+   * Sets the <code>Map</code> describing the mapping between each supported <code>PortletMode</code> 
+   * and its default Faces View (id).  When the bridge receives a request that isn't directly encoded
+   * with the target Faces view (such as the initial render request), the bridge relies on these
+   * default mappings to determine the target. There is one mapping per <code>PortletMode</code>
+   * supported by the portlet (and handledby Faces).  The key to the each entry in the map is the
+   * <code>String</code> name of the associated <code>PortletMode</code>;
+   * 
+   * @param defaultMappings between each supported <code>PortletMode</code> and the default
+   *          Faces target.
+   */  
+  public void setDefaultViewMappings(Map<String, String> defaultMappings);
+
+
+  /**
+   * Gets the <code>Map</code> describing the mapping between each supported <code>PortletMode</code> 
+   * and its default Faces View (id).  When the bridge receives a request that isn't directly encoded
+   * with the target Faces view (such as the initial render request), the bridge relies on these
+   * default mappings to determine the target. There is one mapping per <code>PortletMode</code>
+   * supported by the portlet (and handledby Faces).  The key to the each entry in the map is the
+   * <code>String</code> name of the associated <code>PortletMode</code>;
+   * 
+   * @return defaultMappings between each supported <code>PortletMode</code> and the default
+   *          Faces target.
+   */  
+  public Map<String, String> getDefaultViewMappings();
+  
+  
+  
+  /**
+   * Sets the <code>List</code> of <code>Servlet</code> mappings to the Faces servlet (information taken
+   * from web.xml).  The bridge uses these mappings to both detect whether a given URL is handled
+   * by Faces or not and to deal with mapping between viewIds and their underlying resources.
+   * 
+   * @param mappings
+   *          the various servlet mappings for the <code>FacesServlet</code>.
+   */
+  public void setFacesServletMappings(List<String> mappings);
+
+
+  /**
+   * Gets the <code>List</code> of <code>Servlet</code> mappings to the Faces servlet (information taken
+   * from web.xml).  The bridge uses these mappings to both detect whether a given URL is handled
+   * by Faces or not and to deal with mapping between viewIds and their underlying resources.
+   * 
+   * @return 
+   *          the various servlet mappings for the <code>FacesServlet</code>.
+   */  
+  public List<String> getFacesServletMappings();
+  
+  
+  /**
+   * Sets the name of the parameter used by the bridge to encode the target viewId.
+   * 
+   * @param name
+   *          parameter name that holds the bridge encoded target viewId.
+   */
+  public void setViewIdRenderParameterName(String name);
+  
+  
+  /**
+   * Gets the name of the parameter used by the bridge to encode the target viewId.
+   * 
+   * @return
+   *          parameter name that holds the bridge encoded target viewId.
+   */  
+  public String getViewIdRenderParameterName();
+   
+  
+  /**
+   * Sets the <code>BridgeLogger</code> that the bridge uses to log diagnostic and warning messages.
+   * 
+   * @param logger
+   *          <code>BridgeLogger</code>.
+   */  
+  public void setLogger(Class<? extends BridgeLogger> logger);
+  
+  
+  /**
+   * Gets the <code>BridgeLogger</code> that the bridge uses to log diagnostic and warning messages.
+   * 
+   * @return
+   *          <code>BridgeLogger</code>.
+   */
+  public Class<? extends BridgeLogger> getLogger();
+  
+
+  /**
+   * Sets the <code>BridgeEventHandler</code> that the bridge calls to handle any portlet event it processes.
+   * 
+   * @param handler
+   */    
+  public void setEventHandler(BridgeEventHandler handler);
+ 
+ 
+  /**
+   * Gets the <code>BridgeEventHandler</code> that the bridge calls to handle any portlet event it processes.
+   * 
+   * @return the <code>BridgeEventHandler</code>
+   */     
+  public BridgeEventHandler getEventHandler();
+  
+ 
+  /**
+   * Sets the <code>BridgePublicRenderParameterHandler</code> that the bridge calls to handle post processing recalculations
+   * following the bridge pushing incoming portlet public render parameters to their models.
+   * 
+   * @param handler
+   */  
+  public void setPublicRenderParameterHandler(BridgePublicRenderParameterHandler handler);
+  
+  
+  /**
+   * Gets the <code>BridgePublicRenderParameterHandler</code> that the bridge calls to handle post processing recalculations
+   * following the bridge pushing incoming portlet public render parameters to their models.
+   * 
+   * @return <code>BridgePublicRenderParameterHandler</code>
+   */ 
+  public BridgePublicRenderParameterHandler getPublicRenderParameterHandler();
+  
+  
+  
+  /**
+   * Sets whether or not the bridge should carry action parameters forward into subsequent renders.
+   * 
+   * @param preserve <code>true</code> indicates the action parameters are preserved.  
+   *                 <code>false</code> indicates they are not.
+   */
+  public void setPreserveActionParameters(boolean preserve);
+  
+  /**
+   * Sets whether or not the bridge should carry action parameters forward into subsequent renders.
+   * 
+   * @param preserve <code>Boolean.TRUE</code> indicates the action parameters are preserved.  
+   *                 <code>Boolean.FALSE</code> indicates they are not.
+   */
+  public void setPreserveActionParameters(Boolean preserve);
+  
+  /**
+   * Gets whether or not the bridge should carry action parameters forward into subsequent renders.
+   * If not previously set, it returns <code>false</code>.
+   * 
+   * @return <code>true</code> indicates the action parameters are preserved.  
+   *                 <code>false</code> indicates they are not.
+   */
+  public boolean hasPreserveActionParameters();
+  
+  
+  /**
+   * Sets the <code>List</code> of attributes to be excluded from the bridge's request scope.
+   * This list includes both the attributes configured in the portlet.xml (portlet init parameter)
+   * as well as any configured in any of this web application's faces-config.xml(s).  It doesn't
+   * include any of the predefined attributes as defined by the specification.  A list entry is
+   * either the fully qualified name of the attribute that should be excluded or a wildcard terminated
+   * (package) path.  In the latter case, all attributes whose names reside in this package
+   * (non-recusive) are excluded.
+   * 
+   * @param excludedAttributes <code>List</code> of request attribute names that are to be
+   * excluded from the bridge's managed request scope.
+   */
+  public void setExcludedRequestAttributes(List<String> excludedAttributes);
+  
+  
+  /**
+   * Gets the <code>List</code> of attributes to be excluded from the bridge's request scope.
+   * This list includes both the attributes configured in the portlet.xml (portlet init parameter)
+   * as well as any configured in any of this web application's faces-config.xml(s).  It doesn't
+   * include any of the predefined attributes as defined by the specification.  A list entry is
+   * either the fully qualified name of the attribute that should be excluded or a wildcard terminated
+   * (package) path.  In the latter case, all attributes whose names reside in this package
+   * (non-recusive) are excluded.
+   * 
+   * @return <code>List</code> of request attribute names that are to be
+   * excluded from the bridge's managed request scope.
+   */
+  public List<String> getExcludedRequestAttributes();
+  
+ 
+  /**
+   * Sets the <code>Map</code> containing the mappings between portlet public render parameter names
+   * and a corresponding Faces EL statement.  The Faces EL is expected to resolve to
+   * a managed bean property allowing the bridge to push/pull public render parameter 
+   * values directly from managed bean properties.
+   * This configuration information is extracted from the faces-config.xml(s).
+   * 
+   * 
+   * @param prpMappings <code>Map<String, String></code>.  The key is the name of the 
+   * portlet public render parameter for this mapping.  If prefixed with
+   * portletName: the mapping only pertains to the specifically named portlet, otherwise
+   * the mapping pertains to all portlets in the web application.  The value is a
+   * Faces EL that resolves to a managed bean property.
+   */
+  
+  public void setPublicRenderParameterMappings(Map<String, String> prpMappings);
+  
+  
+  /**
+   * Gets the <code>Map</code> containing the mappings between portlet public render parameter names
+   * and a corresponding Faces EL statement.  The Faces EL is expected to resolve to
+   * a managed bean property allowing the bridge to push/pull public render parameter 
+   * values directly from managed bean properties.
+   * This configuration information is extracted from the faces-config.xml(s).
+   * 
+   * 
+   * @return <code>Map<String, String></code>.  The key is the name of the 
+   * portlet public render parameter for this mapping.  If prefixed with
+   * portletName: the mapping only pertains to the specifically named portlet, otherwise
+   * the mapping pertains to all portlets in the web application.  The value is a
+   * Faces EL that resolves to a managed bean property.
+   */
+  public Map<String, String> getPublicRenderParameterMappings();
+  
+  
+  /**
+   * Sets the <code>Class</code> that the bridge uses to wrap the response when 
+   * rendering a <code>JSP</code> to implement the Faces implementation specific
+   * support for handling interleaved response writing.
+   * 
+   * @param wbrClass
+   *          <code>Class</code> that implements the <code>BridgeWritebehindResponse</code> interface
+   *          and is a proper portlet render response wrapper.
+   */
+  public void setWriteBehindRenderResponseWrapper (Class<? extends BridgeWriteBehindResponse> renderResponseWrapper);
+  
+  
+  /**
+   * Gets the <code>Class</code> that the bridge uses to wrap the response when 
+   * rendering a <code>JSP</code> to implement the Faces implementation specific
+   * support for handling interleaved response writing.
+   * 
+   * @return 
+   *          <code>Class</code> that implements the <code>BridgeWritebehindResponse</code> interface
+   *          and is a proper portlet render response wrapper.
+   */
+  public Class<? extends BridgeWriteBehindResponse> getWriteBehindRenderResponseWrapper();
+  
+  
+  /**
+   * Sets the <code>Class</code> that the bridge uses to wrap the response when 
+   * rendering a <code>JSP</code> resource to implement the Faces implementation specific
+   * support for handling interleaved response writing.
+   * 
+   * @param wbrClass
+   *          <code>Class</code> that implements the <code>BridgeWritebehindResponse</code> interface
+   *          and is a proper portlet resource response wrapper.
+   */
+  public void setWriteBehindResourceResponseWrapper (Class<? extends BridgeWriteBehindResponse> resourceResponseWrapper);
+  
+  
+  /**
+   * Gets the <code>Class</code> that the bridge uses to wrap the response when 
+   * rendering a <code>JSP</code> resource to implement the Faces implementation specific
+   * support for handling interleaved response writing.
+   * 
+   * @return 
+   *          <code>Class</code> that implements the <code>BridgeWritebehindResponse</code> interface
+   *          and is a proper portlet resource response wrapper.
+   */
+  public Class<? extends BridgeWriteBehindResponse> getWriteBehindResourceResponseWrapper();
+  
+  
+  /**
+   * Sets the <code>List<String></code> of the possible suffixes that
+   * Faces recognizes as Faces processed targets.  Since JSF 2.0 the default suffix
+   * mapping Faces recognizes is a list rather than a single value.  This information
+   * comes from the web.xml and is used to help the bridge map between viewIds and
+   * their underlying resources.
+   * 
+   * @param suffixes
+   *          <code>List</code> of the suffixes Faces recognizes as Faces targets.
+   */
+  public void setFacesSuffixes(List<String> suffixes);
+  
+  
+  /**
+   * gets the <code>List<String></code> of the possible suffixes that
+   * Faces recognizes as Faces processed targets.  Since JSF 2.0 the default suffix
+   * mapping Faces recognizes is a list rather than a single value.  This information
+   * comes from the web.xml and is used to help the bridge map between viewIds and
+   * their underlying resources.
+   * 
+   * @return  <code>List</code> of the suffixes Faces recognizes as Faces targets.
+   */  
+  public Map<String, String> getFacesSuffixes();
+  
+  
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeContext.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeContext.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeContext.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeContext.java Tue May  3 23:44:40 2011
@@ -0,0 +1,326 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+import java.util.List;
+
+import java.util.Map;
+
+import javax.portlet.PortletContext;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletResponse;
+import javax.portlet.faces.Bridge;
+
+
+/**
+ * The <CODE>BridgeContext</CODE> contains the runtime specific state the bridge 
+ * makes public so its various independent pieces can work together to properly
+ * operate.  Simplistically, the bridge is a controller and a set of Faces 
+ * extensions that work together execute Faces requests in a portlet container.
+ * By encapsulating state that is shared between these pieces, an extensible, 
+ * pluggable bridge is supported as bridge implementors can now extend a base 
+ * implementation by extending or overriding any of the Faces extensions (and
+ * other hook points) required to add their specific behaviors.<p>
+ * A new <code>BridgeContext</code> is created in each bridge request
+ * <code>doFacesRequest()</code>.  After the bridge controller has initialized
+ * the context the <code>SystemEvent BridgeContextInitializedEvent</code> is dispatched 
+ * to any registered listeners for further transformation.  Once the bridge has acquired 
+ * the <code>FacesContext</code>, the <code>BridgeContext</code> is added to the
+ * <code>FacesContext</code> scope making it freely available from anywhere within 
+ * Faces during that request.
+ */
+public interface BridgeContext 
+{
+  /**
+   * Called at the end of bridge request processing.  It releases associated
+   * state.
+   */
+  public void release();
+  
+  
+  /**
+   * Sets the <code>PortletContext</code> of the portlet invoking this bridge.
+   * @param context
+   */
+  public void setPortletContext(PortletContext context);
+  
+  
+  /**
+   *
+   * @return the <code>PortletContext</code> of the portlet invoking this bridge.
+   */
+  public PortletContext getPortletContext();
+  
+  
+  /**
+   * Sets the <code>PortletRequest</code> that invoked the bridge.
+   * @param request
+   */
+  public void setPortletRequest(PortletRequest request);
+  
+  
+  /**
+   * 
+   * @return the <code>PortletRequest</code> that invoked the bridge.
+   */
+  public PortletRequest getPortletRequest();
+  
+  
+  /**
+   * Sets the <code>PortletResponse</code> that invoked the bridge.
+   * @param response
+   */
+  public void setPortletResponse(PortletResponse response);
+  
+  /**
+   * 
+   * @return the <code>PortletResponse</code> that invoked the bridge.
+   */
+  public PortletResponse getPortletResponse();
+
+  /**
+   * Sets the request phase govering this context.  Used to both detect
+   * whether one is executing in a portlet request without referencing
+   * potential unbound classes as well as to determine the type of request
+   * and response one is dealing with as there are distinct portlet request
+   * and response objects per portlet lifecycle phase.<p>
+   * Note: as per specification, its more typical for the Faces developer to
+   * rely on the request attribute containing this same information.  Its 
+   * included in the BridgeContext primarily for bridge (extension) implementors.
+   * 
+   * @param phase
+   */
+  public void setPortletRequestPhase(Bridge.PortletPhase phase);
+  
+  /**
+   * Gets the request phase govering this context.  Used to both detect
+   * whether one is executing in a portlet request without referencing
+   * potential unbound classes as well as to determine the type of request
+   * and response one is dealing with as there are distinct portlet request
+   * and response objects per portlet lifecycle phase.<p>
+   * Note: as per specification, its more typical for the Faces developer to
+   * rely on the request attribute containing this same information.  Its 
+   * included in the BridgeContext primarily for bridge (extension) implementors.
+   * 
+   * @return the current portlet request lifcycle phase we are executing in.
+   */
+  public Bridge.PortletPhase getPortletReuqestPhase();
+  
+  
+  /**
+   * Sets the <code>BridgeConfig</code> that corresponds to this instance.
+   * @param config
+   */
+  public void setBridgeConfig(BridgeConfig config);
+  
+  
+  /**
+   * 
+   * @return the <code>BridgeConfig</code> that corresponds to this instance.
+   */
+  public BridgeConfig getBridgeConfig();
+  
+  
+  /**
+   * This <code>Map</code> is a place to put extra (implementation specific) bridge state
+   * or anything else whose lifetime matches this scope.
+   * @return a mutable <code>Map<String, Object></code> of bridge context scoped attributes
+   */
+  public Map<String, Object> getAttributes();
+  
+  
+  // Default = true;  always parts of the bridge read/write whether bridge request scope is preserved at the end of this request
+  /**
+   * Indicates whether the controller should preserve the bridge request scope.  By specification
+   * there are a variety of reasons why the bridge shouldn't preserve a request scope.  Sometimes
+   * this is determined in one of the bridge's Faces extensions that is separate from the controller.
+   * The dectector used this method to convery to the controller its behavior when its done with the
+   * request and considers whether to save the bridge request scope or not.  <code>true</code> means the
+   * request scope should be preserved.  <code>true</code> means the request scope should not be preserved.
+   * The default is <code>true</code>
+   * @param preserve
+   */
+  public void setPreserveBridgeRequestScope(boolean preserve);
+  
+  
+  /**
+   * @return the <code>boolean</code> indicating whether the controller should preserve the bridge request scope or not.
+   *         <code>true</code> means the request scope should be preserved.  <code>true</code> means
+   *         the request scope should not be preserved. The default is <code>true</code>
+   */
+  public boolean getPreserveBridgeRequestScope();
+  
+ 
+  /**
+   * Faces stores the current view state in a hidden field in the response.  When this is
+   * resupplied as part of the POSTBACK, Faces is able to restore the view and process the
+   * action.  In the portlet model, however, not every (following) request is a POSTBACK.  The
+   * portal can ask the portlet to redisplay itself at any time merely because something has
+   * else has occurred on the page (outside the portlet) that causes the portal to rerender the
+   * entire page.  As this isn't a POSTBACK the view state hidden field isn't supplied, yet Faces 
+   * still needs to restore the view from this state if its to properly re-render.  To support this
+   * bridge must capture the value of this hidden field and manage it in its state (often the 
+   * bridge request scope).  This capture involves using a Faces extension (<code>StateManager</code>)
+   * to extract the parameter value and the controller to manage the state.  The value is conveyed
+   * between these two subsystems through here.  This method sets the captured view state parameter
+   * value for later retrieval.
+   * @param savedViewStateParam
+   */
+  // Allows a StateManager to communicate the saved ViewState to the controller -- so controller
+  // can retain for reference on portlet redisplay
+  public void setSavedViewStateParam(String savedViewStateParam);
+  
+  /**
+   * Faces stores the current view state in a hidden field in the response.  When this is
+   * resupplied as part of the POSTBACK, Faces is able to restore the view and process the
+   * action.  In the portlet model, however, not every (following) request is a POSTBACK.  The
+   * portal can ask the portlet to redisplay itself at any time merely because something has
+   * else has occurred on the page (outside the portlet) that causes the portal to rerender the
+   * entire page.  As this isn't a POSTBACK the view state hidden field isn't supplied, yet Faces 
+   * still needs to restore the view from this state if its to properly re-render.  To support this
+   * bridge must capture the value of this hidden field and manage it in its state (often the 
+   * bridge request scope).  This capture involves using a Faces extension (<code>StateManager</code>)
+   * to extract the parameter value and the controller to manage the state.  The value is conveyed
+   * between these two subsystems through here.
+   * @return  the captured view state parameter.
+   */
+  public String getSavedViewStateParam();
+  
+  /**
+   * The bridge allows viewIds in the faces-config.xml to contain queryStrings.  
+   * As the <code>NavigationHandler</code> resolves such navigation and create the
+   * asscoiated view and Faces itself doesn't expect these query strings, the bridge
+   * needs to extract this query string and stash its value for later retrieval/use by 
+   * the controller which encodes these extra parameters as part of its action response.
+   * @param queryString query string portion of a viewId
+   */
+  public void setNavigationQueryString(String queryString);
+  
+  
+  /**
+   * The bridge allows viewIds in the faces-config.xml to contain queryStrings.  
+   * As the <code>NavigationHandler</code> resolves such navigation and create the
+   * asscoiated view and Faces itself doesn't expect these query strings, the bridge
+   * needs to extract this query string and stash its value for later retrieval/use by 
+   * the controller which encodes these extra parameters as part of its action response.
+   * 
+   * @return the queryString portion associated with the viewId that created the current <code>UIViewRoot</code>
+   */
+  public String getNavigationalQueryString();
+  
+  /**
+   * The bridge is required to support redirects to other Faces views during render.  As the
+   * portlet model doesn't support redirects, the bridge controller must simulate the redirect 
+   * by unwinding the current lifecycle execution and restarting a new lifecycle execution
+   * based on the new target.  In addition any additional query string parameters must be
+   * represented in the request when this lifecycle is rerun.<p>
+   * Such redirects are detected in <code>ExternalContext.redirect()</code> but implemented by the
+   * controller.  This sets the query string portion of the redirect url (exclusive of the ?) so 
+   * its available to the controller in handling the render redirect.  This method automatically
+   * calls <code>setRenderRedirect(true);</code> to flag that a renderRedirect has been detected.
+   * @param queryString
+   */
+  public void setRenderRedirectQueryString(String queryString);
+  
+  
+  /**
+   * The bridge is required to support redirects to other Faces views during render.  As the
+   * portlet model doesn't support redirects, the bridge controller must simulate the redirect 
+   * by unwinding the current lifecycle execution and restarting a new lifecycle execution
+   * based on the new target.  In addition any additional query string parameters must be
+   * represented in the request when this lifecycle is rerun.<p>
+   * Such redirects are detected in <code>ExternalContext.redirect()</code> but implemented by the
+   * controller.
+   * 
+   * @return prevously set query string (exclusive of the ?) portion of the render redirect url
+   */
+  public String getRenderRedirectQueryString();
+  
+
+  /**
+   * Sets whether a render redirect has occurred in this request.  Generally this is set
+   * automatically by <code>setRenderRedirectQueryString</code>.
+   * 
+   * @param redirect
+   */
+  public void setRenderRedirect(boolean redirect);
+  
+  
+  /**
+   * 
+   * @return indication of whether a render redirect has occured.  <code>true</code>
+   *         if there has been one in this request.  Default is <code>false</code>.
+   */
+  public boolean hasRenderRedirect();
+  
+ 
+  /**
+   * Set if the renderRedirect occurred after the (JSP) dispatch.  Needed because 
+   * <code>dispatch.forward()</code> can't be called twice in the same request.
+   * Setting this will allow the bridge to know to use <code>dispatch.include()</code> for
+   * rendering the "redirected"  view.
+   * @param afterDispatch
+   */
+  public void setRenderRedirectAfterDispatch(boolean afterDispatch);
+  
+  
+  /**
+   * 
+   * @return indication of whether the renderRedirect occurred before or after
+   *         the dispatch.  <code>true</code> indicates the redirect ocurred
+   *         after the dispatch.  <code>false</code> by default.
+   */
+  public boolean hasRenderRedirectAfterDispatch();
+  
+  // Holds a List of attr names that exist prior to acquriing Faces artifacts -- used
+  // to properly clean things up post Lifecycle and in support of renderredirects
+  
+  /**
+   * Sets the names of the attributes which existed before the <code>FacesContext</code>
+   * is acquired.  Used for attribute exclusion, request resetting before a render 
+   * redirect, as well as allowing the FacesContext to release request attrs during
+   * its release.
+   * @param names list of attribute names that exist in the request scope before
+   *        acquiring the <code>FacesContext</code>
+   */
+  public void setPreFacesRequestAttrNames(List<String> names);
+  
+  
+  /**
+   * 
+   * @return the names of the request attributes that existed before the
+   *         <code>FacesContext</code> was acquired.
+   */
+  public List<String> getPreFacesRequestAttrNames();
+  
+  // Set by the controller to communicate which parameters are part of the preserved ActionParameters
+  // so the encodeActionURL can excldue them when encoding a self-referencing portlet: url -- i.e
+  // one that is supposed to be a redisplay preserving the current state.
+  
+  /**
+   * <code>Map</code> of the action parameters that have been preserved for this
+   * render request.  Set by the controller when processing a render so
+   * the <code>ExternalContext.encodeActionURL()</code> can exclude them from its
+   * encoding of a self-referencing portlet: url.  I.e. one that is supposed to redisplay
+   * preserving the existing state.
+   * 
+   * @param actionParamMap <code>Map</code> of the action parameters in this render request.
+   */
+  public void setPreservedActionParams(Map<String, String[]> actionParamMap);
+  
+  /**
+   * @return previously set <code>Map</code> of the action parameters in this render request.
+   */
+  public Map<String, String[]> getPreservedActionParams();
+  
+  
+  
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeController.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeController.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeController.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeController.java Tue May  3 23:44:40 2011
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import javax.portlet.faces.Bridge;
+import javax.portlet.faces.BridgeDefaultViewNotSpecifiedException;
+import javax.portlet.faces.BridgeException;
+import javax.portlet.faces.BridgeUninitializedException;
+
+
+public interface BridgeController extends Bridge
+{
+  
+  public void processAction(BridgeContext ctx)
+     throws BridgeException,
+            BridgeDefaultViewNotSpecifiedException,
+            BridgeUninitializedException, 
+            NullPointerException; 
+  
+  public void handleEvent(BridgeContext ctx)
+     throws BridgeException,
+            BridgeDefaultViewNotSpecifiedException,
+            BridgeUninitializedException, 
+            NullPointerException;  
+ 
+ public void renderHead(BridgeContext ctx)
+    throws BridgeException,
+           BridgeDefaultViewNotSpecifiedException,
+           BridgeUninitializedException, 
+           NullPointerException;
+
+  public void renderBody(BridgeContext ctx)
+     throws BridgeException,
+            BridgeDefaultViewNotSpecifiedException,
+            BridgeUninitializedException, 
+            NullPointerException;
+  
+  public void getFacesResource(BridgeContext ctx)
+     throws BridgeException,
+            BridgeDefaultViewNotSpecifiedException,
+            BridgeUninitializedException, 
+            NullPointerException;
+  
+  public void getNonFacesResource(BridgeContext ctx)
+     throws BridgeException,
+            BridgeDefaultViewNotSpecifiedException,
+            BridgeUninitializedException, 
+            NullPointerException;
+  
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeDestroyRequestSystemEvent.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeDestroyRequestSystemEvent.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeDestroyRequestSystemEvent.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeDestroyRequestSystemEvent.java Tue May  3 23:44:40 2011
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+
+/**
+ * Faces <code>SystemEvent</code> sent by the Bridge in its <code>doFacesRequest()</code> method after
+ * finishing request processing and just before it returns. Gives listeners
+ * the ability to undo any work done in their own request initialization. 
+ */
+public class BridgeDestroyRequestSystemEvent extends BridgeSystemEvent
+{
+  
+  public BridgeDestroyRequestSystemEvent(BridgeContext ctx)
+  {
+    super(ctx);
+  }
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeInitializeRequestSystemEvent.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeInitializeRequestSystemEvent.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeInitializeRequestSystemEvent.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeInitializeRequestSystemEvent.java Tue May  3 23:44:40 2011
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+
+/**
+ * Faces <code>SystemEvent</code> sent by the Bridge in its <code>doFacesRequest()</code> method after
+ * acquiring the <code>BridgeContext</code> (and before doing anything else). Gives listeners
+ * the ability to do their own request initialization and/or to augment the <code>BridgeContext</code>.  
+ * For example a listener could get the request or response from the <code>BridgeContext</code>,
+ * wrap it to add their own overrides, and then put back into the <code>BridgeContext</code>.
+ * Such use would ensure the wrapped request or response is what is used throughout the bridge's request processing.
+ */
+public class BridgeInitializeRequestSystemEvent extends BridgeSystemEvent
+{
+  public BridgeInitializeRequestSystemEvent(BridgeContext ctx)
+  {
+    super(ctx);
+  }
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeLogger.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeLogger.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeLogger.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeLogger.java Tue May  3 23:44:40 2011
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+
+
+
+/**
+ * Stub -- to be added
+ */
+
+public interface BridgeLogger
+{
+  
+
+  
+  
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePostConfigureSystemEvent.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePostConfigureSystemEvent.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePostConfigureSystemEvent.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePostConfigureSystemEvent.java Tue May  3 23:44:40 2011
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+import javax.faces.event.SystemEvent;
+
+/**
+ * Faces <code>SystemEvent</code> sent by the Bridge in its <code>init()</code> method after
+ * initializing itself. Allows other extensions to also do any necessary
+ * initializations.
+ */
+public class BridgePostConfigureSystemEvent extends SystemEvent
+{  
+
+  public BridgePostConfigureSystemEvent(BridgeConfig config)
+  {
+    super(config);
+  }
+  
+  public BridgeConfig getBridgeConfig()
+  {
+    return (BridgeConfig) getSource();
+  }
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePostConstructFacesContextSystemEvent.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePostConstructFacesContextSystemEvent.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePostConstructFacesContextSystemEvent.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePostConstructFacesContextSystemEvent.java Tue May  3 23:44:40 2011
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+/**
+ * Faces <code>SystemEvent</code> sent by the Bridge in its <code>doFacesRequest()</code> method 
+ * after the bridge has acquired the <code>FacesContext</code> but before it runs the <code>Lifecyle</code>.
+ * Gives listeners the ability to do work at a point in which the entire request processing
+ * environment has been established but before actually executing the request.  One use
+ * allows <code>ExternalContext</code> implementations to be notified prior to use to do any 
+ * initializations that couldn't be done in its constructor because it lacked access
+ * to the <code>BridgeContext</code>.
+ */
+public class BridgePostConstructFacesContextSystemEvent extends BridgeSystemEvent
+{  
+  
+  public BridgePostConstructFacesContextSystemEvent(BridgeContext ctx)
+  {
+    super(ctx);
+  }
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePreReleaseFacesContextSystemEvent.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePreReleaseFacesContextSystemEvent.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePreReleaseFacesContextSystemEvent.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgePreReleaseFacesContextSystemEvent.java Tue May  3 23:44:40 2011
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+
+/**
+ * Faces <code>SystemEvent</code> sent by the Bridge in its <code>doFacesRequest()</code> method after
+ * executing the request and before releaing the <code>FacesContext</code>. 
+ */
+public class BridgePreReleaseFacesContextSystemEvent extends BridgeSystemEvent
+{
+  public BridgePreReleaseFacesContextSystemEvent(BridgeContext ctx)
+  {
+    super(ctx);
+  }
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeRequestScope.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeRequestScope.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeRequestScope.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeRequestScope.java Tue May  3 23:44:40 2011
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+import java.util.List;
+
+import java.util.Map;
+
+import java.util.concurrent.ConcurrentMap;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.faces.BridgeWriteBehindResponse;
+
+/**
+ * BridgeRequestScope is merely the holder of the bridge's request scope state.  
+ * As such its a <code>Map</code>.  Its main abstraction is to provide an id
+ * which a scope manager can use to identify this scope and as the gatekeeper 
+ * of specific attributes that are excluded from the scope.<br>
+ * 
+ * The id is a construction of a manager provider prefix followed by a colon 
+ * followed by a BridgeRequestScope generated unique id.  <br>
+ * 
+ * The BridgeRequestScope's main function is to prevent excluded attributes from
+ * being added to itself.  The excluded attributes are comprised of those defined
+ * by the specification and those set by its client (typically its manager). 
+ */
+public interface BridgeRequestScope<String, Object> extends ConcurrentMap<String, Object>
+{
+ 
+ /**
+   * Request scopes are managed by a request scope manager.  The manager is
+   * responsible for creating and destroying a particular scope.  As some
+   * manager policies may need to group scopes so they can be easily located
+   * before being destroyed, the manager can (pre)set a prefix for this scope.
+   * If set the request scope must append this prefix to the unique id it generates
+   * to represent this scope, separating the two with a colon.
+   * @param prefix
+   */
+ public void setIdPrefix(String prefix);
+ 
+ /**
+   * 
+   * @return unique string id representing this scope.  Its value is prefixed by 
+   *         whatever prefix has been previously set on it.
+   */
+ public String getId();
+ 
+ /**
+   * Sets a new List of excluded attribute names.  The names follow the syntax
+   * described in the specification.  Any currently set attribute names are
+   * lost.
+   * 
+   * @param excludedNames
+   */
+ public void setExcludedEntries(List<String> excludedNames);
+ 
+ /**
+   * Adds a new List of excluded attribute names to the existing set.
+   * Duplicates are ignored. The names follow the syntax
+   * described in the specification.
+   * 
+   * @param excludedNames
+   */
+ public void addExcludedEntries(List<String> excludedNames);
+ 
+ /**
+   * 
+   * @param excludedNames returns the current list of excluded attribute names
+   */
+ public void getExcludedEntries(List<String> excludedNames);
+ 
+ 
+ /**
+   * Allows the caller to (pre-determine) if a given attribute name/value pair
+   * will be excluded ot not.
+   * 
+   * @param key name of the attribute 
+   * @param value of the attribute
+   * @return true if the attribute will be excluded, false otherwise.
+   */
+ public boolean isExcluded(String key, Object value);
+ 
+ /**
+  * Note:  The RequestScope must override put() and putAll().  In the case of put()
+  * the attribute is only put if its not excluded.  In the case of putAll(), only
+  * those attributes that aren't excluded are put.
+  */
+  
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeRequestScopeManager.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeRequestScopeManager.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeRequestScopeManager.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeRequestScopeManager.java Tue May  3 23:44:40 2011
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+import java.util.List;
+
+import java.util.Map;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.faces.BridgeWriteBehindResponse;
+
+/**
+ * The RequestScopeManager manages a set of RequestScopes based on its desired policies.
+ * Clients interact with this manager to create and remove request scopes and to lookup
+ * (access) a request scope by its key.
+ */
+
+public interface BridgeRequestScopeManager
+{
+  /**
+   * Create a new empty RequestScope.  As a by product of this call
+   * the manager should set the RequestScope prefix in a manner that allows it to 
+   * manage the various remove methods.
+   * @param ctx
+   * @return the new BridgeRequestScope
+   */
+  public BridgeRequestScope createRequestScope(BridgeContext ctx);
+  
+  /**
+   * Returns the BridgeRequestScope corresponding to the supplied key (id)
+   * @param ctx
+   * @param id BridgeRequestScope's id
+   * @return the BridgeRequestScope that corresponds to the supplied key
+   */
+  public BridgeRequestScope getRequestScopeById(BridgeContext ctx, String id);
+  
+  /**
+   * Removes the specific BridgeRequestScope (from management) that
+   * corresponds to the supplied key.
+   * @param ctx
+   * @param id
+   * @return the BridgeRequestScope that corresponds to the supplied key.
+   */
+  public BridgeRequestScope removeRequestScopeById(BridgeContext ctx, String id);
+  
+  
+  /**
+   * Removes the supplied BridgeRequestScope from management.
+   * @param ctx
+   * @param scope
+   */
+  public void removeRequestScope(BridgeContext ctx, BridgeRequestScope scope);
+  
+  
+  /**
+   * Removes all the BridgeRequestScope's currently by managed by this manager
+   * for the specific portlet that is identified in the PortletConfig object
+   * obtainable from the BridgeContext.
+   * @param ctx
+   */
+  public void removeRequestScopesByPortlet(BridgeContext ctx);
+  
+  
+  /**
+   * Removes all the  BridgeRequestScope's currently by managed by this manager
+   * for the current session.
+   * 
+   * @param ctx
+   */
+  public void removeRequestScopesBySession(BridgeContext ctx);
+  
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeSystemEvent.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeSystemEvent.java?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeSystemEvent.java (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeSystemEvent.java Tue May  3 23:44:40 2011
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
+ * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
+ * for the specific language governing permissions and limitations under the License.
+ */
+package org.apache.myfaces.portlet.faces.bridge;
+
+import javax.faces.event.SystemEvent;
+
+/**
+ * Base bridge <code>SystemEvent</code> class the provides access to the <code>BridgeContext</code>.
+ */
+public class BridgeSystemEvent extends SystemEvent
+{
+    
+  public BridgeSystemEvent(BridgeContext ctx)
+  {
+    super(ctx);
+  }
+  
+  public BridgeContext getContext()
+  {
+    return (BridgeContext) getSource();
+  }
+  
+}
\ No newline at end of file

Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/resources/META-INF/NOTICE?rev=1099295&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/resources/META-INF/NOTICE (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/resources/META-INF/NOTICE Tue May  3 23:44:40 2011
@@ -0,0 +1,14 @@
+Apache MyFaces Portlet 2.0 Bridge for JavaServer Faces 2.0
+Copyright [2007, 2008, 2009, 2010, 2011] The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of this software are Copyright (c) 2007, Oracle 
+Corporation, <http://www.oracle.com/> and are licensed to 
+the Apache Software Foundation under the "Software Grant 
+and Corporate Contribution License Agreement"
+
+See the LICENSE.txt file for information on all licenses 
+associated with this software.
+

Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/pom.xml?rev=1099295&r1=1099294&r2=1099295&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/pom.xml Tue May  3 23:44:40 2011
@@ -56,6 +56,11 @@
       <artifactId>portlet-bridge-api</artifactId>
       <groupId>org.apache.myfaces.portlet-bridge</groupId>
     </dependency>
+
+    <dependency>
+      <artifactId>portlet-bridge-controller-api</artifactId>
+      <groupId>org.apache.myfaces.portlet-bridge</groupId>
+    </dependency>
     
     <!-- Needed by the StateUtils in Shared -->
     <dependency>

Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/pom.xml?rev=1099295&r1=1099294&r2=1099295&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/pom.xml Tue May  3 23:44:40 2011
@@ -93,6 +93,7 @@
 
   <modules>
     <module>api</module>
+    <module>controller-api</module>
     <module>impl</module>
     <module>examples</module>
   </modules>
@@ -210,6 +211,13 @@
           <version>${project.version}</version>
         </dependency>
 
+        <!-- JSF Portlet Bridge Controller API -->
+        <dependency>
+          <groupId>${pom.groupId}</groupId>
+          <artifactId>portlet-bridge-controller-api</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+
         <!-- JSF Portlet Bridge Impl -->
         <dependency>
           <groupId>${pom.groupId}</groupId>



Mime
View raw message