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.evolveum.midpoint.provisioning.impl.dummy.TestDummyCaseIgnore.java
@Override protected String getMurrayRepoIcfName() { return StringUtils.lowerCase(super.getMurrayRepoIcfName()); }
From source file:cn.yiyizuche.common.base.Page.java
/** * ???./* w ww . ja v a 2s . co m*/ * * @param order * ?descasc,?','. */ public void setOrder(final 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:com.haulmont.cuba.web.filestorage.WebExportDisplay.java
/** * Show/Download resource at client side * * @param dataProvider ExportDataProvider * @param resourceName ResourceName for client side * @param exportFormat ExportFormat//from w w w . ja v a 2 s . c om * @see com.haulmont.cuba.gui.export.FileDataProvider * @see com.haulmont.cuba.gui.export.ByteArrayDataProvider */ @Override public void show(ExportDataProvider dataProvider, String resourceName, final ExportFormat exportFormat) { backgroundWorker.checkUIAccess(); boolean showNewWindow = this.newWindow; if (useViewList) { String fileExt; if (exportFormat != null) { fileExt = exportFormat.getFileExt(); } else { fileExt = FilenameUtils.getExtension(resourceName); } WebConfig webConfig = configuration.getConfig(WebConfig.class); showNewWindow = webConfig.getViewFileExtensions().contains(StringUtils.lowerCase(fileExt)); } if (exportFormat != null) { if (StringUtils.isEmpty(FilenameUtils.getExtension(resourceName))) { resourceName += "." + exportFormat.getFileExt(); } } CubaFileDownloader fileDownloader = AppUI.getCurrent().getFileDownloader(); StreamResource resource = new StreamResource(dataProvider::provide, resourceName); if (exportFormat != null && StringUtils.isNotEmpty(exportFormat.getContentType())) { resource.setMIMEType(exportFormat.getContentType()); } else { resource.setMIMEType(FileTypesHelper.getMIMEType(resourceName)); } if (showNewWindow) { fileDownloader.viewDocument(resource); } else { fileDownloader.downloadFile(resource); } }
From source file:com.evolveum.midpoint.provisioning.impl.dummy.TestDummyCaseIgnore.java
@Override protected String getBlackbeardRepoIcfName() { return StringUtils.lowerCase(super.getBlackbeardRepoIcfName()); }
From source file:com.l1j5.web.common.utils.ImageUtils.java
public static void createThumbnail(BufferedInputStream stream_file, String save, String type, int w) { try {// www . java 2 s.c o m if (StringUtils.equals(StringUtils.lowerCase(type), "gif")) { getGifImageThumbnail(stream_file, save, type, w); } else { getImageThumbnail(stream_file, save, type, w); } } catch (Exception e) { log.error(e); } }
From source file:nc.noumea.mairie.appock.core.security.AppUser.java
public void setLogin(String login) { this.login = StringUtils.trimToNull(StringUtils.lowerCase(login)); }
From source file:cec.easyshop.storefront.security.impl.DefaultBruteForceAttackCounter.java
protected String prepareUserUid(final String userUid) { return StringUtils.lowerCase(userUid); }
From source file:com.exxonmobile.ace.hybris.storefront.security.AcceleratorAuthenticationProvider.java
@Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { final String username = (authentication.getPrincipal() == null) ? "NONE_PROVIDED" : authentication.getName();// ww w.j av a2 s .c o m if (getBruteForceAttackCounter().isAttack(username)) { try { UserModel userModel = getUserService().getUserForUID(StringUtils.lowerCase(username)); userModel.setLoginDisabled(true); getModelService().save(userModel); bruteForceAttackCounter.resetUserCounter(userModel.getUid()); } catch (UnknownIdentifierException e) { LOG.warn("Brute force attack attempt for non existing user name " + username); } finally { throw new BadCredentialsException( messages.getMessage("CoreAuthenticationProvider.badCredentials", "Bad credentials")); } } // check if the user of the cart matches the current user and if the // user is not anonymous. If otherwise, remove delete the session cart as it might // be stolen / from another user String sessionCartUserId = getCartService().getSessionCart().getUser().getUid(); if (!username.equals(sessionCartUserId) && !sessionCartUserId.equals(userService.getAnonymousUser().getUid())) { getCartService().setSessionCart(null); } return super.authenticate(authentication); }
From source file:mitm.common.postfix.SaslPassword.java
@Override public boolean equals(Object obj) { if (obj == null) { return false; }/* www. j a v a 2 s.c om*/ if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } SaslPassword rhs = (SaslPassword) obj; return new EqualsBuilder().append(StringUtils.lowerCase(server), StringUtils.lowerCase(rhs.server)) .append(port, rhs.port).isEquals(); }
From source file:com.evolveum.midpoint.provisioning.impl.dummy.TestDummyCaseIgnore.java
@Override protected String getDrakeRepoIcfName() { return StringUtils.lowerCase(super.getDrakeRepoIcfName()); }