}
});
Collection<ProcessDefinitionPermission> excludes = pair.getFirst();
if (!excludes.isEmpty()) {
ProcessDefinitionPermission permission = Collections.firstMatching(excludes, new Predicate<ProcessDefinitionPermission>() {
@Override
public boolean apply(ProcessDefinitionPermission input) {
return hasMatchingRole(input.getRoleName());
}
});
if (permission != null) {
return false;
}
}
Collection<ProcessDefinitionPermission> includes = pair.getSecond();
ProcessDefinitionPermission permission = Collections.firstMatching(includes, new Predicate<ProcessDefinitionPermission>() {
@Override
public boolean apply(ProcessDefinitionPermission input) {
return hasMatchingRole(input.getRoleName());
}
});