Coverage Report - javax.faces.component.visit.VisitContext
 
Classes in this File Line Coverage Branch Coverage Complexity
VisitContext
0%
0/7
N/A
0
VisitContext$1
N/A
N/A
0
VisitContext$AllIdsCollection
0%
0/14
N/A
0
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one
 3  
  * or more contributor license agreements.  See the NOTICE file
 4  
  * distributed with this work for additional information
 5  
  * regarding copyright ownership.  The ASF licenses this file
 6  
  * to you under the Apache License, Version 2.0 (the
 7  
  * "License"); you may not use this file except in compliance
 8  
  * with the License.  You may obtain a copy of the License at
 9  
  *
 10  
  *   http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing,
 13  
  * software distributed under the License is distributed on an
 14  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15  
  * KIND, either express or implied.  See the License for the
 16  
  * specific language governing permissions and limitations
 17  
  * under the License.
 18  
  */
 19  
 package javax.faces.component.visit;
 20  
 
 21  
 import java.io.Serializable;
 22  
 import java.util.Collection;
 23  
 import java.util.Iterator;
 24  
 import java.util.Set;
 25  
 
 26  
 import javax.faces.FactoryFinder;
 27  
 import javax.faces.component.UIComponent;
 28  
 import javax.faces.context.FacesContext;
 29  
 
 30  
 /**
 31  
  * @author Simon Lessard (latest modification by $Author: slessard $)
 32  
  * @version $Revision: 696523 $ $Date: 2009-03-14 16:42:48 -0400 (mer., 17 sept. 2008) $
 33  
  * 
 34  
  * @since 2.0
 35  
  */
 36  0
 public abstract class VisitContext
 37  
 {
 38  0
     public static final Collection<String> ALL_IDS = new AllIdsCollection();
 39  
 
 40  
     public static VisitContext createVisitContext(FacesContext context)
 41  
     {
 42  0
         VisitContextFactory factory = (VisitContextFactory) FactoryFinder.getFactory(FactoryFinder.VISIT_CONTEXT_FACTORY);
 43  0
         return factory.getVisitContext(context, null, null);
 44  
     }
 45  
 
 46  
     public static VisitContext createVisitContext(FacesContext context, Collection<String> ids, Set<VisitHint> hints)
 47  
     {
 48  0
         VisitContextFactory factory = (VisitContextFactory) FactoryFinder.getFactory(FactoryFinder.VISIT_CONTEXT_FACTORY);
 49  0
         return factory.getVisitContext(context, ids, hints);
 50  
     }
 51  
 
 52  
     public abstract FacesContext getFacesContext();
 53  
 
 54  
     public abstract Set<VisitHint> getHints();
 55  
 
 56  
     public abstract Collection<String> getIdsToVisit();
 57  
 
 58  
     public abstract Collection<String> getSubtreeIdsToVisit(UIComponent component);
 59  
 
 60  
     public abstract VisitResult invokeVisitCallback(UIComponent component, VisitCallback callback);
 61  
 
 62  0
     private static class AllIdsCollection implements Collection<String>, Serializable
 63  
     {
 64  
         public boolean add(String e)
 65  
         {
 66  0
             throw new UnsupportedOperationException();
 67  
         }
 68  
 
 69  
         public boolean addAll(Collection<? extends String> c)
 70  
         {
 71  0
             throw new UnsupportedOperationException();
 72  
         }
 73  
 
 74  
         public void clear()
 75  
         {
 76  0
             throw new UnsupportedOperationException();
 77  
         }
 78  
 
 79  
         public boolean contains(Object o)
 80  
         {
 81  0
             throw new UnsupportedOperationException();
 82  
         }
 83  
 
 84  
         public boolean containsAll(Collection<?> c)
 85  
         {
 86  0
             throw new UnsupportedOperationException();
 87  
         }
 88  
 
 89  
         public boolean isEmpty()
 90  
         {
 91  0
             return false;
 92  
         }
 93  
 
 94  
         public Iterator<String> iterator()
 95  
         {
 96  0
             throw new UnsupportedOperationException();
 97  
         }
 98  
 
 99  
         public boolean remove(Object o)
 100  
         {
 101  0
             throw new UnsupportedOperationException();
 102  
         }
 103  
 
 104  
         public boolean removeAll(Collection<?> c)
 105  
         {
 106  0
             throw new UnsupportedOperationException();
 107  
         }
 108  
 
 109  
         public boolean retainAll(Collection<?> c)
 110  
         {
 111  0
             throw new UnsupportedOperationException();
 112  
         }
 113  
 
 114  
         public int size()
 115  
         {
 116  0
             throw new UnsupportedOperationException();
 117  
         }
 118  
 
 119  
         public Object[] toArray()
 120  
         {
 121  0
             throw new UnsupportedOperationException();
 122  
         }
 123  
 
 124  
         public <T> T[] toArray(T[] a)
 125  
         {
 126  0
             throw new UnsupportedOperationException();
 127  
         }
 128  
     }
 129  
 }