List of usage examples for org.springframework.util StringUtils collectionToCommaDelimitedString
public static String collectionToCommaDelimitedString(@Nullable Collection<?> coll)
From source file:fr.xebia.springframework.security.core.userdetails.ExtendedUser.java
public String getAllowedRemoteAddresses() { return StringUtils.collectionToCommaDelimitedString(allowedRemoteAddresses); }
From source file:com.emc.ecs.sync.service.SyncRecord.java
public static String selectErrors(String tableName) { return "select " + StringUtils.collectionToCommaDelimitedString(ALL_FIELDS) + " from " + tableName + " where status = '" + ObjectStatus.Error.getValue() + "'"; }
From source file:guru.nidi.languager.maven.CheckPropertiesMojo.java
private String getIncludes() { List<String> includeList = new ArrayList<>(); for (String include : includes.split(",")) { includeList.add(include.endsWith(".properties") ? include : (include + ".properties")); }/* w w w .ja v a 2 s . co m*/ return StringUtils.collectionToCommaDelimitedString(includeList); }
From source file:csns.util.MassMailSender.java
public void send(SimpleMailMessage email, List<String> addresses) { List<String> bccAddresses = new ArrayList<String>(); for (int i = 0; i < addresses.size(); ++i) { if (!addresses.get(i).endsWith("@localhost")) bccAddresses.add(addresses.get(i)); if (bccAddresses.size() >= maxRecipientsPerMessage || bccAddresses.size() > 0 && i == addresses.size() - 1) { email.setBcc(bccAddresses.toArray(new String[0])); try { mailSender.send(email);/* w w w . j a v a 2 s . c o m*/ } catch (MailException e) { logger.warn(e.getMessage()); } logger.debug("sent email to " + StringUtils.collectionToCommaDelimitedString(bccAddresses)); bccAddresses.clear(); } } }
From source file:net.prasenjit.auth.domain.Client.java
public void setScope(Set<String> scope) { this.scopes = StringUtils.collectionToCommaDelimitedString(scope); }
From source file:com.phoenixnap.oss.ramlapisync.data.ApiMappingMetadata.java
public String toString() { return "Method " + getName() + " Verb [" + actionType + "] Url [" + getUrl() + "] \nConsumes [" + getConsumes() + "] Produces [" + getProduces() + "] with Schema [" + null + "] \nPath Vars [" + StringUtils.collectionToCommaDelimitedString(getPathVariables()) + "] \nRequest Params [" + StringUtils.collectionToCommaDelimitedString(getRequestParameters()) + "] \n"; }
From source file:io.pivotal.poc.dispatcher.MessageDispatcher.java
private String sendMessage(String topic, Object body, HttpHeaders requestHeaders) { MessageChannel channel = resolver.resolveDestination(topic + ".input"); MessageBuilder<?> builder = MessageBuilder.withPayload(body); builder.setHeader(MessageHeaders.CONTENT_TYPE, requestHeaders.getContentType()); for (Map.Entry<String, List<String>> entry : requestHeaders.entrySet()) { String headerName = entry.getKey(); if (requestHeadersToMap.contains(headerName)) { builder.setHeaderIfAbsent(headerName, StringUtils.collectionToCommaDelimitedString(entry.getValue())); }// w ww . java 2 s.co m } Message<?> message = builder.build(); channel.send(message); return message.getHeaders().getId().toString(); }
From source file:com.appleframework.security.auth.token.DefaultUserAuthenticationConverter.java
public Collection<? extends GrantedAuthority> getAuthorities(Map<String, ?> map) { if (!map.containsKey(AUTHORITIES)) { return defaultAuthorities; }//from w w w.j a v a2 s . co m Object authorities = map.get(AUTHORITIES); if (authorities instanceof String) { return AuthorityUtils.commaSeparatedStringToAuthorityList((String) authorities); } if (authorities instanceof Collection) { return AuthorityUtils.commaSeparatedStringToAuthorityList( StringUtils.collectionToCommaDelimitedString((Collection<?>) authorities)); } throw new IllegalArgumentException("Authorities must be either a String or a Collection"); }
From source file:net.prasenjit.auth.domain.Client.java
/** * <p>setAuthorizedGrantTypes.</p> * * @param authorizedGrantTypes a {@link java.util.Set} object. *//*from w w w.j a v a 2 s .co m*/ public void setAuthorizedGrantTypes(Set<String> authorizedGrantTypes) { grantTypes = StringUtils.collectionToCommaDelimitedString(authorizedGrantTypes); }
From source file:org.meruvian.yama.webapi.config.oauth.UserTokenConverter.java
private Collection<? extends GrantedAuthority> getAuthorities(Map<String, ?> map) { Object authorities = map.get(AUTHORITIES); if (authorities instanceof String) { AuthorityUtils.commaSeparatedStringToAuthorityList((String) authorities); }//from w w w .ja v a 2s. c o m if (authorities instanceof Collection) { return AuthorityUtils.commaSeparatedStringToAuthorityList( StringUtils.collectionToCommaDelimitedString((Collection<?>) authorities)); } return AuthorityUtils.commaSeparatedStringToAuthorityList(""); }