final TableFormat tableFormat,
final String description,
final String initialCategory,
final String format) {
final NewGuidedDecisionTableAssetConfiguration config = new NewGuidedDecisionTableAssetConfiguration( assetName,
packageName,
packageUUID,
tableFormat,
description,
initialCategory,
format );
//Command to save the asset
final Command cmdSave = new Command() {
public void execute() {
RepositoryServiceFactory.getService().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() );
RepositoryServiceFactory.getService().doesAssetExistInModule( config.getAssetName(),
config.getPackageName(),
createGenericCallBackForCheckingIfExists( cmdSave ) );
}
};
return cmdCheckBeforeSaving;