/** * Parses a string into an array of substrings, using a comma as a delimiter * and trimming whitespace. * * @param list * The list formatted as a <code>delimeter</code> -delimited * string. * @return The list formatted as an array of strings. */ public static String[] parseBundleList(String list) { return parseBundleList(list, ","); }
/** * Parses a Object array and puts them into a array of substrings, using a * comma as a delimiter * * @param objArray * The object array to be formatted as a comma-delimited string. * @return The comma-delimited string. */ public static String createBundleList(Object[] objArray) { return createBundleList(objArray, ", "); }
/** * Parses a string into an array of substrings, using a comma as a delimiter * and trimming whitespace. * * @param list * The list formatted as a <code>delimeter</code> -delimited * string. * @return The list formatted as an array of strings. */ public static String[] parseBundleList(String list) { return parseBundleList(list, ","); }
/** * Parses a Object array and puts them into a array of substrings, using a * comma as a delimiter * * @param objArray * The object array to be formatted as a comma-delimited string. * @return The comma-delimited string. */ public static String createBundleList(Object[] objArray) { return createBundleList(objArray, ", "); }
public ExcludeUeisProperties() throws FileNotFoundException, IOException { Properties excludeProperties = new Properties(); excludeProperties.load( new FileInputStream(ConfigFileConstants.getFile(ConfigFileConstants.EXCLUDE_UEI_FILE_NAME))); m_ueis = BundleLists.parseBundleList(excludeProperties.getProperty("excludes")); } }
private static void loadRoles() { File configFile = new File(ConfigFileConstants.getHome(), "etc" + File.separator + ROLE_CONFIGURATION_FILE); if (configFile.exists() && configFile.lastModified() > lastModified) { lastModified = configFile.lastModified(); Properties p = new Properties(); try { LOG.info("Loading security roles from {}", configFile); p.load(new FileInputStream(configFile)); String roleList = p.getProperty("roles"); if (roleList != null) { for (String role : BundleLists.parseBundleList(roleList)) { String securityRole = "ROLE_" + role.toUpperCase(); if (!s_availableRoles.contains(securityRole)) { LOG.info("Adding role {}", securityRole); s_availableRoles.add(securityRole); } } } } catch (Exception e) { LOG.warn("Can't load security roles from {}, because: {}", configFile, e.getMessage()); } } } }
private static void loadRoles() { File configFile = new File(ConfigFileConstants.getHome(), "etc" + File.separator + ROLE_CONFIGURATION_FILE); if (configFile.exists() && configFile.lastModified() > lastModified) { lastModified = configFile.lastModified(); Properties p = new Properties(); try { LOG.info("Loading security roles from {}", configFile); p.load(new FileInputStream(configFile)); String roleList = p.getProperty("roles"); if (roleList != null) { for (String role : BundleLists.parseBundleList(roleList)) { String securityRole = "ROLE_" + role.toUpperCase(); if (!s_availableRoles.contains(securityRole)) { LOG.info("Adding role {}", securityRole); s_availableRoles.add(securityRole); } } } } catch (Exception e) { LOG.warn("Can't load security roles from {}, because: {}", configFile, e.getMessage()); } } } }
list = BundleLists.parseBundleList(listString); } else {
String[] columns = BundleLists.parseBundleList(columnString); externalValues = new String[0]; } else { externalValues = BundleLists.parseBundleList(externalValuesString); propertiesValues = new String[0]; } else { propertiesValues = BundleLists.parseBundleList(propertiesValuesString); types = new String[0]; } else { types = BundleLists.parseBundleList(typesString); false); String[] suppress = (suppressString == null) ? new String[0] : BundleLists.parseBundleList(suppressString);
String[] configuredUsers = BundleLists.parseBundleList(properties.getProperty("users")); for (String user : configuredUsers) { String username = properties.getProperty("user." + user + ".username"); String[] configuredRoles = BundleLists.parseBundleList(properties.getProperty("roles")); for (final String role : configuredRoles) { String userList = properties.getProperty("role." + role + ".users"); continue; String[] authUsers = BundleLists.parseBundleList(userList);