org.xwiki.gwt.wysiwyg.client.widget.wizard.util
Class AttachmentSelectorAggregatorWizardStep<T extends EntityConfig>

java.lang.Object
  extended by org.xwiki.gwt.user.client.ui.wizard.AbstractNavigationAwareWizardStep
      extended by org.xwiki.gwt.user.client.ui.wizard.AbstractInteractiveWizardStep
          extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep<T>
              extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorAggregatorWizardStep<EntityLink<T>>
                  extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AttachmentSelectorAggregatorWizardStep<T>
Type Parameters:
T - the type of entity link configuration managed by this wizard step
All Implemented Interfaces:
com.google.gwt.event.logical.shared.SelectionHandler<Integer>, com.google.gwt.event.shared.EventHandler, NavigationListener, SourcesNavigationEvents, WizardStep

public class AttachmentSelectorAggregatorWizardStep<T extends EntityConfig>
extends AbstractSelectorAggregatorWizardStep<EntityLink<T>>

Generic wizard step that allows the user to select an attachment to link to by aggregating a current page selector step and an "all pages" selector step.

Version:
$Id: 5b3fbd22a43d2f4f2ea972e27f894c04c37a7953 $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.xwiki.gwt.user.client.ui.wizard.NavigationListener
NavigationListener.NavigationDirection
 
Constructor Summary
AttachmentSelectorAggregatorWizardStep(boolean selectionLimitedToCurrentPage)
          Creates a new attachment selector wizard step.
 
Method Summary
protected  String getRequiredStep()
          
protected  WizardStep getStepInstance(String name)
          
protected  List<String> getStepNames()
          
 void setAllPagesSelector(WizardStep allPagesSelector)
          Sets the wizard step to be used for selecting an attachment from all pages.
 void setCurrentPageSelector(WizardStep currentPageSelector)
          Sets the wizard step to be used for selecting an attachment from the current page.
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorAggregatorWizardStep
addNavigationListener, getDefaultStepName, getDirectionName, getNextStep, getResult, getStep, init, onCancel, onDirection, onSelection, onSubmit, removeNavigationListener, selectTab
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep
getData, initializeSelection, setActive
 
Methods inherited from class org.xwiki.gwt.user.client.ui.wizard.AbstractInteractiveWizardStep
display, getStepTitle, isAutoSubmit, setStepTitle
 
Methods inherited from class org.xwiki.gwt.user.client.ui.wizard.AbstractNavigationAwareWizardStep
getValidDirections, setDirectionName, setNextStep, setValidDirections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentSelectorAggregatorWizardStep

public AttachmentSelectorAggregatorWizardStep(boolean selectionLimitedToCurrentPage)
Creates a new attachment selector wizard step.

Parameters:
selectionLimitedToCurrentPage - true to limit the selection to the current page, false otherwise
Method Detail

getRequiredStep

protected String getRequiredStep()

Overrides:
getRequiredStep in class AbstractSelectorAggregatorWizardStep<EntityLink<T extends EntityConfig>>
Returns:
the name of the step required to be loaded by the current created or edited element, if any, or null otherwise (if previous selection should be preserved). To be overwritten by subclasses to detect whether the data being handled requires the "all pages" step to be loaded or not.

getStepInstance

protected WizardStep getStepInstance(String name)

Specified by:
getStepInstance in class AbstractSelectorAggregatorWizardStep<EntityLink<T extends EntityConfig>>
Parameters:
name - the name of the step to initialize
Returns:
an instance of the step recognized by the passed name
See Also:
AbstractSelectorAggregatorWizardStep.getStepInstance(String)

setCurrentPageSelector

public void setCurrentPageSelector(WizardStep currentPageSelector)
Sets the wizard step to be used for selecting an attachment from the current page.

Parameters:
currentPageSelector - the new current page attachment selector

setAllPagesSelector

public void setAllPagesSelector(WizardStep allPagesSelector)
Sets the wizard step to be used for selecting an attachment from all pages.

Parameters:
allPagesSelector - the new all pages attachment selector

getStepNames

protected List<String> getStepNames()

Specified by:
getStepNames in class AbstractSelectorAggregatorWizardStep<EntityLink<T extends EntityConfig>>
Returns:
the list of all step names
See Also:
AbstractSelectorAggregatorWizardStep.getStepNames()


Copyright © 2004-2012 XWiki. All Rights Reserved.