Example usage for org.apache.commons.lang StringUtils lowerCase

List of usage examples for org.apache.commons.lang StringUtils lowerCase

Introduction

In this page you can find the example usage for org.apache.commons.lang StringUtils lowerCase.

Prototype

public static String lowerCase(String str) 

Source Link

Document

Converts a String to lower case as per String#toLowerCase() .

Usage

From source file:de.hybris.platform.addonsupport.setup.populator.AddOnExtensionNameImpexMacroParametersPopulator.java

@Override
public void populate(final AddOnDataImportEventContext source, final ImpexMacroParameterData target)
        throws ConversionException {
    if (source.getAddonExtensionMetadata().isSuffixChannel()) {
        target.setAddonExtensionName(source.getAddonExtensionMetadata().getBaseExtensionName()
                + StringUtils.lowerCase(source.getBaseSite().getChannel().getCode()));
    } else {// ww w  .j a v  a  2s .  com
        target.setAddonExtensionName(source.getAddonExtensionMetadata().getBaseExtensionName());
    }

}

From source file:de.hybris.platform.ycommercewebservicestest.storelocator.impl.MockedGeoServiceWrapper.java

@Override
public GPS geocodeAddress(final Location address) throws GeoServiceWrapperException {
    final GPS gpsAddress = geoMap.get(StringUtils.lowerCase(address.getAddressData().getCity()));

    if (gpsAddress == null) {
        throw new GeoServiceWrapperException();
    }//w w w  .j  a v a2 s.c  o  m

    return gpsAddress;
}

From source file:de.hybris.platform.addonsupport.setup.populator.BaseSiteImpexMacroParametersPopulator.java

@Override
public void populate(final AddOnDataImportEventContext source, final ImpexMacroParameterData target)
        throws ConversionException {
    target.setSiteUid(source.getBaseSite().getUid());
    target.setStoreUid(source.getBaseSite().getUid());
    target.setSolrIndexedType(source.getBaseSite().getUid() + "ProductType");

    if (source.getBaseSite().getChannel() != null) {
        target.setChannel(StringUtils.lowerCase(source.getBaseSite().getChannel().getCode()));
    }//from   w w w.  ja  va2  s  . co m
}

From source file:com.evolveum.midpoint.prism.polystring.PrismDefaultPolyStringNormalizer.java

@Override
public String normalize(String orig) {
    if (orig == null) {
        return null;
    }// w w  w .  ja  v  a  2s  . c o  m
    String s = StringUtils.trim(orig);
    s = Normalizer.normalize(s, Normalizer.Form.NFKD);
    s = s.replaceAll("[^\\w\\s\\d]", "");
    s = s.replaceAll("\\s+", " ");
    if (StringUtils.isBlank(s)) {
        s = "";
    }
    return StringUtils.lowerCase(s);
}

From source file:com.safetys.framework.jmesa.core.filter.StringWildCardFilterMatcher.java

/**
 * {@inheritDoc}/*from www . j a  va  2  s.c o m*/
 */
public boolean evaluate(Object itemValue, String filterValue) {
    if (ignoreCases) {
        itemValue = StringUtils.lowerCase(String.valueOf(itemValue));
    }

    Pattern filterPattern = createFilterPattern(filterValue);
    if (filterPattern == null) {
        return false;
    }

    return filterPattern.matcher(String.valueOf(itemValue)).matches();
}

From source file:com.siberhus.web.ckeditor.utils.PathUtils.java

public static String getBaseUrl(HttpServletRequest request, String space, String type) {
    CkeditorConfig config = CkeditorConfigurationHolder.config();
    String baseUrl = null;/*from  w  w  w  .j  ava2s  .  c om*/

    baseUrl = StringUtils.isNotBlank(config.upload().basedir(request)) ? config.upload().basedir(request)
            : CkeditorTagConfig.DEFAULT_BASEDIR;

    baseUrl = PathUtils.checkSlashes(baseUrl, "L- R-", true);

    String spaceDir = PathUtils.sanitizePath(space);
    if (StringUtils.isNotBlank(spaceDir)) {
        baseUrl += "/" + spaceDir;
    }

    String typeName = PathUtils.sanitizePath(StringUtils.lowerCase(type));
    if (StringUtils.isNotBlank(typeName)) {
        typeName = WordUtils.capitalize(typeName);
        baseUrl += "/" + typeName;
    }
    return baseUrl;
}

From source file:com.constellio.app.modules.es.connectors.http.fetcher.config.BasicUrlNormalizer.java

@Override
public String normalize(String url) throws MalformedURLException, URISyntaxException {
    String trimmedUrl = StringUtils.trim(url);
    String noFragmentUrl = StringUtils.substringBefore(trimmedUrl, "#");
    if (StringUtils.isEmpty(new URL(noFragmentUrl).getFile())) {
        noFragmentUrl = noFragmentUrl + "/";
    }//from  www.j  a  v  a2s.c  o  m
    URL normalizedUrl = new URL(noFragmentUrl);
    String lowerCaseHost = StringUtils.lowerCase(normalizedUrl.getHost());
    normalizedUrl = new URL(normalizedUrl.getProtocol(), lowerCaseHost, normalizedUrl.getPort(),
            normalizedUrl.getFile());
    return normalizedUrl.toURI().normalize().toString();
}

From source file:com.adobe.acs.commons.quickly.Command.java

public Command(final String raw) {
    this.raw = StringUtils.stripToEmpty(raw);

    String opWithPunctuation = StringUtils
            .stripToEmpty(StringUtils.lowerCase(StringUtils.substringBefore(this.raw, " ")));
    int punctuationIndex = StringUtils.indexOfAny(opWithPunctuation, PUNCTUATIONS);

    if (punctuationIndex > 0) {
        this.punctuation = StringUtils.substring(opWithPunctuation, punctuationIndex).split("(?!^)");
        this.operation = StringUtils.substring(opWithPunctuation, 0, punctuationIndex);
    } else {// w  ww  .j av a 2  s.c om
        this.punctuation = new String[] {};
        this.operation = opWithPunctuation;
    }

    this.param = StringUtils.stripToEmpty(StringUtils.removeStart(this.raw, opWithPunctuation));
    this.params = StringUtils.split(this.param);

    if (log.isTraceEnabled()) {
        log.trace("Raw: {}", this.raw);
        log.trace("Operation: {}", this.operation);
        log.trace("Punctuation: {}", Arrays.toString(this.punctuation));
        log.trace("Param: {}", this.param);
        log.trace("Params: {}", Arrays.toString(this.params));
    }
}

From source file:de.hybris.platform.ycommercewebservicestest.storelocator.impl.MockedGeoServiceWrapper.java

@Override
public GPS geocodeAddress(final AddressData address) throws GeoServiceWrapperException {
    final GPS gpsAddress = geoMap.get(StringUtils.lowerCase(address.getCity()));

    if (gpsAddress == null) {
        throw new GeoServiceWrapperException();
    }//from  w ww.  j av a2 s . c  om

    return gpsAddress;
}

From source file:com.evolveum.midpoint.web.component.wizard.resource.dto.AttributeDto.java

public String getfNameCaseInsensitive() {
    return StringUtils.lowerCase(definition.getName().getLocalPart());
}