final String initialCategory,
final String format) {
final GuidedDecisionTable52 content = new GuidedDecisionTable52();
content.setTableFormat( guidedDecisionTableOptions.getTableFormat() );
final NewGuidedDecisionTableAssetConfiguration config = new NewGuidedDecisionTableAssetConfiguration( assetName,
packageName,
packageUUID,
description,
initialCategory,
format,
content );
//Command to save the asset
final Command cmdSave = new Command() {
public void execute() {
repositoryService.createNewRule( config,
createGenericCallbackForOk() );
}
};
//Command to check if the asset already exists, before delegating to save command
final Command cmdCheckBeforeSaving = new Command() {
public void execute() {
LoadingPopup.showMessage( Constants.INSTANCE.PleaseWaitDotDotDot() );
repositoryService.doesAssetExistInModule( config.getAssetName(),
config.getPackageName(),
createGenericCallBackForCheckingIfExists( cmdSave ) );
}
};
return cmdCheckBeforeSaving;