@Test @Ignore public void renameProject() { }
@Subscribe public void renameProject(ProjectRenamedEvent event) { final String projectName = event.getProjectName(); final String newProjectName = event.getNewProjectName(); Function<Page, Page> function = new Function<Page, Page>() { @Override public Page apply(Page page) { return page.getProjectName().equals(projectName) ? new Page(newProjectName, page.getBranchName(), page.getPath()) : page; } }; try { transformAllSubscriptions(function, "rename project " + projectName + " to " + newProjectName, event.getCurrentUser()); } catch (IOException e) { log.error(StringUtils.EMPTY, e); } catch (GitAPIException e) { log.error(StringUtils.EMPTY, e); } }
SubscriptionStore { @Subscribe public void renameProject(ProjectRenamedEvent event) { final String projectName = event.getProjectName(); final String newProjectName = event.getNewProjectName(); Function<Page, Page> function = new Function<Page, Page>() { @Override public Page apply(Page page) { return page.getProjectName().equals(projectName) ? new Page(newProjectName, page.getBranchName(), page.getPath()) : page; } }; try { transformAllSubscriptions(function, "rename project " + projectName + " to " + newProjectName, event.getCurrentUser()); } catch (IOException e) { log.error(StringUtils.EMPTY, e); } catch (GitAPIException e) { log.error(StringUtils.EMPTY, e); } } }
SubscriptionStore { @Subscribe public void renameProject(ProjectRenamedEvent event) { final String projectName = event.getProjectName(); final String newProjectName = event.getNewProjectName(); Function<Page, Page> function = new Function<Page, Page>() { @Override public Page apply(Page page) { return page.getProjectName().equals(projectName) ? new Page(newProjectName, page.getBranchName(), page.getPath()) : page; } }; try { transformAllSubscriptions(function, "rename project " + projectName + " to " + newProjectName, event.getCurrentUser()); } catch (IOException e) { log.error(StringUtils.EMPTY, e); } catch (GitAPIException e) { log.error(StringUtils.EMPTY, e); } }  }
SubscriptionStore { @Subscribe public void renameProject(ProjectRenamedEvent event) { final String projectName = event.getProjectName(); final String newProjectName = event.getNewProjectName(); Function<Page, Page> function = new Function<Page, Page>() { @Override public Page apply(Page page) { return page.getProjectName().equals(projectName) ? new Page(newProjectName, page.getBranchName(), page.getPath()) : page; } }; try { transformAllSubscriptions(function, "rename project " + projectName + " to " + newProjectName, 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 renameProject(ProjectRenamedEvent event) { final String projectName = event.getProjectName(); final String newProjectName = event.getNewProjectName(); Function<Page, Page> function = new Function<Page, Page>() { @Override public Page apply(Page page) { return page.getProjectName().equals(projectName) ? new Page(newProjectName, page.getBranchName(), page.getPath()) : page; } }; try { transformAllSubscriptions(function, "rename project " + projectName + " to " + newProjectName, 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);  }