001    // Copyright 2004, 2005 The Apache Software Foundation
002    //
003    // Licensed under the Apache License, Version 2.0 (the "License");
004    // you may not use this file except in compliance with the License.
005    // You may obtain a copy of the License at
006    //
007    //     http://www.apache.org/licenses/LICENSE-2.0
008    //
009    // Unless required by applicable law or agreed to in writing, software
010    // distributed under the License is distributed on an "AS IS" BASIS,
011    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012    // See the License for the specific language governing permissions and
013    // limitations under the License.
014    
015    package org.apache.hivemind.util;
016    
017    import java.util.Locale;
018    
019    /**
020     *  Contains the path to a localized resource and the locale for which it has been localized.
021     *  This object is immutable.
022     * 
023     *  @author Mindbridge
024     */
025    public class LocalizedResource
026    {
027        private String _resourcePath;
028        private Locale _resourceLocale;
029    
030    
031        public LocalizedResource(String resourcePath, Locale resourceLocale)
032        {
033            _resourcePath = resourcePath;
034            _resourceLocale = resourceLocale;
035        }
036        
037        /**
038         * @return the locale for which this resource has been localized or null if it has not been localized at all
039         */
040        public Locale getResourceLocale()
041        {
042            return _resourceLocale;
043        }
044    
045        /**
046         * @return the path to the localized resource
047         */
048        public String getResourcePath()
049        {
050            return _resourcePath;
051        }
052    
053    }