当前位置: 首页>>代码示例>>Java>>正文


Java DefaultErrorCallback类代码示例

本文整理汇总了Java中org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback的典型用法代码示例。如果您正苦于以下问题:Java DefaultErrorCallback类的具体用法?Java DefaultErrorCallback怎么用?Java DefaultErrorCallback使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DefaultErrorCallback类属于org.uberfire.ext.widgets.common.client.callbacks包,在下文中一共展示了DefaultErrorCallback类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onNameChange

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
public void onNameChange() {
    String name = view.getName().trim();
    model.setRepositoryName(name);
    if (!name.equals(view.getName())) {
        view.setName(name);
    }

    repositoryService.call(new RemoteCallback<Boolean>() {
                               @Override
                               public void callback(Boolean isValid) {
                                   if (isValid) {
                                       view.clearNameErrorMessage();
                                   } else {
                                       view.setNameErrorMessage(Constants.INSTANCE.InvalidRepositoryName());
                                   }
                                   if (isValid != isNameValid) {
                                       isNameValid = isValid;
                                       refreshRepositoryStructurePageStatus();
                                   }
                               }
                           },
                           new DefaultErrorCallback()).validateRepositoryName(model.getRepositoryName());
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:24,代码来源:RepositoryInfoPage.java

示例2: importRepository

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
public void importRepository() {
    final String repositoryUrl = view.getRepositoryURL();
    if (isEmpty(repositoryUrl)) {
        view.showError(view.getEmptyRepositoryURLValidationMessage());
        return;
    }

    view.showBusyIndicator(view.getLoadingMessage());
    libraryService.call((Set<ExampleProject> projects) -> {
                            view.hideBusyIndicator();
                            view.hide();
                            libraryPlaces.goToImportProjects(null);
                            importProjectsSetupEvent.fire(new ImportProjectsSetupEvent(projects));
                        },
                        new DefaultErrorCallback() {
                            @Override
                            public boolean error(final Message message,
                                                 final Throwable throwable) {
                                view.hideBusyIndicator();
                                view.showError(view.getNoProjectsToImportMessage());
                                return false;
                            }
                        }).getProjects(repositoryUrl,
                                       view.getUserName(),
                                       view.getPassword());
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:27,代码来源:ImportRepositoryPopUpPresenter.java

示例3: loadProjects

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
private void loadProjects(Space space,
                          String repository,
                          String branch) {
    sourceService.call((Collection<Module> modules) -> {
                           clearModules();
                           modules.forEach(module -> {
                               view.addModule(module.getModuleName());
                               currentModules.put(module.getModuleName(),
                                                  module);
                           });
                       },
                       new DefaultErrorCallback()
    ).getModules(space,
                 repository,
                 branch);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:17,代码来源:SourceConfigurationParamsPresenter.java

示例4: getLoadErrorCallback

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
private DefaultErrorCallback getLoadErrorCallback() {
    final CommandDrivenErrorCallback wrapped = getNoSuchFileExceptionErrorCallback();
    final DefaultErrorCallback callback = new DefaultErrorCallback() {
        @Override
        public boolean error(final Message message,
                             final Throwable throwable) {
            hideLoadingIndicator();
            return wrapped.error(message,
                                 throwable);
        }
    };
    return callback;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:14,代码来源:GuidedDecisionTableGraphEditorPresenter.java

示例5: getSaveErrorCallback

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
private DefaultErrorCallback getSaveErrorCallback() {
    return new HasBusyIndicatorDefaultErrorCallback(view) {
        @Override
        public boolean error(final Message message,
                             final Throwable throwable) {
            saveDocumentGraph();
            return super.error(message,
                               throwable);
        }
    };
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:12,代码来源:GuidedDecisionTableGraphEditorPresenter.java

示例6: fetchRepository

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
private void fetchRepository(final ExampleRepository selectedRepository) {
    examplesService.call(new RemoteCallback<Set<ExampleProject>>() {
                             @Override
                             public void callback(final Set<ExampleProject> projects) {
                                 activeView = projectsView;
                                 model.getProjects().clear();
                                 model.setSourceRepository(selectedRepository);

                                 final List<ExampleProject> sortedProjects = sort(projects);

                                 projectsView.setProjectsInRepository(sortedProjects);
                                 exampleProjects = sortedProjects;

                                 pageSelectedEvent.fire(new WizardPageSelectedEvent(ProjectPage.this));
                             }
                         },
                         new DefaultErrorCallback() {
                             @Override
                             public boolean error(final Message message,
                                                  final Throwable throwable) {
                                 model.setSourceRepository(null);
                                 model.getSelectedRepository().setUrlValid(false);
                                 return super.error(message,
                                                    throwable);
                             }
                         }).getProjects(selectedRepository);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:28,代码来源:ProjectPage.java

示例7: initialize

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
public void initialize( Settings settings ) {
    this.settings = settings;
    managementService.call( new RemoteCallback< DisplayerSettings >( ) {
        @Override
        public void callback( DisplayerSettings displayerSettings ) {
            initializeDisplayer( displayerSettings );
        }
    }, new DefaultErrorCallback( ) ).getDisplayerSettings( settings.dataSourceUuid( ),
            settings.schemaName( ), settings.tableName( ) );
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:11,代码来源:TableObjectViewer.java

示例8: getCreateErrorCallback

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
private ErrorCallback<?> getCreateErrorCallback() {
    return new DefaultErrorCallback() {
        @Override
        public boolean error(Message message,
                             Throwable throwable) {
            popupsUtil.showErrorPopup(translationService.format(
                    DataSourceManagementConstants.NewDataSourceDefWizard_DataSourceCreateErrorMessage,
                    buildOnCreateErrorMessage(throwable)));
            return false;
        }
    };
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:13,代码来源:NewDataSourceDefWizard.java

示例9: getCreateErrorCallback

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
private ErrorCallback<?> getCreateErrorCallback() {
    return new DefaultErrorCallback() {
        @Override
        public boolean error(Message message,
                             Throwable throwable) {
            popupsUtil.showErrorPopup(
                    translationService.format(DataSourceManagementConstants.NewDriverDefWizard_DriverCreateErrorMessage,
                                              buildOnCreateErrorMessage(throwable)));
            return false;
        }
    };
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:13,代码来源:NewDriverDefWizard.java

示例10: getLoadErrorCallback

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
private ErrorCallback<?> getLoadErrorCallback() {
    return new DefaultErrorCallback() {
        @Override
        public boolean error(Message message,
                             Throwable throwable) {
            popupsUtil.showErrorPopup(
                    translationService.format(
                            DataSourceManagementConstants.DataSourceSelector_DataSourcesLoadError));
            onClose();
            return false;
        }
    };
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:14,代码来源:DataSourceSelector.java

示例11: onStartup

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
@OnStartup
public void onStartup(final PlaceRequest placeRequest) {
    view.init(this);

    final String title = placeRequest.getParameter("title",
                                                   view.getTrySamplesLabel());
    view.setTitle(title);

    final String trySamples = placeRequest.getParameter("trySamples",
                                                        "false");
    final String repositoryUrl = placeRequest.getParameter("repositoryUrl",
                                                           null);

    if (repositoryUrl != null || Boolean.valueOf(trySamples)) {
        view.showBusyIndicator(view.getLoadingMessage());
        libraryService.call((Set<ExampleProject> projects) -> {
                                view.hideBusyIndicator();
                                setupProjects(projects);
                            },
                            new DefaultErrorCallback() {
                                @Override
                                public boolean error(final Message message,
                                                     final Throwable throwable) {
                                    view.hideBusyIndicator();
                                    showNoProjects();
                                    return super.error(message,
                                                       throwable);
                                }
                            }).getProjects(repositoryUrl);
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:32,代码来源:ImportWorkspaceProjectsScreen.java

示例12: isValidContainerName

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
public void isValidContainerName(final String containerName,
                                 final ValidatorCallback callback) {
    validationService.call(result -> {
                               if (Boolean.TRUE.equals(result)) {
                                   callback.onSuccess();
                               } else {
                                   callback.onFailure();
                               }
                           },
                           new DefaultErrorCallback()).isValidContainerName(containerName);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:12,代码来源:ProvisioningClientValidationService.java

示例13: selectProviderType

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
private void selectProviderType(final ProviderTypeKey providerTypeKey,
                                final String selectedProviderId) {
    provisioningScreensService.call((ProvidersInfo providersInfo) ->
                                            setupProviderType(providersInfo.getProviderType(),
                                                              providersInfo.getProvidersKey(),
                                                              selectedProviderId),
                                    new DefaultErrorCallback()
    ).getProvidersInfo(providerTypeKey);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:10,代码来源:ProvisioningManagementBrowserPresenter.java

示例14: onAddNewRuntime

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
protected void onAddNewRuntime(@Observes final AddNewRuntimeEvent event) {
    if (event.getProvider() != null) {
        runtimeService.call((Collection<PipelineKey> result) -> {
                                newDeployWizard.start(event.getProvider(),
                                                      result);
                            },
                            new DefaultErrorCallback()).getPipelines(event.getProvider().getKey().getProviderTypeKey());
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:10,代码来源:ProvisioningManagementPerspective.java

示例15: loadOUs

import org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback; //导入依赖的package包/类
private void loadOUs() {
    sourceService.call((Collection<String> ous) -> {
                           view.clearOrganizationUnits();
                           ous.forEach(view::addOrganizationUnit);
                           view.clearRepositories();
                           view.clearBranches();
                           clearModules();
                       },
                       new DefaultErrorCallback()
    ).getOrganizationUnits();
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:12,代码来源:SourceConfigurationParamsPresenter.java


注:本文中的org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。