use of org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback in project kie-wb-common by kiegroup.
the class ImportPresenter method ok.
public void ok() {
final List<ExampleProject> projects = projectWidgetsByName.entrySet().stream().filter(p -> p.getValue().isSelected()).map(Map.Entry::getKey).collect(Collectors.toList());
if (projects.isEmpty()) {
notificationEvent.fire(new NotificationEvent(view.getNoProjectsSelectedMessage(), NotificationEvent.NotificationType.ERROR));
return;
}
view.showBusyIndicator(view.getImportingMessage());
importProjects(projects, event -> {
view.hideBusyIndicator();
notificationEvent.fire(new NotificationEvent(view.getImportProjectsSuccessMessage(), NotificationEvent.NotificationType.SUCCESS));
projectContextChangeEvent.fire(event);
}, new HasBusyIndicatorDefaultErrorCallback(view));
}
use of org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback in project kie-wb-common by kiegroup.
the class NewJavaFileTextHandler method create.
@Override
public void create(final org.guvnor.common.services.project.model.Package pkg, final String baseFileName, final NewResourcePresenter presenter) {
busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Saving());
Map<String, Object> params = new HashMap<String, Object>();
for (ResourceOptions options : resourceOptions) {
params.putAll(options.getOptions());
}
dataModelerService.call(getSuccessCallback(presenter), new HasBusyIndicatorDefaultErrorCallback(busyIndicatorView)).createJavaFile(pkg.getPackageMainSrcPath(), buildFileName(baseFileName, resourceType), "", params);
}
use of org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback in project drools-wb by kiegroup.
the class NewGuidedDecisionTableHandler method createEmptyDecisionTable.
private void createEmptyDecisionTable(final Path contextPath, final String baseFileName) {
final GuidedDecisionTable52 model = new GuidedDecisionTable52();
model.setTableFormat(options.getTableFormat());
model.setHitPolicy(options.getHitPolicy());
if (GuidedDecisionTable52.HitPolicy.RESOLVED_HIT.equals(options.getHitPolicy())) {
final MetadataCol52 metadataCol52 = new MetadataCol52();
metadataCol52.setMetadata(GuidedDecisionTable52.HitPolicy.RESOLVED_HIT_METADATA_NAME);
model.getMetadataCols().add(metadataCol52);
}
model.setTableName(baseFileName);
final RemoteCallback<Path> onSaveSuccessCallback = getSuccessCallback(newResourcePresenter);
busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Saving());
service.call((Path path) -> {
busyIndicatorView.hideBusyIndicator();
onSaveSuccessCallback.callback(path);
}, new HasBusyIndicatorDefaultErrorCallback(busyIndicatorView)).create(contextPath, buildFileName(baseFileName, resourceType), model, "");
}
use of org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback in project drools-wb by kiegroup.
the class NewGlobalHandler method create.
@Override
public void create(final Package pkg, final String baseFileName, final NewResourcePresenter presenter) {
final GlobalsModel model = new GlobalsModel();
busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Saving());
globalsService.call(getSuccessCallback(presenter), new HasBusyIndicatorDefaultErrorCallback(busyIndicatorView)).create(pkg.getPackageMainResourcesPath(), buildFileName(baseFileName, resourceType), model, "");
}
use of org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback in project drools-wb by kiegroup.
the class NewGuidedRuleTemplateHandler method create.
@Override
public void create(final Package pkg, final String baseFileName, final NewResourcePresenter presenter) {
final TemplateModel templateModel = new TemplateModel();
templateModel.name = baseFileName;
busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Saving());
service.call(getSuccessCallback(presenter), new HasBusyIndicatorDefaultErrorCallback(busyIndicatorView)).create(pkg.getPackageMainResourcesPath(), buildFileName(baseFileName, resourceType), templateModel, "");
}
Aggregations