本文整理汇总了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());
}
示例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());
}
示例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);
}
示例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;
}
示例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);
}
};
}
示例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);
}
示例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( ) );
}
示例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;
}
};
}
示例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;
}
};
}
示例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;
}
};
}
示例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);
}
}
示例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);
}
示例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);
}
示例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());
}
}
示例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();
}