List of usage examples for org.apache.commons.lang StringUtils join
public static String join(Collection<?> collection, String separator)
Joins the elements of the provided Collection
into a single String containing the provided elements.
From source file:com.contrastsecurity.http.TraceFilterForm.java
@Override public String toString() { List<String> filters = new ArrayList<>(); if (StringUtils.isNotEmpty(filterText)) { filters.add(filterText);// w ww. ja va 2 s . c o m } if (expand != null && !expand.isEmpty()) { filters.add("expand=" + StringUtils.join(expand, ",")); } if (startDate != null) { filters.add("startDate=" + startDate.getTime()); } if (endDate != null) { filters.add("endDate=" + endDate.getTime()); } if (filterTags != null && !filterTags.isEmpty()) { filters.add("filterTags=" + StringUtils.join(filterTags, ",")); } if (severities != null && !severities.isEmpty()) { filters.add("severities=" + StringUtils.join(severities, ",")); } if (status != null) { filters.add("status=" + StringUtils.join(status, ",")); } if (vulnTypes != null && !vulnTypes.isEmpty()) { filters.add("vulnTypes=" + StringUtils.join(vulnTypes, ",")); } if (appVersionTags != null && !appVersionTags.isEmpty()) { filters.add("appVersionTags=" + StringUtils.join(appVersionTags, ",")); } if (environments != null && !environments.isEmpty()) { filters.add("environments=" + StringUtils.join(environments, ",")); } if (serverIds != null && !serverIds.isEmpty()) { filters.add("servers=" + StringUtils.join(serverIds, ",")); } if (urls != null && !urls.isEmpty()) { filters.add("urls=" + StringUtils.join(urls, ",")); } if (modules != null && !modules.isEmpty()) { filters.add("modules=" + StringUtils.join(modules, ",")); } if (StringUtils.isNotEmpty(sort)) { filters.add("sort=" + sort); } if (limit > -1) { filters.add("limit=" + limit); } if (offset > -1) { filters.add("offset=" + offset); } if (!filters.isEmpty()) { return "?" + StringUtils.join(filters, "&"); } else { return ""; } }
From source file:info.magnolia.module.webapp.WebappBootstrap.java
public WebappBootstrap() { super("Webapp bootstrap", "Bootstraps the webapp contents (files under " + StringUtils.join(Bootstrapper.getBootstrapDirs(), ", ") + ")"); }
From source file:edu.cornell.mannlib.vitro.webapp.web.templatemodels.Tags.java
public String list() { return StringUtils.join(tags, "\n"); }