2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

Coverage Report - org.apache.shale.tiger.config.FacesConfigConfig
 
Classes in this File Line Coverage Branch Coverage Complexity
FacesConfigConfig
100%
7/7
N/A
0
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to you under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 
 18  
 package org.apache.shale.tiger.config;
 19  
 
 20  
 import java.util.HashMap;
 21  
 import java.util.Map;
 22  
 import org.apache.shale.tiger.managed.config.ManagedBeanConfig;
 23  
 
 24  
 /**
 25  
  * <p>Configuration bean representing the entire contents of zero or more
 26  
  * <code>faces-config.xml</code> resources.</p>
 27  
  */
 28  
 public class FacesConfigConfig {
 29  
 
 30  
     /** Creates a new instance of FacesConfigConfig. */
 31  22
     public FacesConfigConfig() {
 32  22
     }
 33  
 
 34  
 
 35  
     /**
 36  
      * <p>Map of {@link ManagedBeanConfig} elements for all defined
 37  
      * managed bean configurations, keyed by managed bean name.</p>
 38  
      */
 39  22
     private Map<String,ManagedBeanConfig> managedBeans =
 40  
             new HashMap<String,ManagedBeanConfig>();
 41  
 
 42  
 
 43  
     /**
 44  
      * <p>Add a new managed bean configuration element.</p>
 45  
      *
 46  
      * @param config {@link ManagedBeanConfig} element to be added
 47  
      */
 48  
     public void addManagedBean(ManagedBeanConfig config) {
 49  180
         this.managedBeans.put(config.getName(), config);
 50  180
     }
 51  
 
 52  
 
 53  
     /**
 54  
      * <p>Return the {@link ManagedBeanConfig} element for the specified
 55  
      * managed bean name, if any; otherwise, return <code>null</code>.</p>
 56  
      *
 57  
      * @param name Name of the managed bean configuration to return
 58  
      */
 59  
     public ManagedBeanConfig getManagedBean(String name) {
 60  218
         return this.managedBeans.get(name);
 61  
     }
 62  
 
 63  
 
 64  
     /**
 65  
      * <p>Return a map of defined {@link ManagedBeanConfig} elements,
 66  
      * keyed by managed bean name.</p>
 67  
      */
 68  
     public Map<String,ManagedBeanConfig> getManagedBeans() {
 69  9
         return this.managedBeans;
 70  
     }
 71  
 
 72  
 
 73  
 }