use of org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback in project drools-wb by kiegroup.
the class NewGuidedRuleHandler method create.
@Override
public void create(final Package pkg, final String baseFileName, final NewResourcePresenter presenter) {
final RuleModel ruleModel = new RuleModel();
final boolean useDSL = useDSLCheckbox.getValue();
final ClientResourceType resourceType = (useDSL ? resourceTypeDSLR : resourceTypeDRL);
ruleModel.name = baseFileName;
busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Saving());
service.call(getSuccessCallback(presenter), new HasBusyIndicatorDefaultErrorCallback(busyIndicatorView)).create(pkg.getPackageMainResourcesPath(), buildFileName(baseFileName, resourceType), ruleModel, "");
}
use of org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback in project drools-wb by kiegroup.
the class NewGuidedScoreCardHandler method create.
@Override
public void create(final Package pkg, final String baseFileName, final NewResourcePresenter presenter) {
final ScoreCardModel model = new ScoreCardModel();
model.setName(baseFileName);
model.setPackageName(pkg.getPackageName());
busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Saving());
scoreCardService.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 kie-wb-common by kiegroup.
the class OrganizationalUnitPopUpPresenter method saveCreation.
void saveCreation(final String name, final String defaultGroupId, final String owner) {
final Command saveCommand = () -> {
final Collection<Repository> repositories = new ArrayList<>();
final List<String> contributors = contributorsManagementPresenter.getSelectedContributorsUserNames();
final RemoteCallback<OrganizationalUnit> successCallback = (OrganizationalUnit newOrganizationalUnit) -> {
afterCreateOrganizationalUnitEvent.fire(new AfterCreateOrganizationalUnitEvent(newOrganizationalUnit));
view.hideBusyIndicator();
notificationEvent.fire(new NotificationEvent(view.getSaveSuccessMessage(), NotificationEvent.NotificationType.SUCCESS));
view.hide();
};
final HasBusyIndicatorDefaultErrorCallback errorCallback = new HasBusyIndicatorDefaultErrorCallback(view);
organizationalUnitService.call(successCallback, errorCallback).createOrganizationalUnit(name, owner, defaultGroupId, repositories, contributors);
};
validateDuplicatedOrganizationalUnit(name, saveCommand);
}
use of org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback in project kie-wb-common by kiegroup.
the class DataSourceDefEditor method _save.
/**
* Performs the formal save of the data source.
*/
protected void _save() {
savePopUpPresenter.show(versionRecordManager.getCurrentPath(), new ParameterizedCommand<String>() {
@Override
public void execute(final String commitMessage) {
editorService.call(getSaveSuccessCallback(getContent().hashCode()), new HasBusyIndicatorDefaultErrorCallback(view)).save(versionRecordManager.getCurrentPath(), getContent(), commitMessage);
}
});
concurrentUpdateSessionInfo = null;
}
use of org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback in project kie-wb-common by kiegroup.
the class DriverDefEditor method _save.
/**
* Performs the formal save of the driver.
*/
protected void _save() {
savePopUpPresenter.show(versionRecordManager.getCurrentPath(), new ParameterizedCommand<String>() {
@Override
public void execute(final String commitMessage) {
editorService.call(getSaveSuccessCallback(getContent().hashCode()), new HasBusyIndicatorDefaultErrorCallback(view)).save(versionRecordManager.getCurrentPath(), getContent(), commitMessage);
}
});
concurrentUpdateSessionInfo = null;
}
Aggregations