Search in sources :

Example 1 with ClientResourceType

use of org.uberfire.client.workbench.type.ClientResourceType in project drools-wb by kiegroup.

the class NewDrlTextHandler method getResourceType.

@Override
public ResourceTypeDefinition getResourceType() {
    final boolean useDSL = useDSLCheckbox.getValue();
    final ClientResourceType resourceType = (useDSL ? resourceTypeDSLR : resourceTypeDRL);
    return resourceType;
}
Also used : ClientResourceType(org.uberfire.client.workbench.type.ClientResourceType)

Example 2 with ClientResourceType

use of org.uberfire.client.workbench.type.ClientResourceType in project drools-wb by kiegroup.

the class NewGuidedRuleHandler method getResourceType.

@Override
public ResourceTypeDefinition getResourceType() {
    final boolean useDSL = useDSLCheckbox.getValue();
    final ClientResourceType resourceType = (useDSL ? resourceTypeDSLR : resourceTypeDRL);
    return resourceType;
}
Also used : ClientResourceType(org.uberfire.client.workbench.type.ClientResourceType)

Example 3 with ClientResourceType

use of org.uberfire.client.workbench.type.ClientResourceType 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, "");
}
Also used : HasBusyIndicatorDefaultErrorCallback(org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback) ClientResourceType(org.uberfire.client.workbench.type.ClientResourceType) RuleModel(org.drools.workbench.models.datamodel.rule.RuleModel)

Example 4 with ClientResourceType

use of org.uberfire.client.workbench.type.ClientResourceType in project drools-wb by kiegroup.

the class DecisionTableXLSEditorPresenter method onStartup.

@OnStartup
public void onStartup(final ObservablePath path, final PlaceRequest place) {
    ClientResourceType type = getType(path);
    super.init(path, place, type);
    view.init(this);
    view.setupUploadWidget(type);
}
Also used : ClientResourceType(org.uberfire.client.workbench.type.ClientResourceType) OnStartup(org.uberfire.lifecycle.OnStartup)

Example 5 with ClientResourceType

use of org.uberfire.client.workbench.type.ClientResourceType in project drools-wb by kiegroup.

the class NewDrlTextHandler method create.

@Override
public void create(final Package pkg, final String baseFileName, final NewResourcePresenter presenter) {
    final boolean useDSL = useDSLCheckbox.getValue();
    final ClientResourceType resourceType = (useDSL ? resourceTypeDSLR : resourceTypeDRL);
    busyIndicatorView.showBusyIndicator(CommonConstants.INSTANCE.Saving());
    drlTextService.call(getSuccessCallback(presenter), new HasBusyIndicatorDefaultErrorCallback(busyIndicatorView)).create(pkg.getPackageMainResourcesPath(), buildFileName(baseFileName, resourceType), "", "");
}
Also used : HasBusyIndicatorDefaultErrorCallback(org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback) ClientResourceType(org.uberfire.client.workbench.type.ClientResourceType)

Aggregations

ClientResourceType (org.uberfire.client.workbench.type.ClientResourceType)5 HasBusyIndicatorDefaultErrorCallback (org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback)2 RuleModel (org.drools.workbench.models.datamodel.rule.RuleModel)1 OnStartup (org.uberfire.lifecycle.OnStartup)1