32 lines
748 B
Plaintext
Executable File
32 lines
748 B
Plaintext
Executable File
package com.fp.armas.portal.util;
|
|
|
|
import java.util.ResourceBundle;
|
|
|
|
/**
|
|
* Clase que maneja el mensaje de propiedades del proyecto
|
|
* @author dcruz
|
|
*
|
|
*/
|
|
public class PortalMessages {
|
|
|
|
private static PortalMessages instancia = new PortalMessages();
|
|
private static final String PORTAL_PROPERTIES="com.fp.armas.portal.resources.portal";
|
|
private ResourceBundle resourceBundle = null;
|
|
|
|
private PortalMessages(){
|
|
resourceBundle = ResourceBundle.getBundle(PORTAL_PROPERTIES);
|
|
}
|
|
|
|
public static PortalMessages getInstancia() {
|
|
return instancia;
|
|
}
|
|
|
|
public String getString(String key) {
|
|
return resourceBundle.getString(key);
|
|
}
|
|
|
|
public <T> T getValue(String key, Class<T> type) {
|
|
return type.cast(resourceBundle.getObject(key));
|
|
}
|
|
}
|