List of usage examples for org.apache.commons.lang StringUtils lowerCase
public static String lowerCase(String str)
Converts a String to lower case as per String#toLowerCase() .
From source file:org.snaker.engine.access.QueryFilter.java
/** * ?./*from w ww . j a v a 2 s . c o m*/ * @param order ?descasc,?','. */ public void setOrder(String order) { String lowcaseOrder = StringUtils.lowerCase(order); //order? String[] orders = StringUtils.split(lowcaseOrder, ','); for (String orderStr : orders) { if (!StringUtils.equals(DESC, orderStr) && !StringUtils.equals(ASC, orderStr)) { throw new IllegalArgumentException("?[" + orderStr + "]??"); } } this.order = lowcaseOrder; }
From source file:org.sonar.api.batch.fs.internal.PathPattern.java
static String sanitizeExtension(String suffix) { return StringUtils.lowerCase(StringUtils.removeStart(suffix, ".")); }
From source file:org.sonar.core.measure.MeasureFilterSql.java
private void appendResourceNameCondition(StringBuilder sb) { if (StringUtils.isNotBlank(filter.getResourceName())) { sb.append(/* w w w . j a v a 2 s . c om*/ " AND s.project_id IN (SELECT rindex.resource_id FROM resource_index rindex WHERE rindex.kee like '"); sb.append(StringEscapeUtils.escapeSql(StringUtils.lowerCase(filter.getResourceName()))); sb.append("%'"); if (!filter.getResourceQualifiers().isEmpty()) { sb.append(" AND rindex.qualifier IN "); appendInStatement(filter.getResourceQualifiers(), sb); } sb.append(") "); } }
From source file:org.sonar.core.qualitygate.db.ProjectQgateAssociationQuery.java
private String projectSearchToSql(@Nullable String s) { String sql = null;//from w w w. j a va 2 s.com if (s != null) { sql = StringUtils.replace(StringUtils.lowerCase(s), "%", "/%"); sql = StringUtils.replace(sql, "_", "/_"); sql = sql + "%"; } return sql; }
From source file:org.sonar.core.resource.ResourceIndexerDao.java
static String nameToKey(String input) { return StringUtils.lowerCase(StringUtils.trimToEmpty(input)); }
From source file:org.sonar.fortify.base.FortifyConstants.java
public static String fortifyRepositoryKey(String language) { return "fortify-" + StringUtils.lowerCase(language); }
From source file:org.sonar.plugins.ada.Ada.java
/** * Allows to know if the given file name has a valid suffix. * // www.java 2 s .co m * @param fileName * String representing the file name * @return boolean <code>true</code> if the file name's suffix is known, <code>false</code> any other way */ public boolean hasValidSuffixes(String fileName) { String pathLowerCase = StringUtils.lowerCase(fileName); for (String suffix : INSTANCE.getFileSuffixes()) { if (pathLowerCase.endsWith("." + StringUtils.lowerCase(suffix))) { return true; } } return false; }
From source file:org.sonar.plugins.findbugs.FindbugsConfiguration.java
public String getEffort() { return StringUtils.lowerCase(project.getConfiguration().getString(CoreProperties.FINDBUGS_EFFORT_PROPERTY, CoreProperties.FINDBUGS_EFFORT_DEFAULT_VALUE)); }
From source file:org.sonar.plugins.php.core.Php.java
/** * Allows to know if the given file name has a valid suffix. * //from www.ja v a 2 s. com * @param fileName * String representing the file name * @return boolean <code>true</code> if the file name's suffix is known, <code>false</code> any other way */ public static boolean hasValidSuffixes(String fileName) { String pathLowerCase = StringUtils.lowerCase(fileName); for (String suffix : INSTANCE.getFileSuffixes()) { if (pathLowerCase.endsWith("." + StringUtils.lowerCase(suffix))) { return true; } } return false; }
From source file:org.sonar.server.measure.MeasureFilterSql.java
private void appendResourceNameCondition(StringBuilder sb) { if (StringUtils.isNotBlank(filter.getResourceName())) { sb.append(/*from ww w . ja v a 2 s . co m*/ " and c.uuid in (select rindex.component_uuid from resource_index rindex WHERE rindex.kee LIKE '"); sb.append(escapePercentAndUnderscrore( StringEscapeUtils.escapeSql(StringUtils.lowerCase(filter.getResourceName())))); sb.append("%'"); appendEscapeForSomeDb(sb); if (!filter.getResourceQualifiers().isEmpty()) { sb.append(" AND rindex.qualifier IN "); appendInStatement(filter.getResourceQualifiers(), sb); } sb.append(") "); } }