Coverage Report - org.seasar.teeda.core.config.faces.element.impl.LocaleConfigElementImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
LocaleConfigElementImpl
100%
10/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 org.seasar.teeda.core.config.faces.element.impl;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.List;
 20  
 import java.util.Locale;
 21  
 
 22  
 import org.seasar.framework.util.LocaleUtil;
 23  
 import org.seasar.teeda.core.config.faces.element.LocaleConfigElement;
 24  
 
 25  
 /**
 26  
  * @author shot
 27  
  */
 28  
 public class LocaleConfigElementImpl implements LocaleConfigElement {
 29  
 
 30  
     private Locale defaultLocale_;
 31  
 
 32  
     private List supportedLocales_;
 33  
 
 34  7
     public LocaleConfigElementImpl() {
 35  7
         supportedLocales_ = new ArrayList();
 36  7
     }
 37  
 
 38  
     public void setDefaultLocale(String defaultLocaleName) {
 39  6
         defaultLocale_ = LocaleUtil.getLocale(defaultLocaleName);
 40  6
     }
 41  
 
 42  
     public Locale getDefaultLocale() {
 43  6
         return defaultLocale_;
 44  
     }
 45  
 
 46  
     public void addSupportedLocale(String supportedLocaleName) {
 47  9
         Locale locale = LocaleUtil.getLocale(supportedLocaleName);
 48  9
         supportedLocales_.add(locale);
 49  9
     }
 50  
 
 51  
     public List getSupportedLocales() {
 52  6
         return supportedLocales_;
 53  
     }
 54  
 
 55  
 }