/** * Allows <code>paramValues</code> attribute to be set as a comma-separated-values (csv). * * @param paramValues the paramValues to set */ public void setParamValues(String paramValues) { this.paramValues = TextParseUtil.commaDelimitedStringToSet(paramValues); } }
public void setExcludeMethods(String excludeMethods) { this.excludeMethods = TextParseUtil.commaDelimitedStringToSet(excludeMethods); }
public void setIncludeMethods(String includeMethods) { this.includeMethods = TextParseUtil.commaDelimitedStringToSet(includeMethods); }
public void setIncludeParameters(String parametersToInclude) { this.includes = TextParseUtil.commaDelimitedStringToSet(parametersToInclude); }
/** * Allows <code>paramNames</code> attribute to be set as comma-separated-values (csv). * * @param paramNames the paramNames to set */ public void setParamNames(String paramNames) { this.paramNames = TextParseUtil.commaDelimitedStringToSet(paramNames); }
/** * Return a collection from the comma delimited String. * * @param commaDelim the comma delimited String. * @return A collection from the comma delimited String. Returns <tt>null</tt> if the string is empty. */ private Collection<String> asCollection(String commaDelim) { if (commaDelim == null || commaDelim.trim().length() == 0) { return null; } return TextParseUtil.commaDelimitedStringToSet(commaDelim); }
/** * Return a collection from the comma delimited String. * * @param commaDelim the comma delimited String. * @return A collection from the comma delimited String. Returns <tt>null</tt> if the string is empty. */ private Collection<String> asCollection(String commaDelim) { if (commaDelim == null || commaDelim.trim().length() == 0) { return null; } return TextParseUtil.commaDelimitedStringToSet(commaDelim); }
public static Set<String> asSet(String commaDelim) { if ((commaDelim == null) || (commaDelim.trim().length() == 0)) return null; return TextParseUtil.commaDelimitedStringToSet(commaDelim); }
private Set<Pattern> parseExcludedPackageNamePatterns(String commaDelimitedPackagePatterns) { Set<String> packagePatterns = TextParseUtil.commaDelimitedStringToSet(commaDelimitedPackagePatterns); Set<Pattern> packageNamePatterns = new HashSet<Pattern>(); for (String pattern : packagePatterns) { packageNamePatterns.add(Pattern.compile(pattern)); } return packageNamePatterns; }
/** * Return a collection from the comma delimited String. * * @param commaDelim the comma delimited String. * @return A collection from the comma delimited String. Returns <tt>null</tt> if the string is empty. */ public static Collection<String> asCollection(String commaDelim) { if (commaDelim == null || commaDelim.trim().length() == 0) { return null; } return TextParseUtil.commaDelimitedStringToSet(commaDelim); }
/** * Same as {@link #applyMethod(Set, Set, String)}, except that <code>excludeMethods</code> * and <code>includeMethods</code> are supplied as comma separated string. * * @param excludeMethods comma seperated string of methods to exclude. * @param includeMethods comma seperated string of methods to include. * @param method the specified method to check * @return <tt>true</tt> if the method should be applied. */ public static boolean applyMethod(String excludeMethods, String includeMethods, String method) { Set<String> includeMethodsSet = TextParseUtil.commaDelimitedStringToSet(includeMethods == null? "" : includeMethods); Set<String> excludeMethodsSet = TextParseUtil.commaDelimitedStringToSet(excludeMethods == null? "" : excludeMethods); return applyMethod(excludeMethodsSet, includeMethodsSet, method); }
private Set<Class<?>> parseExcludedClasses(String commaDelimitedClasses) { Set<String> classNames = TextParseUtil.commaDelimitedStringToSet(commaDelimitedClasses); Set<Class<?>> classes = new HashSet<Class<?>>(); for (String className : classNames) { try { classes.add(Class.forName(className)); } catch (ClassNotFoundException e) { throw new ConfigurationException("Cannot load excluded class: " + className, e); } } return classes; }
/** * File URLs whose protocol are in these list will be processed as jars containing classes * @param fileProtocols Comma separated list of file protocols that will be considered as jar files and scanned */ @Inject(ConventionConstants.CONVENTION_ACTION_FILE_PROTOCOLS) public void setFileProtocols(String fileProtocols) { if (StringUtils.isNotBlank(fileProtocols)) { this.fileProtocols = TextParseUtil.commaDelimitedStringToSet(fileProtocols); } }
/** * @param actionSuffix (Optional) Classes that end with these value will be mapped as actions * (defaults to "Action") */ @Inject(value = ConventionConstants.CONVENTION_ACTION_SUFFIX, required = false) public void setActionSuffix(String actionSuffix) { if (StringUtils.isNotBlank(actionSuffix)) { this.actionSuffix = TextParseUtil.commaDelimitedStringToSet(actionSuffix); } }
/** * @param actionSuffix (Optional) Classes that end with these value will be mapped as actions * (defaults to "Action") */ @Inject(value = ConventionConstants.CONVENTION_ACTION_SUFFIX, required = false) public void setActionSuffix(String actionSuffix) { if (StringUtils.isNotBlank(actionSuffix)) { this.actionSuffix = TextParseUtil.commaDelimitedStringToSet(actionSuffix); } }
public void setIncludeParameters(String parametersToInclude) { Set<String> parameters = TextParseUtil.commaDelimitedStringToSet(parametersToInclude); if (parameters.contains("fieldErrors")) { super.setCopyFieldErrors(Boolean.TRUE.toString()); } if (parameters.contains("actionErrors")) { super.setCopyErrors(Boolean.TRUE.toString()); } if (parameters.contains("actionMessages")) { super.setCopyMessages(Boolean.TRUE.toString()); } super.setIncludesCollection(parameters); }
@Inject(value = XWorkConstants.OVERRIDE_ACCEPTED_PATTERNS, required = false) public void setOverrideAcceptedPatterns(String acceptablePatterns) { if (LOG.isWarnEnabled()) { LOG.warn("Overriding accepted patterns [#0] with [#1], be aware that this affects all instances and safety of your application!", XWorkConstants.OVERRIDE_ACCEPTED_PATTERNS, acceptablePatterns); } acceptedPatterns = new HashSet<Pattern>(); for (String pattern : TextParseUtil.commaDelimitedStringToSet(acceptablePatterns)) { acceptedPatterns.add(Pattern.compile(pattern, Pattern.CASE_INSENSITIVE)); } }
@Inject(value = XWorkConstants.OVERRIDE_EXCLUDED_PATTERNS, required = false) public void setOverrideExcludePatterns(String excludePatterns) { if (LOG.isWarnEnabled()) { LOG.warn("Overriding excluded patterns [#0] with [#1], be aware that this affects all instances and safety of your application!", XWorkConstants.OVERRIDE_EXCLUDED_PATTERNS, excludePatterns); } excludedPatterns = new HashSet<Pattern>(); for (String pattern : TextParseUtil.commaDelimitedStringToSet(excludePatterns)) { excludedPatterns.add(Pattern.compile(pattern, Pattern.CASE_INSENSITIVE)); } }
@Inject(value = XWorkConstants.ADDITIONAL_EXCLUDED_PATTERNS, required = false) public void setAdditionalExcludePatterns(String excludePatterns) { if (LOG.isDebugEnabled()) { LOG.debug("Adding additional global patterns [#0] to excluded patterns!", excludePatterns); } for (String pattern : TextParseUtil.commaDelimitedStringToSet(excludePatterns)) { excludedPatterns.add(Pattern.compile(pattern, Pattern.CASE_INSENSITIVE)); } }
@Inject(value = XWorkConstants.ADDITIONAL_ACCEPTED_PATTERNS, required = false) public void setAdditionalAcceptedPatterns(String acceptablePatterns) { if (LOG.isDebugEnabled()) { LOG.warn("Adding additional global patterns [#0] to accepted patterns!", acceptablePatterns); } for (String pattern : TextParseUtil.commaDelimitedStringToSet(acceptablePatterns)) { acceptedPatterns.add(Pattern.compile(pattern, Pattern.CASE_INSENSITIVE)); } }