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:com.enonic.cms.web.portal.services.PortalServicesProcessor.java
@Override protected void handlerCustom(HttpServletRequest request, HttpServletResponse response, HttpSession session, ExtendedMap formItems, UserServicesService userServices, SiteKey siteKey, String operation) throws VerticalUserServicesException, VerticalEngineException, IOException, ClassNotFoundException, IllegalAccessException, InstantiationException { PortalOperation portalOperation = null; try {// w w w .j a v a 2 s . c o m portalOperation = PortalOperation.valueOf(StringUtils.lowerCase(operation)); } catch (IllegalArgumentException e) { throw new VerticalUserServicesException( "Operation: " + operation + " not supported in service " + " portal"); } ResolverContext resolverContext = new ResolverContext(request, getSite(siteKey)); switch (portalOperation) { case forcedeviceclass: handleForceDeviceClass(resolverContext, response, formItems); break; case resetdeviceclass: handleResetDeviceClass(resolverContext, response); break; case forcelocale: handleForceLocale(resolverContext, response, formItems); break; case resetlocale: handleResetLocale(resolverContext, response); break; } redirectToPage(request, response, formItems); }
From source file:com.evolveum.midpoint.prism.polystring.AbstractPolyStringNormalizer.java
protected String lowerCase(String s) { return StringUtils.lowerCase(s); }
From source file:gemlite.shell.commands.Query.java
public Object revert(String type, String values) { Assert.notNull(type);//from w ww . j a v a 2 s . c om Assert.notNull(values); type = StringUtils.lowerCase(type); switch (type) { // case "string[]": //?values String[] arr = values.split(","); return arr; case "string": return values; } return null; }
From source file:com.mycompany.sonar.reference.FooLanguage.java
/** * Allows to know if the given file name has a valid suffix. * * @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 *//*from ww w . java 2 s . c om*/ public boolean hasValidSuffixes(String fileName) { String pathLowerCase = StringUtils.lowerCase(fileName); for (String suffix : getFileSuffixes()) { if (pathLowerCase.endsWith("." + StringUtils.lowerCase(suffix))) { return true; } } return false; }
From source file:com.egt.core.jsf.component.Etiqueta.java
/** * {@inheritDoc}/*ww w . j ava 2 s . c o m*/ */ @Override public Object getValue() { Object superobj = super.getValue(); String superstr = superobj == null ? null : superobj.toString(); if (StringUtils.isBlank(superstr)) { return superobj; } else if (getValueExpression("value") != null) { return superobj; } String supertip = super.getToolTip(); if (supertip != null && getValueExpression("toolTip") == null && supertip.startsWith("BundleParametros.")) { int i = supertip.indexOf('.'); String key = supertip.substring(i + 1); String str = BundleParametros.getString(key, BundleParametros.TOOLTIP, true); if (str != null) { return str; } } String webuistr = JSF.getWebuiString(this, "text"); if (webuistr == null) { String prefix = "label"; String thisid = StringUtils.trimToEmpty(this.getId()); String altkey = thisid.startsWith(prefix) ? thisid.substring(prefix.length()) : null; String styles = StringUtils.trimToEmpty(this.getStyleClass()); // boolean b = super.getFor() == null; webuistr = StringUtils.lowerCase(JSF.getWebuiString(superstr, altkey, styles)); } return webuistr == null ? superobj : webuistr; }
From source file:com.healthcit.analytics.businessdelegate.ReportTemplateManager.java
@Transactional(readOnly = true, propagation = Propagation.REQUIRED) public boolean checkIfReportTitleExists(String title, Long userId, Boolean shared) { return getReportByTitle(StringUtils.lowerCase(title), userId, shared) != null; }
From source file:mitm.common.extractor.impl.DetectedMimeTypeImpl.java
@Override public String getType() { return StringUtils.lowerCase(mediaType.getType()); }
From source file:com.cloud.servlet.StaticResourceServlet.java
static String getContentType(final String fileName) { return contentTypes.get(StringUtils.lowerCase(StringUtils.substringAfterLast(fileName, "."))); }
From source file:com.evolveum.midpoint.prism.match.ExchangeEmailAddressesMatchingRule.java
@Override public String normalize(String original) { String prefix = getPrefix(original); String suffix = StringUtils.lowerCase(getSuffix(original)); if (prefix == null) { return suffix; } else {/*from www.j av a 2s . co m*/ return prefix + ":" + suffix; } }
From source file:cec.easyshop.storefront.security.AcceleratorAuthenticationProvider.java
@Override public Authentication authenticate(final Authentication authentication) throws AuthenticationException { final String username = (authentication.getPrincipal() == null) ? "NONE_PROVIDED" : authentication.getName();//from www . j a v a2 s . co m if (getBruteForceAttackCounter().isAttack(username)) { try { final UserModel userModel = getUserService().getUserForUID(StringUtils.lowerCase(username)); userModel.setLoginDisabled(true); getModelService().save(userModel); bruteForceAttackCounter.resetUserCounter(userModel.getUid()); } catch (final UnknownIdentifierException e) { LOG.warn("Brute force attack attempt for non existing user name " + username); } throw new BadCredentialsException( messages.getMessage("CoreAuthenticationProvider.badCredentials", "Bad credentials")); } return super.authenticate(authentication); }