@Test @Ignore public void deleteProjectBranch() { }
@Subscribe public void deleteProjectBranch(ProjectBranchDeletedEvent event) { final String projectName = event.getProjectName(); final String branchName = event.getBranchName(); Predicate<Page> predicate = new Predicate<Page>() { @Override public boolean apply(Page page) { return !page.getProjectName().equals(projectName) || !page.getBranchName().equals(branchName); } }; try { deleteFromAllSubscriptions(predicate, "delete branch " + projectName + "/" + branchName, event.getCurrentUser()); } catch (IOException e) { log.error(StringUtils.EMPTY, e); } catch (GitAPIException e) { log.error(StringUtils.EMPTY, e); } }
SubscriptionStore { @Subscribe public void deleteProjectBranch(ProjectBranchDeletedEvent event) { final String projectName = event.getProjectName(); final String branchName = event.getBranchName(); Predicate<Page> predicate = new Predicate<Page>() { @Override public boolean apply(Page page) { return !page.getProjectName().equals(projectName) || !page.getBranchName().equals(branchName); } }; try { deleteFromAllSubscriptions(predicate, "delete branch " + projectName + "/" + branchName, event.getCurrentUser()); } catch (IOException e) { log.error(StringUtils.EMPTY, e); } catch (GitAPIException e) { log.error(StringUtils.EMPTY, e); } } }
SubscriptionStore { @Subscribe public void deleteProjectBranch(ProjectBranchDeletedEvent event) { final String projectName = event.getProjectName(); final String branchName = event.getBranchName(); Predicate<Page> predicate = new Predicate<Page>() { @Override public boolean apply(Page page) { return !page.getProjectName().equals(projectName) || !page.getBranchName().equals(branchName); } }; try { deleteFromAllSubscriptions(predicate, "delete branch " + projectName + "/" + branchName, event.getCurrentUser()); } catch (IOException e) { log.error(StringUtils.EMPTY, e); } catch (GitAPIException e) { log.error(StringUtils.EMPTY, e); } }  }
SubscriptionStore { @Subscribe public void deleteProjectBranch(ProjectBranchDeletedEvent event) { final String projectName = event.getProjectName(); final String branchName = event.getBranchName(); Predicate<Page> predicate = new Predicate<Page>() { @Override public boolean apply(Page page) { return !page.getProjectName().equals(projectName) || !page.getBranchName().equals(branchName); } }; try { deleteFromAllSubscriptions(predicate, "delete branch " + projectName + "/" + branchName, event.getCurrentUser()); } catch (IOException e) { log.error(StringUtils.EMPTY, e); } catch (GitAPIException e) { log.error(StringUtils.EMPTY, e); } }  void subscribe(String projectName, String branchName, String path, User user); void unsubscribe(String projectName, String branchName, String path, User user); boolean isSubscribed(String projectName, String branchName, String path, User user); Set<String> getSubscriberEmails(String projectName, String branchName, String path); @Subscribe void renameProject(ProjectRenamedEvent event); @Subscribe void deleteProject(ProjectDeletedEvent event); @Subscribe void deleteProjectBranch(ProjectBranchDeletedEvent event); @Subscribe void renameProjectBranch(ProjectBranchRenamedEvent event); }
SubscriptionStore { @Subscribe public void deleteProjectBranch(ProjectBranchDeletedEvent event) { final String projectName = event.getProjectName(); final String branchName = event.getBranchName(); Predicate<Page> predicate = new Predicate<Page>() { @Override public boolean apply(Page page) { return !page.getProjectName().equals(projectName) || !page.getBranchName().equals(branchName); } }; try { deleteFromAllSubscriptions(predicate, "delete branch " + projectName + "/" + branchName, event.getCurrentUser()); } catch (IOException e) { log.error(StringUtils.EMPTY, e); } catch (GitAPIException e) { log.error(StringUtils.EMPTY, e); } }  void subscribe(String projectName, String branchName, String path, User user); void unsubscribe(String projectName, String branchName, String path, User user); boolean isSubscribed(String projectName, String branchName, String path, User user); Set<String> getSubscriberEmails(String projectName, String branchName, String path); @Subscribe void renameProject(ProjectRenamedEvent event); @Subscribe void deleteProject(ProjectDeletedEvent event); @Subscribe void deleteProjectBranch(ProjectBranchDeletedEvent event); @Subscribe void renameProjectBranch(ProjectBranchRenamedEvent event);  }