Java Code Examples for org.springframework.util.StringUtils.collectionToDelimitedString()

The following are Jave code examples for showing how to use collectionToDelimitedString() of the org.springframework.util.StringUtils class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: spring-cloud-skipper   File: InteractiveModeApplicationRunner.java   View Source Code Vote up 6 votes
@Override
public Input readInput() {
	if (!done) {
		done = true;
		return new Input() {
			@Override
			public List<String> words() {
				return commands;
			}

			@Override
			public String rawText() {
				return StringUtils.collectionToDelimitedString(commands, " ");
			}
		};
	}
	else {
		return null;
	}
}
 
Example 2
Project: springboot-shiro-cas-mybatis   File: SimpleMetadataUIInfo.java   View Source Code Vote up 6 votes
/**
 * Gets display name.
 *
 * @return the display name
 */
public String getDisplayName() {
    final Collection<String> items = getDisplayNames();
    if (items.isEmpty()) {
        return this.registeredService.getName();
    }
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 3
Project: springboot-shiro-cas-mybatis   File: SimpleMetadataUIInfo.java   View Source Code Vote up 6 votes
/**
 * Gets description.
 *
 * @return the description
 */
public String getDescription() {
    final Collection<String> items = getDescriptions();
    if (items.isEmpty()) {
        return this.registeredService.getDescription();
    }
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 4
Project: springboot-shiro-cas-mybatis   File: SimpleMetadataUIInfo.java   View Source Code Vote up 6 votes
/**
 * Gets display name.
 *
 * @return the display name
 */
public String getDisplayName() {
    final Collection<String> items = getDisplayNames();
    if (items.isEmpty()) {
        return this.registeredService.getName();
    }
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 5
Project: cas-5.1.0   File: DefaultRegisteredServiceUserInterfaceInfo.java   View Source Code Vote up 6 votes
/**
 * Gets description.
 *
 * @return the description
 */
public String getDescription() {
    final Collection<String> items = getDescriptions();
    if (items.isEmpty()) {
        return this.registeredService.getDescription();
    }
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 6
Project: cas-5.1.0   File: DefaultRegisteredServiceUserInterfaceInfo.java   View Source Code Vote up 6 votes
/**
 * Gets display name.
 *
 * @return the display name
 */
public String getDisplayName() {
    final Collection<String> items = getDisplayNames();
    if (items.isEmpty()) {
        return this.registeredService.getName();
    }
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 7
Project: cas-server-4.2.1   File: SimpleMetadataUIInfo.java   View Source Code Vote up 6 votes
/**
 * Gets description.
 *
 * @return the description
 */
public String getDescription() {
    final Collection<String> items = getDescriptions();
    if (items.isEmpty()) {
        return this.registeredService.getDescription();
    }
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 8
Project: cas-server-4.2.1   File: SimpleMetadataUIInfo.java   View Source Code Vote up 6 votes
/**
 * Gets display name.
 *
 * @return the display name
 */
public String getDisplayName() {
    final Collection<String> items = getDisplayNames();
    if (items.isEmpty()) {
        return this.registeredService.getName();
    }
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 9
Project: lams   File: GenericFilterBean.java   View Source Code Vote up 6 votes
/**
 * Create new FilterConfigPropertyValues.
 * @param config FilterConfig we'll use to take PropertyValues from
 * @param requiredProperties set of property names we need, where
 * we can't accept default values
 * @throws ServletException if any required properties are missing
 */
public FilterConfigPropertyValues(FilterConfig config, Set<String> requiredProperties)
	throws ServletException {

	Set<String> missingProps = (requiredProperties != null && !requiredProperties.isEmpty()) ?
			new HashSet<String>(requiredProperties) : null;

	Enumeration<?> en = config.getInitParameterNames();
	while (en.hasMoreElements()) {
		String property = (String) en.nextElement();
		Object value = config.getInitParameter(property);
		addPropertyValue(new PropertyValue(property, value));
		if (missingProps != null) {
			missingProps.remove(property);
		}
	}

	// Fail if we are still missing properties.
	if (missingProps != null && missingProps.size() > 0) {
		throw new ServletException(
			"Initialization from FilterConfig for filter '" + config.getFilterName() +
			"' failed; the following required properties were missing: " +
			StringUtils.collectionToDelimitedString(missingProps, ", "));
	}
}
 
Example 10
Project: lams   File: BeanWrapperImpl.java   View Source Code Vote up 6 votes
/**
 * Parse the given property name into the corresponding property name tokens.
 * @param propertyName the property name to parse
 * @return representation of the parsed property tokens
 */
private PropertyTokenHolder getPropertyNameTokens(String propertyName) {
	PropertyTokenHolder tokens = new PropertyTokenHolder();
	String actualName = null;
	List<String> keys = new ArrayList<String>(2);
	int searchIndex = 0;
	while (searchIndex != -1) {
		int keyStart = propertyName.indexOf(PROPERTY_KEY_PREFIX, searchIndex);
		searchIndex = -1;
		if (keyStart != -1) {
			int keyEnd = propertyName.indexOf(PROPERTY_KEY_SUFFIX, keyStart + PROPERTY_KEY_PREFIX.length());
			if (keyEnd != -1) {
				if (actualName == null) {
					actualName = propertyName.substring(0, keyStart);
				}
				String key = propertyName.substring(keyStart + PROPERTY_KEY_PREFIX.length(), keyEnd);
				if ((key.startsWith("'") && key.endsWith("'")) || (key.startsWith("\"") && key.endsWith("\""))) {
					key = key.substring(1, key.length() - 1);
				}
				keys.add(key);
				searchIndex = keyEnd + PROPERTY_KEY_SUFFIX.length();
			}
		}
	}
	tokens.actualName = (actualName != null ? actualName : propertyName);
	tokens.canonicalName = tokens.actualName;
	if (!keys.isEmpty()) {
		tokens.canonicalName +=
				PROPERTY_KEY_PREFIX +
				StringUtils.collectionToDelimitedString(keys, PROPERTY_KEY_SUFFIX + PROPERTY_KEY_PREFIX) +
				PROPERTY_KEY_SUFFIX;
		tokens.keys = StringUtils.toStringArray(keys);
	}
	return tokens;
}
 
Example 11
Project: Settings   File: ApiClient.java   View Source Code Vote up 5 votes
private String collectionToString(Collection<? extends CharSequence> collection) {
    return StringUtils.collectionToDelimitedString(collection, separator);
}
 
Example 12
Project: springboot-shiro-cas-mybatis   File: SimpleMetadataUIInfo.java   View Source Code Vote up 5 votes
/**
 * Gets description.
 *
 * @return the description
 */
public String getDescription() {
    final Collection<String> items = getDescriptions();
    if (items.isEmpty()) {
        return this.registeredService.getDescription();
    }
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 13
Project: springboot-shiro-cas-mybatis   File: SimpleMetadataUIInfo.java   View Source Code Vote up 3 votes
/**
 * Gets information uRL.
 *
 * @return the information uRL
 */
public String getInformationURL() {
    final Collection<String> items = getInformationURLs();
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 14
Project: springboot-shiro-cas-mybatis   File: SimpleMetadataUIInfo.java   View Source Code Vote up 2 votes
/**
 * Gets privacy statement uRL.
 *
 * @return the privacy statement uRL
 */
public String getPrivacyStatementURL() {
    final Collection<String> items = getPrivacyStatementURLs();
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 15
Project: springboot-shiro-cas-mybatis   File: SimpleMetadataUIInfo.java   View Source Code Vote up 2 votes
/**
 * Gets information uRL.
 *
 * @return the information uRL
 */
public String getInformationURL() {
    final Collection<String> items = getInformationURLs();
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 16
Project: springboot-shiro-cas-mybatis   File: SimpleMetadataUIInfo.java   View Source Code Vote up 2 votes
/**
 * Gets privacy statement uRL.
 *
 * @return the privacy statement uRL
 */
public String getPrivacyStatementURL() {
    final Collection<String> items = getPrivacyStatementURLs();
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 17
Project: cas-5.1.0   File: DefaultRegisteredServiceUserInterfaceInfo.java   View Source Code Vote up 2 votes
/**
 * Gets information uRL.
 *
 * @return the information uRL
 */
public String getInformationURL() {
    final Collection<String> items = getInformationURLs();
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 18
Project: cas-5.1.0   File: DefaultRegisteredServiceUserInterfaceInfo.java   View Source Code Vote up 2 votes
/**
 * Gets privacy statement uRL.
 *
 * @return the privacy statement uRL
 */
public String getPrivacyStatementURL() {
    final Collection<String> items = getPrivacyStatementURLs();
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 19
Project: cas-server-4.2.1   File: SimpleMetadataUIInfo.java   View Source Code Vote up 2 votes
/**
 * Gets information uRL.
 *
 * @return the information uRL
 */
public String getInformationURL() {
    final Collection<String> items = getInformationURLs();
    return StringUtils.collectionToDelimitedString(items, ".");
}
 
Example 20
Project: cas-server-4.2.1   File: SimpleMetadataUIInfo.java   View Source Code Vote up 2 votes
/**
 * Gets privacy statement uRL.
 *
 * @return the privacy statement uRL
 */
public String getPrivacyStatementURL() {
    final Collection<String> items = getPrivacyStatementURLs();
    return StringUtils.collectionToDelimitedString(items, ".");
}