List of usage examples for org.apache.commons.lang StringUtils upperCase
public static String upperCase(String str)
Converts a String to upper case as per String#toUpperCase() .
From source file:org.nekorp.workflow.backend.controller.imp.ClienteControllerImp.java
/** * cambios que se aplican a los datos del cliente independientemente de lo que envien los sistemas. * @param cliente el cliente a modificar. *//* ww w.j ava 2 s . com*/ private void preprocesaCliente(final Cliente cliente) { //pasa el rfc a mayusculas cliente.setRfc(StringUtils.upperCase(cliente.getRfc())); //genera el nombre estandar para posteriores busquedas cliente.setNombreEstandar(this.stringStandarizer.standarize(cliente.getNombre())); }
From source file:org.nekorp.workflow.backend.data.access.util.StringStandarizer.java
public String standarize(String input) { //TODO por ahora solo lo pasa a mayusculas. resolver acentos y demas caracteres especiales. return StringUtils.upperCase(input); }
From source file:org.nekorp.workflow.desktop.view.resource.imp.DocumentSizeValidatorMayusculas.java
@Override public void insertString(FilterBypass fb, int offs, String str, AttributeSet a) throws BadLocationException { super.insertString(fb, offs, StringUtils.upperCase(str), a); }
From source file:org.nekorp.workflow.desktop.view.resource.imp.DocumentSizeValidatorMayusculas.java
@Override public void replace(FilterBypass fb, int offs, int length, String str, AttributeSet a) throws BadLocationException { super.replace(fb, offs, length, StringUtils.upperCase(str), a); }
From source file:org.nekorp.workflow.desktop.view.resource.imp.DocumentSizeValidatorNumeros.java
@Override public void insertString(FilterBypass fb, int offs, String str, AttributeSet a) throws BadLocationException { if (str.matches("[\\p{Digit}]*")) { super.insertString(fb, offs, StringUtils.upperCase(str), a); }/*ww w. j a va 2 s . c o m*/ }
From source file:org.nekorp.workflow.desktop.view.resource.imp.DocumentSizeValidatorNumeros.java
@Override public void replace(FilterBypass fb, int offs, int length, String str, AttributeSet a) throws BadLocationException { if (str.matches("[\\p{Digit}]*")) { super.insertString(fb, offs, StringUtils.upperCase(str), a); }// w ww . j av a 2 s.com }
From source file:org.ojbc.adapters.analyticsstaging.custody.service.DescriptionCodeLookupFromExcelService.java
private void loadMapOfCodeMaps(String codeTableExcelFilePath) throws FileNotFoundException, IOException { log.info("Recache code table maps."); mapOfCodeMaps = new HashMap<String, Map<String, Integer>>(); FileInputStream inputStream = new FileInputStream(new File(codeTableExcelFilePath)); Workbook workbook = new XSSFWorkbook(inputStream); for (int i = 0; i < workbook.getNumberOfSheets(); i++) { Sheet sheet = workbook.getSheetAt(i); Map<String, Integer> codePkMap = new HashMap<String, Integer>(); for (int j = 1; j <= sheet.getLastRowNum(); j++) { Row row = sheet.getRow(j);/* ww w . j av a 2 s .com*/ if (row.getCell(row.getLastCellNum() - 1).getCellType() == Cell.CELL_TYPE_NUMERIC) { row.getCell(row.getLastCellNum() - 1).setCellType(Cell.CELL_TYPE_STRING); } String codeOrDescription = StringUtils .upperCase(row.getCell(row.getLastCellNum() - 1).getStringCellValue()); Integer pkId = Double.valueOf(row.getCell(0).getNumericCellValue()).intValue(); codePkMap.put(codeOrDescription, pkId); } mapOfCodeMaps.put(sheet.getSheetName(), codePkMap); } workbook.close(); inputStream.close(); }
From source file:org.okj.im.core.WebQQClinetContext.java
/** * ??/*from ww w. ja va 2 s.c o m*/ * @return */ public String getVerifyCode() { if (StringUtils.isNotBlank(token.getVerifycode())) { return StringUtils.upperCase(token.getVerifycode()); } return StringUtils.EMPTY; }
From source file:org.okj.im.model.Member.java
/** * QQ//w w w . ja v a 2 s . c o m * @return */ public String getEncodePassword(AuthToken token) { if (StringUtils.isNotBlank(account.getPassword())) { InputStream in = null; try { in = ClassLoaderUtils.getResourceAsStream("encodePass.js", this.getClass()); Reader inreader = new InputStreamReader(in); ScriptEngineManager m = new ScriptEngineManager(); ScriptEngine se = m.getEngineByName("javascript"); se.eval(inreader); Object t = se .eval("passwordEncoding(\"" + account.getPassword() + "\",\"" + token.getVerifycodeHex() + "\",\"" + StringUtils.upperCase(token.getVerifycode()) + "\");"); return t.toString(); } catch (Exception ex) { LogUtils.error(LOGGER, "", ex); } return account.getPassword(); } return account.getPassword(); }
From source file:org.openhab.action.openwebif.internal.OpenWebIf.java
/** * Sends a text to a enigma2 based sat receiver with installed OpenWebIf * plugin./* w ww .ja v a 2 s . c om*/ */ @ActionDoc(text = "Sends a text to a enigma2 based sat receiver with installed OpenWebIf plugin") public static boolean sendOpenWebIfNotification( @ParamDoc(name = "name", text = "The configured name of the receiver") String name, @ParamDoc(name = "message", text = "The message to send to the receiver") String message, @ParamDoc(name = "messageType", text = "The message type (INFO, WARNING, ERROR)") String messageType, @ParamDoc(name = "timeout", text = "How long the text will stay on the screen in seconds") int timeout) { if (configs.isEmpty()) { throw new RuntimeException("No OpenWebIf receiver configs available, please check your openhab.cfg!"); } OpenWebIfConfig config = configs.get(name); if (config == null) { throw new RuntimeException("OpenWebIf receiver config with name '" + name + "' not found!"); } try { MessageType type = MessageType.valueOf(StringUtils.upperCase(messageType)); if (!communicator.isOff(config)) { if (!communicator.isStandby(config)) { SimpleResult result = communicator.sendMessage(config, message, type, timeout); if (!result.isValid()) { logger.warn("Can't send message to OpenWebIf receiver with name '{}': {}", config.getName(), result.getStateText()); } else { return true; } } else { logger.debug("OpenWebIf receiver with name '{}' is in standby", config.getName()); } } else { logger.debug("OpenWebIf receiver with name '{}' is off", config.getName()); } return false; } catch (IOException ex) { throw new RuntimeException( "OpenWebIf error for receiver with name '" + config.getName() + "': " + ex.getMessage(), ex); } }