Remove old CommunityService item count methods, which were inaccurate & slow. ItemService now handles this

This commit is contained in:
Tim Donohue
2016-02-04 15:32:34 -06:00
parent dcf14a42bf
commit 3587661b6c
2 changed files with 0 additions and 23 deletions

View File

@@ -570,22 +570,6 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
authorizeService.authorizeAction(context, community, Constants.WRITE);
}
@Override
public int countItems(Context context, Community community) throws SQLException {
int total = 0;
// add collection counts
List<Collection> cols = community.getCollections();
for (Collection col : cols) {
total += itemService.countItems(context, col);
}
// add sub-community counts
List<Community> comms = community.getSubcommunities();
for (int j = 0; j < comms.size(); j++) {
total += countItems(context, comms.get(j));
}
return total;
}
@Override
public Community findByAdminGroup(Context context, Group group) throws SQLException {
return communityDAO.findByAdminGroup(context, group);

View File

@@ -243,13 +243,6 @@ public interface CommunityService extends DSpaceObjectService<Community>, DSpace
public void canEdit(Context context, Community community) throws AuthorizeException, SQLException;
/**
* counts items in this community
*
* @return total items
*/
public int countItems(Context context, Community community) throws SQLException;
public Community findByAdminGroup(Context context, Group group) throws SQLException;
public List<Community> findAuthorized(Context context, List<Integer> actions) throws SQLException;