コード例 #1
0
 /** {@inheritDoc} */
 @Override
 public void toggleBranchSubscription(Branch branch) {
   JCUser current = userService.getCurrentUser();
   if (branch.getSubscribers().contains(current)) {
     branch.getSubscribers().remove(current);
   } else {
     branch.getSubscribers().add(current);
   }
   branchDao.update(branch);
 }
コード例 #2
0
 private Branch createBranch() {
   Branch branch = new Branch("branch name", "branch description");
   branch.setId(1L);
   branch.setUuid("uuid");
   return branch;
 }