@Override public List<Resource> getChildren(Resource resource) { List<Resource> children = Lists.newLinkedList(); Bucket bucket = getBucket(resource); if (bucket != null) { for (Bucket childBucket : bucket.getChildren()) { children.add(childBucket.getResource()); } } return children; }
public List<Resource> getChildren(Resource resource, boolean acceptExcluded) { List<Resource> children = Lists.newLinkedList(); Bucket bucket = getBucket(resource, acceptExcluded); if (bucket != null) { for (Bucket childBucket : bucket.getChildren()) { if (acceptExcluded || !childBucket.isExcluded()) { children.add(childBucket.getResource()); } } } return children; }