001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
003     * agreements. See the NOTICE file distributed with this work for additional information regarding
004     * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
005     * "License"); you may not use this file except in compliance with the License. You may obtain a
006     * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
007     * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
008     * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
009     * for the specific language governing permissions and limitations under the License.
010     */
011    package javax.portlet.faces;
012    
013    import javax.faces.context.FacesContext;
014    import javax.portlet.Event;
015    
016    
017     /**
018      * The <code>BridgePublicRenderParameterHandler</code> interface defines the class the bridge relies
019      * on to post process portlet public render parameters.  The handler provides the
020      * portlet a means for resynching application state following any model updates
021      * that resulted from the bridge pushing changed public render parameter values
022      * based on declarative mappings.  After the bridge pushes such values the bridge
023      * calls the handler if it has been configured during bridge <code>init()</code>.
024      * Though the FacesContext has been acquired before the portlet is called to 
025      * process these updates, the Lifecycle has not been acquired or run.  Because
026      * of this is is no current active view.  Unlike events, one can't navigate 
027      * based on a public render parameter change.
028      */
029    
030    public interface BridgePublicRenderParameterHandler
031    {
032      /**
033       * Called by the bridge after pushing incoming public render parameter
034       * values into mapped managed beans.  Only called if there is at least
035       * one public render parameter in the incoming request whose value is 
036       * different (updates) the underlying bean.  This give the portlet an
037       * opportunity to perform further computations based on these changes to 
038       * resynchronize its application state.  
039       * 
040       * @param context
041       *          current FacesContext. A Lifecycle has been acquired and the current view restored.
042       */
043      public void processUpdates(FacesContext context);
044    }