@Test public void testOnServerTemplateUpdated() { final ServerTemplate serverTemplate = new ServerTemplate( "ServerTemplateKeyId", "ServerTemplateKeyName" ); presenter.onServerTemplateUpdated( new ServerTemplateUpdated( serverTemplate ) ); verify( view ).addTemplate( serverTemplate.getId(), serverTemplate.getName() ); }
public void onServerTemplateUpdated(@Observes final ServerTemplateUpdated serverTemplateUpdated) { if (serverTemplateUpdated != null && serverTemplateUpdated.getServerTemplate() != null) { final ServerTemplate serverTemplate = serverTemplateUpdated.getServerTemplate(); if (!serverTemplates.contains(serverTemplate.getId())) { addTemplate(serverTemplate); } } else { logger.warn("Illegal event argument."); } }
ServerNavigationPresenter { public void onServerTemplateUpdated(@Observes final ServerTemplateUpdated serverTemplateUpdated) { if (serverTemplateUpdated != null && serverTemplateUpdated.getServerTemplate() != null) { final ServerTemplate serverTemplate = serverTemplateUpdated.getServerTemplate(); if (!serverTemplates.contains(serverTemplate.getId())) { addTemplate(serverTemplate); } } else { logger.warn("Illegal event argument."); } } }
ServerNavigationPresenter { public void onServerTemplateUpdated(@Observes final ServerTemplateUpdated serverTemplateUpdated) { if (serverTemplateUpdated != null && serverTemplateUpdated.getServerTemplate() != null) { final ServerTemplate serverTemplate = serverTemplateUpdated.getServerTemplate(); if (!serverTemplates.contains(serverTemplate.getId())) { addTemplate(serverTemplate); } } else { logger.warn("Illegal event argument."); } } @Inject  ServerNavigationPresenter(final Logger logger,
                                     final View view,
                                     final Event<AddNewServerTemplate> addNewServerTemplateEvent,
                                     final Event<ServerTemplateListRefresh> serverTemplateListRefreshEvent,
                                     final Event<ServerTemplateSelected> serverTemplateSelectedEvent); }
ServerNavigationPresenter { public void onServerTemplateUpdated(@Observes final ServerTemplateUpdated serverTemplateUpdated) { if (serverTemplateUpdated != null && serverTemplateUpdated.getServerTemplate() != null) { final ServerTemplate serverTemplate = serverTemplateUpdated.getServerTemplate(); if (!serverTemplates.contains(serverTemplate.getId())) { addTemplate(serverTemplate); } } else { logger.warn("Illegal event argument."); } } @Inject  ServerNavigationPresenter(final Logger logger,
                                     final View view,
                                     final Event<AddNewServerTemplate> addNewServerTemplateEvent,
                                     final Event<ServerTemplateListRefresh> serverTemplateListRefreshEvent,
                                     final Event<ServerTemplateSelected> serverTemplateSelectedEvent); @PostConstruct void init(); View getView(); void setup(final ServerTemplateKey firstTemplate,
                      final Collection<ServerTemplateKey> serverTemplateKeys); void onSelect(@Observes final ServerTemplateSelected serverTemplateSelected); void onServerTemplateUpdated(@Observes final ServerTemplateUpdated serverTemplateUpdated); void select(final String id); void clear(); void refresh(); void newTemplate(); }
ServerNavigationPresenter { public void onServerTemplateUpdated(@Observes final ServerTemplateUpdated serverTemplateUpdated) { if (serverTemplateUpdated != null && serverTemplateUpdated.getServerTemplate() != null) { final ServerTemplate serverTemplate = serverTemplateUpdated.getServerTemplate(); if (!serverTemplates.contains(serverTemplate.getId())) { addTemplate(serverTemplate); } } else { logger.warn("Illegal event argument."); } } @Inject  ServerNavigationPresenter(final Logger logger,
                                     final View view,
                                     final Event<AddNewServerTemplate> addNewServerTemplateEvent,
                                     final Event<ServerTemplateListRefresh> serverTemplateListRefreshEvent,
                                     final Event<ServerTemplateSelected> serverTemplateSelectedEvent); @PostConstruct void init(); View getView(); void setup(final ServerTemplateKey firstTemplate,
                      final Collection<ServerTemplateKey> serverTemplateKeys); void onSelect(@Observes final ServerTemplateSelected serverTemplateSelected); void onServerTemplateUpdated(@Observes final ServerTemplateUpdated serverTemplateUpdated); void select(final String id); void clear(); void refresh(); void newTemplate();  }