org.drools.guvnor.client.widgets.wizards.assets
Class AbstractNewAssetWizard<T extends PortableObject>

java.lang.Object
  extended by org.drools.guvnor.client.widgets.wizards.AbstractWizard<NewAssetWizardContext>
      extended by org.drools.guvnor.client.widgets.wizards.assets.AbstractNewAssetWizard<T>
All Implemented Interfaces:
Wizard
Direct Known Subclasses:
NewGuidedDecisionTableWizard

public abstract class AbstractNewAssetWizard<T extends PortableObject>
extends AbstractWizard<NewAssetWizardContext>

A Wizard representing new assets


Field Summary
 
Fields inherited from class org.drools.guvnor.client.widgets.wizards.AbstractWizard
clientFactory, context, eventBus, presenter
 
Constructor Summary
AbstractNewAssetWizard(ClientFactory clientFactory, com.google.gwt.event.shared.EventBus eventBus, NewAssetWizardContext context, WizardActivityView.Presenter presenter)
           
 
Method Summary
protected  GenericCallback<String> createCheckedInCallback()
          Call-back following check-in of the updated Asset.
protected  GenericCallback<String> createCreateAssetCallback(T content)
          Call-back following creation of the new Asset.
protected  GenericCallback<RuleAsset> createSetContentCallback(T content)
          Call-back following retrieval of the new Asset from the Repository.
protected  void openEditor(String uuid)
          Open an Asset in its corresponding editor
protected  void save(String assetName, String description, String initialCategory, String packageName, String format, T content)
          Save the asset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.drools.guvnor.client.widgets.wizards.Wizard
complete, getPages, getPageWidget, getPreferredHeight, getPreferredWidth, getTitle, isComplete
 

Constructor Detail

AbstractNewAssetWizard

public AbstractNewAssetWizard(ClientFactory clientFactory,
                              com.google.gwt.event.shared.EventBus eventBus,
                              NewAssetWizardContext context,
                              WizardActivityView.Presenter presenter)
Method Detail

save

protected void save(String assetName,
                    String description,
                    String initialCategory,
                    String packageName,
                    String format,
                    T content)
Save the asset. This is a three-phase solution; firstly a new Asset is created in the Repository, then it is retrieved and its content updated before being checked back into the Repository. Hence a new Asset created by a Wizard will have two initial versions: one corresponding to the creation and another corresponding to the checkin of content.

Parameters:
assetName -
description -
initialCategory -
packageName -
format -
content -

createCreateAssetCallback

protected GenericCallback<String> createCreateAssetCallback(T content)
Call-back following creation of the new Asset. Upon successful creation the new Asset is loaded in order for its content to be updated

Parameters:
content -
Returns:

createSetContentCallback

protected GenericCallback<RuleAsset> createSetContentCallback(T content)
Call-back following retrieval of the new Asset from the Repository. Upon successful retrieval the new Asset has its content updated and it is checked back into the Repository

Parameters:
content -
Returns:

createCheckedInCallback

protected GenericCallback<String> createCheckedInCallback()
Call-back following check-in of the updated Asset. Upon successful check-in the new Asset is loaded into its corresponding editor and the Wizard closed

Returns:

openEditor

protected void openEditor(String uuid)
Open an Asset in its corresponding editor

Parameters:
uuid -


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.