List of usage examples for java.util ResourceBundle getBundle
@CallerSensitive public static final ResourceBundle getBundle(String baseName)
From source file:br.com.webbudget.infraestructure.configuration.ApplicationUtils.java
/** * Busca no bundle de configuracoes da aplicacao uma determinada chave para * uma configuracao/* www. j ava 2 s . c o m*/ * * @param configurationKey a chave da qual queremos a configuracao * @return a configuracao para a chave informada */ public static String getConfiguration(String configurationKey) { final ResourceBundle bundle = ResourceBundle.getBundle("webbudget"); return bundle.getString(configurationKey); }
From source file:guiPackage.AllGuestComboBoxModel.java
private List<Guest> getValues() { BasicDataSource mySource = new BasicDataSource(); mySource.setUrl(ResourceBundle.getBundle("databaseConnection").getString("connection")); mySource.setUsername(ResourceBundle.getBundle("databaseConnection").getString("username")); mySource.setPassword(ResourceBundle.getBundle("databaseConnection").getString("password")); GuestManager mngr = new GuestManagerImpl(mySource); return mngr.getAllGuests(); }
From source file:de.gmorling.methodvalidation.spring.SpringMethodValidationTest.java
@BeforeClass public static void before() { ResourceBundle bundle = ResourceBundle.getBundle("org.hibernate.validator.ValidationMessages"); nullValidationMessage = bundle.getString("javax.validation.constraints.NotNull.message"); }
From source file:cl.borrego.foundation.util.Message.java
public Message() { this.m_lookup = ResourceBundle.getBundle(Properties.DEFAULT_RESOURCE_BUNDLE); }
From source file:net.nosleep.superanalyzer.util.Misc.java
public static String getString(String id) { try {/*from w w w. ja va2 s . c o m*/ return ResourceBundle.getBundle("SuperAnalyzer").getString(id); } catch (Exception e) { System.err.println("ERROR: Could not find resource string for " + id); } return ""; }
From source file:guiPackage.AllAccomComboBoxModel.java
private List<Accomodation> getValues() { BasicDataSource mySource = new BasicDataSource(); mySource.setUrl(ResourceBundle.getBundle("databaseConnection").getString("connection")); mySource.setUsername(ResourceBundle.getBundle("databaseConnection").getString("username")); mySource.setPassword(ResourceBundle.getBundle("databaseConnection").getString("password")); AccomManager accomMngr = new AccomManagerImpl(mySource); return accomMngr.getAllAccoms(); }
From source file:com.htmlhifive.tools.codeassist.core.messages.MessagesBase.java
/** * ??./* w w w .ja va 2 s . co m*/ * * @param bundleName ???. */ protected static void addResourceBundleString(String bundleName) { synchronized (RESOURCE_BUNDLES) { ResourceBundle bundle = ResourceBundle.getBundle(bundleName); RESOURCE_BUNDLES.add(bundle); } }
From source file:guiPackage.AllRoomsComboBoxModel.java
private List<Room> getValues() { BasicDataSource mySource = new BasicDataSource(); mySource.setUrl(ResourceBundle.getBundle("databaseConnection").getString("connection")); mySource.setUsername(ResourceBundle.getBundle("databaseConnection").getString("username")); mySource.setPassword(ResourceBundle.getBundle("databaseConnection").getString("password")); RoomManager mngr = new RoomManagerImpl(mySource); return mngr.getAllRooms(); }
From source file:cl.borrego.foundation.util.Message.java
public Message(String bundle) { this.m_lookup = ResourceBundle.getBundle(bundle); }
From source file:com.cybozu.kintone.gpsPunch.GpsPunchRequestManager.java
public GpsPunchRequestManager() { // ???//from w w w .ja v a2s. c om try { ResourceBundle rb = ResourceBundle.getBundle("gpspunch"); authorization = rb.getString("authorization"); companyId = rb.getString("companyid"); target = rb.getString("target"); } catch (Exception e) { e.printStackTrace(); System.exit(1); } // HTTP Client?? List<Header> headers = new ArrayList<Header>(); headers.add(new BasicHeader("Authorization", authorization)); // HTTP Client?? this.httpClient = HttpClientBuilder.create().setDefaultHeaders(headers).build(); }