List<Long> taskIdList = FluentIterable.from(Arrays.asList(strTaskIdArr))
.transform(new Function<String, Long>() {
@Nullable
@Override
public Long apply(@Nullable String taskIdStr) {
return Strings.isNullOrEmpty(taskIdStr) ? -1 : Long.parseLong(taskIdStr);
}
}).toList();
Iterable levelPermissions = Splitter.on(",").trimResults().omitEmptyStrings()
.split(propertiesHelper.getProperty(permissionsLevel, ""));
return ImmutableSet.copyOf(levelPermissions);
public static final Set<String> normalUsers = initRoles("level_2_permissions");
private static Set<String> initRoles(String permissionsLevel){
try {
PropertiesHelper propertiesHelper = new PropertiesHelper(
Constants.CENTER_DEPARTMENT_CONFIG_FILE_PATH);
Iterable levelPermissions = Splitter.on(",").trimResults().omitEmptyStrings()
.split(propertiesHelper.getProperty(permissionsLevel, ""));
return ImmutableSet.copyOf(levelPermissions);
} catch (Exception e) {
dMsg.error(e.getMessage(), e);
}
return new HashSet<>();
}