Coverage Report - javax.faces.internal.scope.PageScope
 
Classes in this File Line Coverage Branch Coverage Complexity
PageScope
50%
5/10
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.internal.scope;
 17  
 
 18  
 import java.util.Map;
 19  
 
 20  
 import javax.faces.FacesException;
 21  
 import javax.faces.context.FacesContext;
 22  
 
 23  
 /**
 24  
  * @author higa
 25  
  * @author shot
 26  
  */
 27  
 public abstract class PageScope {
 28  
 
 29  1
     private static final VariableScope scope = new VariableScope(
 30  1
             PageScope.class.getName());
 31  
 
 32  0
     protected PageScope() {
 33  0
     }
 34  
 
 35  
     public static Map getOrCreateContext(FacesContext context)
 36  
             throws FacesException {
 37  2
         return scope.getOrCreateContext(context);
 38  
     }
 39  
 
 40  
     public static Map getContext(FacesContext context) throws FacesException {
 41  0
         return scope.getContext(context);
 42  
     }
 43  
 
 44  
     public static void removeContext(FacesContext context)
 45  
             throws FacesException {
 46  0
         scope.clearContext(context);
 47  0
     }
 48  
 
 49  
     public static void removeContext(FacesContext context, String wid)
 50  
             throws FacesException {
 51  1
         scope.clearContext(context, wid);
 52  1
     }
 53  
 }