📄 resourcebundleservicepropertyhandlerutil.java
字号:
page = commonBundle.getString("input.error.page.path");
} catch (MissingResourceException e) {
String message = null;
try {
message =
ResourceBundle
.getBundle("jp.co.intra_mart.framework.base.service.i18n")
.getString("ResourceBundleServicePropertyHandlerUtil.FailedToGetInputErrorPagePath");
} catch (MissingResourceException exc) {
}
throw new ServicePropertyException(message, e);
}
return page;
}
/**
* 慗堏愭偺儁乕僕偺僷僗傪庢摼偟傑偡丅
* 僒乕價僗偐傜慗堏愭偑堦堄偵寛傑傞応崌偵偙偺儊僜僢僪傪巊梡偟傑偡丅
*
* @param applicationBundle 傾僾儕働乕僔儑儞偺儕僜乕僗僶儞僪儖
* @param application 傾僾儕働乕僔儑儞ID
* @param service 僒乕價僗ID
* @return 慗堏愭偺儁乕僕偺僷僗
* @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
*/
public static String getNextPagePath(
ResourceBundle applicationBundle,
String application,
String service)
throws ServicePropertyException {
String page;
try {
page = applicationBundle.getString("nextpage.path." + service);
} catch (MissingResourceException e) {
String message = null;
try {
message =
ResourceBundle
.getBundle("jp.co.intra_mart.framework.base.service.i18n")
.getString("ResourceBundleServicePropertyHandlerUtil.FailedToGetNextPagePath");
} catch (MissingResourceException ex) {
}
throw new ServicePropertyException(
message
+ " : application = "
+ application
+ ", service = "
+ service,
e);
}
return page;
}
/**
* 慗堏愭偺儁乕僕偺僷僗傪庢摼偟傑偡丅
* 僒乕價僗偐傜慗堏愭偑堦堄偵寛傑傜側偄応崌偵偙偺儊僜僢僪傪巊梡偟傑偡丅<CODE>key<CODE>偑<CODE>null<CODE>偺応崌丄{@link #getNextPagePath(String, String)}偲摨偠摦嶌偵側傝傑偡丅
*
* @param applicationBundle 傾僾儕働乕僔儑儞偺儕僜乕僗僶儞僪儖
* @param application 傾僾儕働乕僔儑儞ID
* @param service 僒乕價僗ID
* @param key 慗堏愭偺僉乕
* @return 慗堏愭偺儁乕僕偺僷僗
* @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
*/
public static String getNextPagePath(
ResourceBundle applicationBundle,
String application,
String service,
String key)
throws ServicePropertyException {
String page;
try {
page =
applicationBundle.getString(
"nextpage.path." + service + "." + key);
} catch (MissingResourceException e) {
String message = null;
try {
message =
ResourceBundle
.getBundle("jp.co.intra_mart.framework.base.service.i18n")
.getString("ResourceBundleServicePropertyHandlerUtil.FailedToGetNextPagePath");
} catch (MissingResourceException ex) {
}
throw new ServicePropertyException(
message
+ " : application = "
+ application
+ ", service = "
+ service
+ ", key = "
+ key,
e);
}
return page;
}
/**
* 僒乕價僗僐儞僩儘乕儔偺僋儔僗柤傪庢摼偟傑偡丅
* 奩摉偡傞僒乕價僗僐儞僩儘乕儔偑懚嵼偟側偄応崌丄null傪曉偟傑偡丅
*
* @param applicationBundle 傾僾儕働乕僔儑儞偺儕僜乕僗僶儞僪儖
* @param application 傾僾儕働乕僔儑儞ID
* @param service 僒乕價僗ID
* @return 僒乕價僗僐儞僩儘乕儔偺僋儔僗柤丄懚嵼偟側偄応崌偼null
* @throws ServicePropertyException 僒乕價僗僐儞僩儘乕儔偺僋儔僗柤偺庢摼帪偵椺奜偑敪惗
*/
public static String getServiceControllerName(
ResourceBundle applicationBundle,
String application,
String service)
throws ServicePropertyException {
String controller;
try {
controller =
applicationBundle.getString("controller.class." + service);
} catch (MissingResourceException e) {
controller = null;
}
return controller;
}
/**
* 張棟椺奜帪偺儁乕僕偺僷僗傪庢摼偟傑偡丅
*
* @param commonBundle 嫟捠偺儕僜乕僗僶儞僪儖
* @param applicationBundle 傾僾儕働乕僔儑儞偺儕僜乕僗僶儞僪儖
* @param application 傾僾儕働乕僔儑儞ID
* @param service 僒乕價僗ID
* @param key 慗堏愭偺僉乕
* @return 慗堏愭偺儁乕僕偺僷僗
* @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
*/
public static String getServiceErrorPagePath(
ResourceBundle commonBundle,
ResourceBundle applicationBundle,
String application,
String service,
String key)
throws ServicePropertyException {
String page = null;
try {
page =
applicationBundle.getString(
"service.error.page.path." + service + "." + key);
} catch (MissingResourceException e) {
try {
page =
getServiceErrorPagePath(
commonBundle,
applicationBundle,
application,
service);
} catch (ServicePropertyException ex) {
String message = null;
try {
message =
ResourceBundle
.getBundle("jp.co.intra_mart.framework.base.service.i18n")
.getString("ResourceBundleServicePropertyHandlerUtil.FailedToGetServiceErrorPagePath");
} catch (MissingResourceException exc) {
}
throw new ServicePropertyException(
message
+ " : application = "
+ application
+ ", service = "
+ service
+ ", key = "
+ key,
e);
}
}
return page;
}
/**
* 張棟椺奜帪偺儁乕僕偺僷僗傪庢摼偟傑偡丅
* 奩摉偡傞儁乕僕偺僷僗偑庢摼偱偒側偄応崌丄{@link #getServiceErrorPagePath(String)}偱庢摼偝傟傞儁乕僕傪曉偟傑偡丅
*
* @param commonBundle 嫟捠偺儕僜乕僗僶儞僪儖
* @param applicationBundle 傾僾儕働乕僔儑儞偺儕僜乕僗僶儞僪儖
* @param application 傾僾儕働乕僔儑儞ID
* @param service 僒乕價僗ID
* @return 慗堏愭偺儁乕僕偺僷僗
* @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
*/
public static String getServiceErrorPagePath(
ResourceBundle commonBundle,
ResourceBundle applicationBundle,
String application,
String service)
throws ServicePropertyException {
String page;
try {
page =
applicationBundle.getString(
"service.error.page.path." + service);
} catch (MissingResourceException e) {
try {
page =
getServiceErrorPagePath(
commonBundle,
applicationBundle,
application);
} catch (ServicePropertyException ex) {
String message = null;
try {
message =
ResourceBundle
.getBundle("jp.co.intra_mart.framework.base.service.i18n")
.getString("ResourceBundleServicePropertyHandlerUtil.FailedToGetServiceErrorPagePath");
} catch (MissingResourceException exc) {
}
throw new ServicePropertyException(
message
+ " : application = "
+ application
+ ", service = "
+ service,
e);
}
}
return page;
}
/**
* 張棟椺奜帪偺儁乕僕偺僷僗傪庢摼偟傑偡丅
* 奩摉偡傞儁乕僕偺僷僗偑庢摼偱偒側偄応崌丄{@link #getServiceErrorPagePath()}偱庢摼偝傟傞儁乕僕傪曉偟傑偡丅
*
* @param commonBundle 嫟捠偺儕僜乕僗僶儞僪儖
* @param applicationBundle 傾僾儕働乕僔儑儞偺儕僜乕僗僶儞僪儖
* @param application 傾僾儕働乕僔儑儞ID
* @return 慗堏愭偺儁乕僕偺僷僗
* @throws ServicePropertyException 慗堏愭偺儁乕僕偺僷僗偺庢摼帪偵椺奜偑敪惗
*/
public static String getServiceErrorPagePath(
ResourceBundle commonBundle,
ResourceBundle applicationBundle,
String application)
throws ServicePropertyException {
String page = null;
try {
page = applicationBundle.getString("service.error.page.path");
} catch (MissingResourceException e) {
try {
page = getServiceErrorPagePath(commonBundle);
} catch (ServicePropertyException ex) {
String message = null;
try {
message =
ResourceBundle
.getBundle("jp.co.intra_mart.framework.base.service.i18n")
.getString("ResourceBundleServicePropertyHandlerUtil.FailedToGetServiceErrorPagePath");
} catch (MissingResourceException exc) {
}
throw new ServicePropertyException(
message + " : application = " + application,
e);
}
}
return page;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -