當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。