jp.terasoluna.fw.ex.unit.util
クラス TerasolunaPropertyUtils

java.lang.Object
  上位を拡張 jp.terasoluna.fw.ex.unit.util.TerasolunaPropertyUtils

public final class TerasolunaPropertyUtils
extends Object

TERASOLUNAが提供するPropertyUtilの内部に保持されているプロパティを直接操作するためのユーティリティです。

 TerasolunaPropertyUtils.saveProperties(); // PropertyUtilの内部に保持されているプロパティを保存
 TerasolunaPropertyUtils.addProperty("property.key", "変更後の値");
 xxx.execute(); // 試験実行 (property.key対するプロパティ値を使用する)
 TerasolunaPropertyUtils.restoreProperties(); // PropertyUtilの内部に保持されていたプロパティを復元
 


フィールドの概要
protected static Map<String,String> savedMap
          プロパティマップの保存先マップ。
 
コンストラクタの概要
TerasolunaPropertyUtils()
           
 
メソッドの概要
static void addProperties(Map<String,String> properties)
          PropertyUtilの内部に保持されているプロパティマップにプロパティを追加します。
static void addProperty(String key, String value)
          PropertyUtilの内部に保持されているプロパティマップにプロパティを追加します。
static void clearProperties()
          PropertyUtilの内部に保持されているプロパティマップを空にします。
static Map<String,String> getPropertiesMap()
          PropertyUtilの内部に保持されているプロパティマップを返却します。
static void removeProperty(String key)
          PropertyUtilの内部に保持されているプロパティマップからプロパティを削除します。
static void restoreProperties()
          保存されているプロパティマップPropertyUtilの内部に保持されているプロパティマップに戻します。
static void saveProperties()
          PropertyUtilの内部に保持されているプロパティマップを保存します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

savedMap

protected static final Map<String,String> savedMap
プロパティマップの保存先マップ。

コンストラクタの詳細

TerasolunaPropertyUtils

public TerasolunaPropertyUtils()
メソッドの詳細

getPropertiesMap

public static Map<String,String> getPropertiesMap()
PropertyUtilの内部に保持されているプロパティマップを返却します。

戻り値:
プロパティマップ

addProperty

public static void addProperty(String key,
                               String value)
PropertyUtilの内部に保持されているプロパティマップにプロパティを追加します。

パラメータ:
key - 追加するプロパティのキー。
value - 追加するプロパティの値。

addProperties

public static void addProperties(Map<String,String> properties)
PropertyUtilの内部に保持されているプロパティマップにプロパティを追加します。

パラメータ:
properties - 追加するプロパティのマップ。

removeProperty

public static void removeProperty(String key)
PropertyUtilの内部に保持されているプロパティマップからプロパティを削除します。

パラメータ:
key - 削除するプロパティのキー。

clearProperties

public static void clearProperties()
PropertyUtilの内部に保持されているプロパティマップを空にします。


saveProperties

public static void saveProperties()
PropertyUtilの内部に保持されているプロパティマップを保存します。


restoreProperties

public static void restoreProperties()
保存されているプロパティマップPropertyUtilの内部に保持されているプロパティマップに戻します。



Copyright © 2011. All Rights Reserved.