return papi.filterCollection(list, PermissionAPI.PERMISSION_READ, respectFrontEndPermissions, user);
}
public List<Structure> getStructures(Folder parent, User user, boolean respectFrontEndPermissions) throws DotStateException,
DotDataException, DotSecurityException{
if (!papi.doesUserHavePermission(parent, PermissionAPI.PERMISSION_READ, user,respectFrontEndPermissions)) {
throw new DotSecurityException("User " + user + " does not have permission to read " + parent.getName());
}
List list = StructureFactory.getStructures("folder='"+parent.getInode()+"'", null, 0, 0, null);
return papi.filterCollection(list, PermissionAPI.PERMISSION_READ, respectFrontEndPermissions, user);
}