@Test public void testInit() { presenter.init(); final ContentChangeHandler contentChangeHandler = mock(ContentChangeHandler.class); presenter.addContentChangeHandler(contentChangeHandler); view.setVersion("1.0"); view.setArtifactId("artifact"); view.setGroupId("group"); verify(view).init(presenter); verify(wizardPageStatusChangeEvent, times(3)).fire(any(WizardPageStatusChangeEvent.class)); verify(contentChangeHandler, times(3)).onContentChange(); }
@PostConstruct public void init() { view.init(this); view.addContentChangeHandler(new ContentChangeHandler() { @Override public void onContentChange() { wizardPageStatusChangeEvent.fire(new WizardPageStatusChangeEvent(NewContainerFormPresenter.this)); } }); }
NewContainerFormPresenter implements WizardPage { @PostConstruct public void init() { view.init(this); view.addContentChangeHandler(new ContentChangeHandler() { @Override public void onContentChange() { wizardPageStatusChangeEvent.fire(new WizardPageStatusChangeEvent(NewContainerFormPresenter.this)); } }); } }
NewContainerFormPresenter implements WizardPage { @PostConstruct public void init() { view.init(this); view.addContentChangeHandler(new ContentChangeHandler() { @Override public void onContentChange() { wizardPageStatusChangeEvent.fire(new WizardPageStatusChangeEvent(NewContainerFormPresenter.this)); } }); } @Inject  NewContainerFormPresenter(final Logger logger,
                                     final View view,
                                     final ManagedInstance<ArtifactListWidgetPresenter> artifactListWidgetPresenterProvider,
                                     final Caller<M2RepoService> m2RepoService,
                                     final Caller<SpecManagementService> specManagementService,
                                     final Event<WizardPageStatusChangeEvent> wizardPageStatusChangeEvent); }
NewContainerFormPresenter implements WizardPage { @PostConstruct public void init() { view.init(this); view.addContentChangeHandler(new ContentChangeHandler() { @Override public void onContentChange() { wizardPageStatusChangeEvent.fire(new WizardPageStatusChangeEvent(NewContainerFormPresenter.this)); } }); } @Inject  NewContainerFormPresenter(final Logger logger,
                                     final View view,
                                     final ManagedInstance<ArtifactListWidgetPresenter> artifactListWidgetPresenterProvider,
                                     final Caller<M2RepoService> m2RepoService,
                                     final Caller<SpecManagementService> specManagementService,
                                     final Event<WizardPageStatusChangeEvent> wizardPageStatusChangeEvent); @PostConstruct void init(); void addContentChangeHandler(final ContentChangeHandler contentChangeHandler); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); @Override void initialise(); @Override void prepareView(); Mode getMode(); @Override Widget asWidget(); void clear(); boolean isContainerNameValid(); boolean isGroupIdValid(); boolean isArtifactIdValid(); boolean isVersionValid(); boolean isArtifactSupportedByServer(); boolean isValid(); boolean isEmpty(); ServerTemplate getServerTemplate(); void setServerTemplate(final ServerTemplate serverTemplate); ContainerSpec buildContainerSpec(final String serverTemplateId,
                                            final Map<Capability, ContainerConfig> configs); View getView(); void showBusyIndicator(String deploymentId); void hideBusyIndicator(); GAV getCurrentGAV(); }
NewContainerFormPresenter implements WizardPage { @PostConstruct public void init() { view.init(this); view.addContentChangeHandler(new ContentChangeHandler() { @Override public void onContentChange() { wizardPageStatusChangeEvent.fire(new WizardPageStatusChangeEvent(NewContainerFormPresenter.this)); } }); } @Inject  NewContainerFormPresenter(final Logger logger,
                                     final View view,
                                     final ManagedInstance<ArtifactListWidgetPresenter> artifactListWidgetPresenterProvider,
                                     final Caller<M2RepoService> m2RepoService,
                                     final Caller<SpecManagementService> specManagementService,
                                     final Event<WizardPageStatusChangeEvent> wizardPageStatusChangeEvent); @PostConstruct void init(); void addContentChangeHandler(final ContentChangeHandler contentChangeHandler); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); @Override void initialise(); @Override void prepareView(); Mode getMode(); @Override Widget asWidget(); void clear(); boolean isContainerNameValid(); boolean isGroupIdValid(); boolean isArtifactIdValid(); boolean isVersionValid(); boolean isArtifactSupportedByServer(); boolean isValid(); boolean isEmpty(); ServerTemplate getServerTemplate(); void setServerTemplate(final ServerTemplate serverTemplate); ContainerSpec buildContainerSpec(final String serverTemplateId,
                                            final Map<Capability, ContainerConfig> configs); View getView(); void showBusyIndicator(String deploymentId); void hideBusyIndicator(); GAV getCurrentGAV(); static final String SNAPSHOT; }