protected Set<String> getTilesDefinitions(Map<String, String> params) { if (params.containsKey(DefinitionsFactory.DEFINITIONS_CONFIG)) { return TextParseUtil.commaDelimitedStringToSet( params.get(DefinitionsFactory.DEFINITIONS_CONFIG)); } return TextParseUtil.commaDelimitedStringToSet(TILES_DEFAULT_PATTERN); }
protected Object findValue(String expr, Class toType) { if (ComponentUtils.altSyntax(getStack()) && toType == String.class) { return TextParseUtil.translateVariables('%', expr, getStack()); // return translateVariables(expr, getStack()); } else { expr = ComponentUtils.stripExpressionIfAltSyntax(getStack(), expr); return getStack().findValue(expr, toType); } }
@Override public String intercept(ActionInvocation invocation) throws Exception { Set<String> set = TextParseUtil.commaDelimitedStringToSet(exclude); System.out.println(invocation.getProxy().getActionName()); if (set.contains(invocation.getProxy().getActionName())) { return invocation.invoke(); } else { Map<String, Object> session = invocation.getInvocationContext().getContext().getSession(); if (session.get(loginUser) != null) { return invocation.invoke(); } } return "loginfail"; }
/** allow for filtering the schemas, only do that for non super users */ public void findSchemas() { List<XmlSchema> allSchemas = DB.getXmlSchemaDAO().findAll(); Set<String> visibleSchemas = null; if (!getUser().hasRight(User.ALL_RIGHTS)) { String schemaFilter = Config.getWithDefault("schema.filter", ""); if (!StringUtils.empty(schemaFilter)) { visibleSchemas = TextParseUtil.commaDelimitedStringToSet(schemaFilter); } } for (XmlSchema schema : allSchemas) { if (schema.getJsonTemplate() != null) { if ((visibleSchemas != null) && (!visibleSchemas.contains(schema.getName()))) continue; schemas.add(schema); } } }
public void setFileProtocols(String fileProtocols) { if (StringUtils.isNotBlank(fileProtocols)) { this.fileProtocols = TextParseUtil.commaDelimitedStringToSet(fileProtocols); } }
/** * Sets the allowed mimetypes * * @param allowedTypes A comma-delimited list of types */ public void setAllowedTypes(String allowedTypes) { allowedTypesSet = TextParseUtil.commaDelimitedStringToSet(allowedTypes); }
/** * Sets the allowed extensions * * @param allowedExtensions A comma-delimited list of extensions */ public void setAllowedExtensions(String allowedExtensions) { allowedExtensionsSet = TextParseUtil.commaDelimitedStringToSet(allowedExtensions); }
/** * 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); }