Mercurial > hg > LGServices
diff src/main/java/de/mpiwg/gazetteer/utils/DataProvider.java @ 38:8b7a204fa929
new: show all existing branches in the searching result page of search for sections
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 20 Nov 2015 15:37:04 +0100 |
parents | ed215307f426 |
children | 37840afb7b80 |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/gazetteer/utils/DataProvider.java Fri Nov 20 15:18:28 2015 +0100 +++ b/src/main/java/de/mpiwg/gazetteer/utils/DataProvider.java Fri Nov 20 15:37:04 2015 +0100 @@ -42,7 +42,7 @@ return list; } - public List<LGBranch> getBranches(Long userId){ + public List<LGBranch> getAllExistingBranches(){ List<LGBranch> list = new ArrayList<LGBranch>(); for(LGBranch branch : getBranchMap().values()){ list.add(branch); @@ -50,10 +50,6 @@ return list; } - /* - * old version: only showing the branches that the current user has contributor role. - * But we modify it to get all branches in the section, and leave the role checking to jsp at front-end. - * public List<LGBranch> getBranches(Long userId){ List<LGBranch> list = new ArrayList<LGBranch>(); for(LGBranch branch : getBranchMap().values()){ @@ -63,7 +59,7 @@ } return list; } - */ + public LGBranch getBranch(Long branchId){ return getBranchMap().getValuesByOwnKey(branchId);