Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/******************************************************************************
* JBoss, a division of Red Hat *
* Copyright 2006, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
* *
* This is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation; either version 2.1 of *
* the License, or (at your option) any later version. *
* *
* This software is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this software; if not, write to the Free *
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
package org.jboss.portletbridge;
import java.io.IOException;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.application.FacesMessage;
import javax.faces.application.StateManager;
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.render.ResponseStateManager;
import javax.portlet.faces.Bridge;
import javax.portlet.faces.annotation.ExcludeFromManagedRequestScope;
import org.jboss.portletbridge.context.AbstractExternalContext;
import org.jboss.portletbridge.context.PortletBridgeContext;
/**
* That class keep all request attributes that requires to store between portlet requests.
* These parameters described by the chapter 5.1.2 "Managing Lifecycle State"
* TODO - synchronize access to state for concurrent AJAX requests.
* @author asmirnov
*/
/**
* @author asmirnov
*
*/
public class BridgeRequestScope implements Serializable {
private static final String EVAL_MAP_KEY = "com.sun.faces.el.CompositeComponentAttributesELResolver_EVAL_MAP";
/**
*
*/
private static final long serialVersionUID = 5630637804542426709L;
/**
* Array of classes that are not stored in the request scope. See PP5.1.2
*/
private static final Class>[] excludedClasses = {
javax.portlet.PortletConfig.class,
javax.portlet.PortletContext.class,
javax.portlet.PortletRequest.class,
javax.portlet.PortletResponse.class,
javax.portlet.PortletSession.class,
javax.portlet.PortletPreferences.class,
javax.portlet.PortalContext.class,
javax.faces.context.FacesContext.class,
javax.faces.context.ExternalContext.class,
javax.servlet.ServletConfig.class,
javax.servlet.ServletContext.class,
javax.servlet.ServletRequest.class,
javax.servlet.ServletResponse.class,
javax.servlet.http.HttpSession.class };
/**
* Names of request attributes that are not stored in the request scope.
*/
private static final String[] excludedRequestAttributes = { "ajaxContext",
"javax.servlet.", "javax.portlet.", "javax.faces.",
ResponseStateManager.VIEW_STATE_PARAM,
AbstractExternalContext.INITIAL_REQUEST_ATTRIBUTES_NAMES };
private static final String[] excludedRequestParameters = { "javax.faces.",
ResponseStateManager.VIEW_STATE_PARAM };
/**
* Saved {@link FacesMessage}
*/
private Map> messages = new HashMap>();
/**
* Request scope beans. That map saved by the {@code writeObject} method to
* avoid serialization exceptions.
*/
private transient Map beans = new HashMap();
/**
* Latest viewId
*/
private String viewId;
/**
* Request paremeters saved for consequentual render requests.
*/
private Map requestParameters = new HashMap(
4);
/**
* Namespace from the last render request or default portlet namespace.
*/
private String namespace;
/**
* Captured value of the {@link ResponseStateManager#VIEW_STATE_PARAM} to
* proper restore view state during consequentual render requests, as
* required bu PP 5.1.2
*/
private String viewStateParameter;
private String conversationIdParameter = "conversationId";
private String conversationId;
private transient Map