Coverage Report - javax.faces.context.FacesContext
 
Classes in this File Line Coverage Branch Coverage Complexity
FacesContext
100%
5/5
N/A
1
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package javax.faces.context;
 17  
 
 18  
 import java.util.Iterator;
 19  
 
 20  
 import javax.faces.application.FacesMessage;
 21  
 import javax.faces.component.UIViewRoot;
 22  
 import javax.faces.render.RenderKit;
 23  
 
 24  
 /**
 25  
  * @author shot
 26  
  */
 27  7090
 public abstract class FacesContext {
 28  
 
 29  1
     private static ThreadLocal threadLocal = new ThreadLocal();
 30  
 
 31  
     public abstract javax.faces.application.Application getApplication();
 32  
 
 33  
     public abstract Iterator getClientIdsWithMessages();
 34  
 
 35  
     public abstract ExternalContext getExternalContext();
 36  
 
 37  
     public abstract FacesMessage.Severity getMaximumSeverity();
 38  
 
 39  
     public abstract Iterator getMessages();
 40  
 
 41  
     public abstract Iterator getMessages(String clientId);
 42  
 
 43  
     public abstract RenderKit getRenderKit();
 44  
 
 45  
     public abstract boolean getRenderResponse();
 46  
 
 47  
     public abstract boolean getResponseComplete();
 48  
 
 49  
     public abstract ResponseStream getResponseStream();
 50  
 
 51  
     public abstract void setResponseStream(ResponseStream responseStream);
 52  
 
 53  
     public abstract ResponseWriter getResponseWriter();
 54  
 
 55  
     public abstract void setResponseWriter(
 56  
             javax.faces.context.ResponseWriter responseWriter);
 57  
 
 58  
     public abstract UIViewRoot getViewRoot();
 59  
 
 60  
     public abstract void setViewRoot(UIViewRoot root);
 61  
 
 62  
     public abstract void addMessage(String clientId,
 63  
             javax.faces.application.FacesMessage message);
 64  
 
 65  
     public abstract void release();
 66  
 
 67  
     public abstract void renderResponse();
 68  
 
 69  
     public abstract void responseComplete();
 70  
 
 71  
     public static FacesContext getCurrentInstance() {
 72  1642
         return (FacesContext) threadLocal.get();
 73  
     }
 74  
 
 75  
     protected static void setCurrentInstance(
 76  
             javax.faces.context.FacesContext context) {
 77  13397
         threadLocal.set(context);
 78  13397
     }
 79  
 
 80  
 }