List of usage examples for org.apache.commons.lang3 StringUtils equalsIgnoreCase
public static boolean equalsIgnoreCase(final CharSequence str1, final CharSequence str2)
Compares two CharSequences, returning true if they represent equal sequences of characters, ignoring case.
null s are handled without exceptions.
From source file:io.apigee.buildTools.enterprise4g.utils.PackageConfigurer.java
private static int runReplacement(String env, ConfigTokens conf, String scope, List<File> toProcess) { int errorCount = 0; for (File xmlFile : toProcess) { try {//from w w w . j a v a 2 s.co m Document xmlDoc = FileReader.getXMLDocument(xmlFile); Policy tokens; if (StringUtils.equalsIgnoreCase(scope, "proxy")) { tokens = conf.getConfigbyEnv(env).getProxyFileNameMatch(xmlFile.getName()); } else if (StringUtils.equalsIgnoreCase(scope, "policy")) { tokens = conf.getConfigbyEnv(env).getPolicyFileNameMatch(xmlFile.getName()); } else if (StringUtils.equalsIgnoreCase(scope, "target")) { tokens = conf.getConfigbyEnv(env).getTargetFileNameMatch(xmlFile.getName()); } else { continue; } // === N E X T === xmlDoc = replaceTokens(xmlDoc, tokens); DOMSource source = new DOMSource(xmlDoc); StreamResult result = new StreamResult(xmlFile); tltf.get().transform(source, result); } catch (Exception e) { logger.error("Error processing " + xmlFile.getName(), e); errorCount++; } } return errorCount; }
From source file:com.hybris.mobile.model.product.ProductStock.java
public String getStockLevelTxt() { if (stockLevelStatus != null) { if (StringUtils.equalsIgnoreCase(stockLevelStatus.getCodeLowerCase(), "inStock")) { return "In Stock"; } else if (StringUtils.equalsIgnoreCase(stockLevelStatus.getCodeLowerCase(), "lowStock")) { return "Low Stock"; } else if (StringUtils.equalsIgnoreCase(stockLevelStatus.getCodeLowerCase(), "outOfStock")) { return "Out Of Stock"; } else {//from ww w . j ava 2 s . c om return String.format("Unknown: %s", stockLevelStatus); } } return ""; }
From source file:com.inkubator.hrm.web.search.RecruitReqHistorySearchParameter.java
public String getUserId() { if (StringUtils.equalsIgnoreCase(getKeyParam(), "userId")) { userId = getParameter();/*from w w w . j a v a2 s. co m*/ } else { userId = null; } return userId; }
From source file:com.inkubator.hrm.web.search.RecrutimentLetterSearchParameter.java
public String getSenderBy() { if (StringUtils.equalsIgnoreCase(getKeyParam(), "senderBy")) { senderBy = getParameter();//from ww w. j ava2s .c o m } else { senderBy = null; } return senderBy; }
From source file:com.inkubator.hrm.web.search.RecruitMppApplyDetailSearchParameter.java
public String getPeriode() { if (StringUtils.equalsIgnoreCase(getKeyParam(), "periode")) { periode = getParameter();//w w w . j av a 2s . co m } else { periode = null; } return periode; }
From source file:com.inkubator.hrm.web.search.JabatanSearchParameter.java
public String getJabatan() { if (StringUtils.equalsIgnoreCase(getKeyParam(), "jabatan")) { jabatan = getParameter();/*from ww w. ja v a 2s .c om*/ } else { jabatan = null; } return jabatan; }
From source file:com.sap.csc.poc.ems.persistence.initial.entitlement.EntitlementTypeDataInitializer.java
public EntitlementType getByName(String name) { return get().stream().filter(type -> StringUtils.equalsIgnoreCase(type.getName(), name)).findFirst().get(); }
From source file:com.thoughtworks.go.util.command.ExecScript.java
/** * Ugly parsing of Exec output into some Elements. Gets called from StreamPumper. * * @param line the line of output to parse *///w w w . j a v a 2s .c om public synchronized void consumeLine(final String line) { // check if the output contains the error string if (StringUtils.isNotEmpty(errorStr)) { // YES: set error flag if (StringUtils.equalsIgnoreCase(line.trim(), errorStr)) { foundError = true; } } }
From source file:kenh.expl.functions.Equals.java
public boolean process(String s1, String s2, boolean ignoreCase) { if (ignoreCase) return StringUtils.equalsIgnoreCase(s1, s2); else//from ww w . j av a 2 s .c o m return StringUtils.equals(s1, s2); }
From source file:com.glaf.core.util.HttpQueryUtils.java
protected static Boolean getBooleanValue(HttpServletRequest request, String name) { String value = request.getParameter(name); if (request.getAttribute(name) != null) { value = (String) request.getAttribute(name); }/*from w w w. j a v a2s. c o m*/ if (StringUtils.equalsIgnoreCase(value, "true")) { return true; } return false; }