class NewServerTemplateWizard extends AbstractMultiPageWizard {

    @Override
    public void complete() {
        final ServerTemplate newServerTemplate = buildServerTemplate();
        specManagementService.call( new RemoteCallback<Void>() {
            @Override
            public void callback( final Void o ) {
                notification.fire( new NotificationEvent( newTemplatePresenter.getView().getNewServerTemplateWizardSaveSuccess(), NotificationEvent.NotificationType.SUCCESS ) );
                clear();
                NewServerTemplateWizard.super.complete();
                serverTemplateListRefreshEvent.fire( new ServerTemplateListRefresh( newServerTemplate.getId() ) );
            }
        }, new ErrorCallback<Object>() {
            @Override
            public boolean error( final Object o,
                                  final Throwable throwable ) {
                notification.fire( new NotificationEvent( newTemplatePresenter.getView().getNewServerTemplateWizardSaveError(), NotificationEvent.NotificationType.ERROR ) );
                NewServerTemplateWizard.this.pageSelected( 0 );
                NewServerTemplateWizard.this.start();
                return false;
            }
        } ).saveServerTemplate( newServerTemplate );
    }

    public  NewServerTemplateWizard();
    @Inject public  NewServerTemplateWizard( final NewTemplatePresenter newTemplatePresenter,
                                    final NewContainerFormPresenter newContainerFormPresenter,
                                    final ProcessConfigPagePresenter processConfigPagePresenter,
                                    final Caller<SpecManagementService> specManagementService,
                                    final Event<NotificationEvent> notification,
                                    final Event<ServerTemplateListRefresh> serverTemplateListRefreshEvent );

}