use of java.util.ResourceBundle in project kotlin by JetBrains.
the class KotlinRefactoringBundle method getBundle.
private static ResourceBundle getBundle() {
ResourceBundle bundle = null;
if (ourBundle != null)
bundle = ourBundle.get();
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<ResourceBundle>(bundle);
}
return bundle;
}
use of java.util.ResourceBundle in project Asqatasun by Asqatasun.
the class ElementColumnBuilderImpl method getElementColumn.
@Override
public AbstractColumn getElementColumn(Locale locale) {
ColumnBuilder columnBuilder = ColumnBuilder.getNew();
columnBuilder.setWidth(columnWidth);
if (propertyName != null && valueClassName != null) {
columnBuilder.setColumnProperty(propertyName, valueClassName);
}
if (customExpressionBuilder != null) {
columnBuilder.setCustomExpression(customExpressionBuilder.build(locale));
}
if (style != null) {
columnBuilder.setStyle(style);
}
if (headerStyle != null) {
columnBuilder.setHeaderStyle(headerStyle);
}
if (columnTitleBundleName != null) {
ResourceBundle bundle = ResourceBundle.getBundle(columnTitleBundleName, locale);
if (columnTitleKey != null) {
columnBuilder.setTitle(StringEscapeUtils.unescapeHtml4(bundle.getString(columnTitleKey)));
}
}
if (conditionalStyleBuilderList != null && !conditionalStyleBuilderList.isEmpty()) {
columnBuilder.addConditionalStyles(buildConditionStyleList(locale));
}
AbstractColumn elementColumn = null;
try {
elementColumn = columnBuilder.build();
} catch (ColumnBuilderException ex) {
LOGGER.error(ex);
}
return elementColumn;
}
use of java.util.ResourceBundle in project Asqatasun by Asqatasun.
the class PageListWrapper method getUrlWithPageResultLinkAndExternalLink.
/**
* Decoration of the displayed raw mark to add the appropriate grade css
* class.
*
* @return
*/
public String getUrlWithPageResultLinkAndExternalLink() {
Object lObject = this.getCurrentRowObject();
ResourceBundle resourceBundle = getResourceBundle(this.getPageContext().getRequest());
PageResult pageResult = null;
if (lObject instanceof PageResult) {
pageResult = ((PageResult) lObject);
}
StringBuilder strb = new StringBuilder();
strb.append(buildExternalLinkUrl(pageResult != null ? pageResult.getUrl() : null, resourceBundle));
strb.append(getUrlLink(pageResult, resourceBundle));
return strb.toString();
}
use of java.util.ResourceBundle in project Asqatasun by Asqatasun.
the class SiteKrashTest method initialize.
/**
*
*/
private void initialize() {
// These parameters has to passed as JVM argument
System.out.println(contractId);
contractIds = Arrays.asList(contractId.split("-"));
ResourceBundle bundle = ResourceBundle.getBundle(BUNDLE_NAME);
formUrl = hostLocation + bundle.getString(FORM_URL_KEY);
}
use of java.util.ResourceBundle in project Asqatasun by Asqatasun.
the class AbstractWebDriverTestClass method initialize.
/**
*
*/
private void initialize() {
// Mysql access parameters are passed as JVM argument
// dbUrl = System.getProperty(DB_URL_KEY);
// dbName = System.getProperty(DB_NAME_KEY);
// dbUser = System.getProperty(DB_USER_KEY);
// dbPassword = System.getProperty(DB_PASSWORD_KEY);
// initDb();
// These parameters has to passed as JVM argument
user = System.getProperty(USER_KEY);
password = System.getProperty(PASSWORD_KEY);
hostLocation = System.getProperty(HOST_LOCATION_KEY);
xvfbDisplay = System.getProperty(XVFB_DISPLAY_KEY);
pathToFirefox = System.getProperty(FIREFOX_PATH_KEY);
// createRootUserInDb();
ResourceBundle parametersBundle = ResourceBundle.getBundle(BUNDLE_NAME);
userFieldName = parametersBundle.getString(USER_FIELD_NAME_KEY);
passwordFieldName = parametersBundle.getString(PASSWORD_FIELD_NAME_KEY);
loginUrl = hostLocation + parametersBundle.getString(LOGIN_URL_KEY);
logoutUrl = hostLocation + parametersBundle.getString(LOGOUT_URL_KEY);
adminUrl = hostLocation + parametersBundle.getString(ADMIN_URL_KEY);
addUserUrl = hostLocation + parametersBundle.getString(ADD_USER_URL_KEY);
editUserUrl = hostLocation + parametersBundle.getString(EDIT_USER_URL_KEY);
deleteUserUrl = hostLocation + parametersBundle.getString(DELETE_USER_URL_KEY);
addContractUrl = hostLocation + parametersBundle.getString(ADD_CONTRACT_URL_KEY);
contractUrl = hostLocation + parametersBundle.getString(CONTRACT_URL_KEY);
auditPagesSetupUrl = hostLocation + parametersBundle.getString(AUDIT_PAGES_URL_KEY);
auditSiteSetupUrl = hostLocation + parametersBundle.getString(AUDIT_SITE_URL_KEY);
auditUploadSetupUrl = hostLocation + parametersBundle.getString(AUDIT_UPLOAD_URL_KEY);
auditScenarioSetupUrl = hostLocation + parametersBundle.getString(AUDIT_SCENARIO_URL_KEY);
addUserContractUrl = hostLocation + parametersBundle.getString(ADD_USER_CONTRACT_URL_KEY);
editUserContractUrl = hostLocation + parametersBundle.getString(EDIT_USER_CONTRACT_URL_KEY);
if (driver == null) {
FirefoxBinary ffBinary = new FirefoxBinary(new File(pathToFirefox));
if (xvfbDisplay != null) {
Logger.getLogger(this.getClass()).info("Setting Xvfb display with value " + xvfbDisplay);
ffBinary.setEnvironmentProperty("DISPLAY", xvfbDisplay);
}
driver = new FirefoxDriver(ffBinary, new FirefoxProfile());
}
}
Aggregations