|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjp.mosp.common.common.MospUtility
public final class MospUtility
MosPアプリケーションを開発する上で有用なメソッドを提供する。
| コンストラクタの概要 | |
|---|---|
MospUtility()
|
|
| メソッドの概要 | |
|---|---|
static Date |
addDay(Date date,
int amount)
日操作。 |
static Date |
addMonth(Date date,
int amount)
月操作。 |
static void |
addResources(Properties pr,
String path,
String target)
設定ファイル読込処理(追加)。 |
static Date |
addYear(Date date,
int amount)
年操作。 |
static void |
convProperties(Properties ppt,
String path,
String name)
設定ファイル→JavaScriptファイル変換。 |
static String |
encrypt(String value,
boolean hasMospSeJar)
暗号化(mosp-se.jar利用)。 |
static String |
generateProcSeq(boolean hasMospSeJar,
String stored)
処理シーケンス発行。 |
static int |
getAspFlag(Properties cfg)
ASP設定取得取得。 |
static int |
getCalendarValue(Date date,
int field)
カレンダーによるデータ取得。 |
static Date |
getDate(String strDate)
日付取得。 |
static String |
getDateString(Date date,
String format)
日付文字列取得。 |
static int |
getDay(Date date)
日取得。 |
static String |
getDigest(String value)
暗号化(複合不可)。 |
static int |
getHour(Date date)
時間取得。 |
static Object |
getInstance(Properties ctl,
String key)
クラスインスタンス取得。 |
static Object |
getInstance(String className)
クラスインスタンス取得。 |
static String |
getMessage(Properties msg,
String msgCode,
String rep)
メッセージ取得。 |
static int |
getMinute(Date date)
分取得。 |
static int |
getMonth(Date date)
月取得。 |
static String |
getMospJarVersion()
mosp.jarバージョン取得。 |
static Properties |
getResource(String path)
設定ファイル読込処理。 |
static String |
getStackTrace(Throwable ex)
例外スタックトレースを取得する。 |
static Date |
getSystemDate()
システム日付取得。 |
static int |
getYear(Date date)
年取得。 |
static String |
replace(String message,
String rep)
メッセージの文字列置換を行う。 |
static double |
round(double value,
int scale,
int mode)
丸め処理(四捨五入等)。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public MospUtility()
| メソッドの詳細 |
|---|
public static String getMospJarVersion()
public static Object getInstance(Properties ctl,
String key)
throws IllegalAccessException,
InstantiationException,
MospException
ctl - 設定ファイルkey - 設定ファイルに登録されているキー
IllegalAccessException
InstantiationException
MosPException
MospException
public static Object getInstance(String className)
throws IllegalAccessException,
InstantiationException,
MospException
className - クラス名
IllegalAccessException
InstantiationException
MosPException
MospException
public static Properties getResource(String path)
throws IOException
path - 設定ファイルパス(絶対パス)
IOException
public static void addResources(Properties pr,
String path,
String target)
throws IOException
pr - 追加対象プロパティオブジェクトpath - 設定ファイルルートパス(絶対パス)target - 対象文字列
IOException
public static String getMessage(Properties msg,
String msgCode,
String rep)
throws MospException
msg - メッセージ一覧msgCode - メッセージコードrep - 置換文字列(複数ある場合はカンマ区切り)
MospException
public static String replace(String message,
String rep)
message - 文字列rep - 置換文字列(複数ある場合はカンマ区切り)
MospException
public static String generateProcSeq(boolean hasMospSeJar,
String stored)
hasMospSeJar - mosp-se.jar有無stored - 保存されているProcSeq
public static String getDigest(String value)
throws NoSuchAlgorithmException
value - 対象文字列
NoSuchAlgorithmException
public static String encrypt(String value,
boolean hasMospSeJar)
throws NoSuchAlgorithmException
value - 対象文字列hasMospSeJar - mosp-se.jar有無
NoSuchAlgorithmException
public static void convProperties(Properties ppt,
String path,
String name)
throws FileNotFoundException,
UnsupportedEncodingException,
IOException
ppt - 設定ファイルpath - 出力ファイルパスname - オブジェクト名
FileNotFoundException
UnsupportedEncodingException
IOException
public static Date getDate(String strDate)
throws MospException
strDate - 日付文字列
MospExceptionpublic static String getStackTrace(Throwable ex)
ex - 例外オブジェクト
public static int getAspFlag(Properties cfg)
throws MospException
cfg - 設定ファイル
MospException
public static String getDateString(Date date,
String format)
date - 時間format - 時間
public static int getYear(Date date)
date - 日付public static int getMonth(Date date)
date - 日付public static int getDay(Date date)
date - 日付public static int getHour(Date date)
date - 日付public static int getMinute(Date date)
date - 日付
public static int getCalendarValue(Date date,
int field)
date - 日付field - フィールド
public static Date addYear(Date date,
int amount)
date - 操作日付amount - 増減年数
public static Date addMonth(Date date,
int amount)
date - 操作日付amount - 増減月数
public static Date addDay(Date date,
int amount)
date - 操作日付amount - 増減日数
public static Date getSystemDate()
public static double round(double value,
int scale,
int mode)
value - 対象値scale - 対象位置(少数点以下:0で整数)mode - 方法
Exception
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||