org.apache.shale.tiger.config.FacesConfigConfig Maven / Gradle / Ivy
The newest version!
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shale.tiger.config;
import java.util.HashMap;
import java.util.Map;
import org.apache.shale.tiger.managed.config.ManagedBeanConfig;
/**
* Configuration bean representing the entire contents of zero or more
* faces-config.xml
resources.
*/
public class FacesConfigConfig {
/** Creates a new instance of FacesConfigConfig. */
public FacesConfigConfig() {
}
/**
* Map of {@link ManagedBeanConfig} elements for all defined
* managed bean configurations, keyed by managed bean name.
*/
private Map managedBeans =
new HashMap();
/**
* Add a new managed bean configuration element.
*
* @param config {@link ManagedBeanConfig} element to be added
*/
public void addManagedBean(ManagedBeanConfig config) {
this.managedBeans.put(config.getName(), config);
}
/**
* Return the {@link ManagedBeanConfig} element for the specified
* managed bean name, if any; otherwise, return null
.
*
* @param name Name of the managed bean configuration to return
*/
public ManagedBeanConfig getManagedBean(String name) {
return this.managedBeans.get(name);
}
/**
* Return a map of defined {@link ManagedBeanConfig} elements,
* keyed by managed bean name.
*/
public Map getManagedBeans() {
return this.managedBeans;
}
}