
pawl.util.Resources Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pawl-jbehave Show documentation
Show all versions of pawl-jbehave Show documentation
Test suite for performing integration tests.
The newest version!
/*
* Copyright 2014 Geeoz Software
*
* Licensed 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 pawl.util;
import com.google.common.collect.Maps;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Resources contain objects from different areas. When your program needs
* a resource, a String
for example, your program can load it
* from the system properties or specified resource bundle.
*
* When your program needs an object, it loads the Resources
* class using the {@link #get(String) get(String)}
* method:
*
*
* Resources resources = Resources.get("resources");
*
*
* or you can load default resources using the
* {@link #base() base} method:
*
*
* Resources resources = Resources.base();
*
*
*
* @author Alex Voloshyn
* @author Mike Dolinin
* @version 1.9 11/21/14
* @see ResourceBundle
*/
public final class Resources {
/**
* Logger for exceptions or info.
*/
private static final Logger LOG =
Logger.getLogger(Resources.class.getName());
/**
* Default base name for resource bundle.
*/
private static final String DEFAULT_BASE_NAME = "base";
/**
* System base name for resource bundle.
*/
private static final String SYSTEM_BASE_NAME = "base-default";
/**
* Specifies map to store test session data.
*/
private static final ThreadLocal
© 2015 - 2025 Weber Informatics LLC | Privacy Policy