List of usage examples for org.apache.commons.lang3 StringUtils join
public static String join(final Iterable<?> iterable, final String separator)
Joins the elements of the provided Iterable into a single String containing the provided elements.
No delimiter is added before or after the list.
From source file:com.liferay.blade.cli.command.GradleWrapperCommand.java
@Override public void execute() throws Exception { String gradleCommand = StringUtils.join(getArgs().getArgs(), " "); BladeCLI bladeCLI = getBladeCLI();//from w w w . j a v a2 s. co m GradleExec gradleExec = new GradleExec(bladeCLI); BaseArgs args = bladeCLI.getArgs(); File baseDir = new File(args.getBase()); gradleExec.executeTask(gradleCommand, baseDir, false); }
From source file:com.techcavern.wavetact.ircCommands.chanhalfop.Mode.java
@Override public void onCommand(String command, User user, PircBotX network, String prefix, Channel channel, boolean isPrivate, int userPermLevel, String... args) throws Exception { if (args.length > 0) IRCUtils.setMode(channel, network, StringUtils.join(args, " "), null); else/* w w w. jav a2 s .co m*/ IRCUtils.sendMessage(user, network, channel, channel.getMode(), prefix); }
From source file:dsd.dao.ParametersDAO.java
public static int InsertNewParameterValues(List<Parameter> listOfParamters) { try {// w w w. ja va 2 s.c om Connection con = DAOProvider.getDataSource().getConnection(); int counter = 0; for (Parameter parameter : listOfParamters) { try { counter += DAOProvider.InsertRowSecure(tableNameParameterData, StringUtils.join(tableParameterDataFields, ','), con, PrepareValuesForInsert(parameter)); } catch (Exception exc) { } } con.close(); return counter; } catch (Exception exc) { exc.printStackTrace(); } return 0; }
From source file:ch.cyberduck.core.preferences.MemoryPreferences.java
@Override public void setProperty(final String property, final List<String> values) { store.put(property, StringUtils.join(values, ",")); }
From source file:dsd.dao.WorstCaseDAO.java
public static int InsertWorstCaseData(List<WorstPylonCase> listOfData, boolean traffic, boolean debris) { try {// w w w.j a v a 2 s.c o m Connection con = DAOProvider.getDataSource().getConnection(); int counter = 0; try { String tableName = GetTableNameForDataType(traffic, debris); counter += DAOProvider.InsertRowsSecure(tableName, StringUtils.join(fields, ','), con, PrepareMultipleValuesForInsert(listOfData)); } catch (Exception exc) { exc.printStackTrace(); } con.close(); return counter; } catch (Exception exc) { exc.printStackTrace(); } return 0; }
From source file:com.currencyfair.onesignal.OneSignalException.java
@Override public String getMessage() { return StringUtils.join(errors, ";"); }
From source file:com.me.jvmi.Categories.java
public String lookup(String... categories) { String key = StringUtils.join(categories, DELIMETER); key = key.toLowerCase().replaceAll("\\s+", "_"); return props.getProperty(key); }
From source file:com.github.rvesse.airline.parser.errors.ParseArgumentsMissingException.java
public ParseArgumentsMissingException(List<String> argumentTitles) { super("Required arguments are missing: '%s'", StringUtils.join(argumentTitles, ',')); this.argumentTitles = argumentTitles; }
From source file:fi.foyt.fni.utils.licenses.CreativeCommonsLicense.java
public String getIconUrl(boolean compact) { StringBuilder urlBuilder = new StringBuilder(); if (secure) { urlBuilder.append("https:"); } else {/*from w ww . j av a 2s . c om*/ urlBuilder.append("http:"); } urlBuilder.append(ICON_PREFIX); urlBuilder.append(StringUtils.join(properties, '-')); urlBuilder.append('/'); if (StringUtils.isNotBlank(version)) { urlBuilder.append(version); } else { urlBuilder.append(DEFAULT_VERSION); } if (StringUtils.isNotBlank(jurisdiction)) { urlBuilder.append('/'); urlBuilder.append(jurisdiction); } urlBuilder.append('/'); if (compact) { urlBuilder.append(COMPACT_ICON); } else { urlBuilder.append(NORMAL_ICON); } return urlBuilder.toString(); }
From source file:com.xpn.xwiki.doc.merge.MergeUtils.java
/** * Merge a String./*from w w w. j a v a 2 s .com*/ * * @param previousStr previous version of the string * @param newStr new version of the string * @param currentStr current version of the string * @param mergeResult the merge report * @return the merged string */ // TODO: add support for line merge public static String mergeString(String previousStr, String newStr, String currentStr, MergeResult mergeResult) { String result = currentStr; try { Patch patch = DiffUtils.diff(IOUtils.readLines(new StringReader(previousStr)), IOUtils.readLines(new StringReader(newStr))); if (patch.getDeltas().size() > 0) { result = StringUtils.join(patch.applyTo(IOUtils.readLines(new StringReader(currentStr))), '\n'); mergeResult.setModified(true); } } catch (Exception e) { mergeResult.getErrors().add(e); } return result; }