br.gov.frameworkdemoiselle.internal.proxy.FacesContextProxy Maven / Gradle / Ivy
package br.gov.frameworkdemoiselle.internal.proxy;
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.PostConstruct;
import javax.el.ELContext;
import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.inject.Default;
import javax.faces.application.Application;
import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity;
import javax.faces.application.ProjectStage;
import javax.faces.component.UIViewRoot;
import javax.faces.context.ExceptionHandler;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.context.PartialViewContext;
import javax.faces.context.ResponseStream;
import javax.faces.context.ResponseWriter;
import javax.faces.event.PhaseId;
import javax.faces.render.RenderKit;
@Default
public class FacesContextProxy extends FacesContext implements Serializable {
private static final long serialVersionUID = 1L;
@PostConstruct
public FacesContext getDelegate() {
FacesContext facesContext = FacesContext.getCurrentInstance();
if (facesContext == null) {
// TODO Colocar a mensagem correta
throw new ContextNotActiveException();
}
return facesContext;
}
public int hashCode() {
return getDelegate().hashCode();
}
public boolean equals(Object obj) {
return getDelegate().equals(obj);
}
public Application getApplication() {
return getDelegate().getApplication();
}
public Map