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

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep<T>
      extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorAggregatorWizardStep<EntityLink<C>>
          extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractEntitySelectorAggregatorWizardStep<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<java.lang.Integer>, com.google.gwt.event.shared.EventHandler, NavigationListener, SourcesNavigationEvents, WizardStep
Direct Known Subclasses:
ImageSelectorAggregatorWizardStep

public class AttachmentSelectorAggregatorWizardStep<T extends EntityConfig>
extends AbstractEntitySelectorAggregatorWizardStep<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: AttachmentSelectorAggregatorWizardStep.java 31743 2010-10-13 01:20:32Z mflorea $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.xwiki.gwt.user.client.ui.wizard.NavigationListener
NavigationListener.NavigationDirection
 
Constructor Summary
AttachmentSelectorAggregatorWizardStep(boolean selectionLimitedToCurrentPage, WikiServiceAsync wikiService)
          Creates a new attachment selector wizard step.
 
Method Summary
protected  java.lang.String getRequiredStep()
          
protected  WizardStep getStepInstance(java.lang.String name)
          
protected  java.util.List<java.lang.String> getStepNames()
          
 java.lang.String getStepTitle()
          
 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.
 void setStepTitle(java.lang.String stepTitle)
          Sets the step title.
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractEntitySelectorAggregatorWizardStep
getWikiService, init
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorAggregatorWizardStep
addNavigationListener, display, getDefaultStepName, getDirectionName, getNextStep, getResult, getStep, onCancel, onDirection, onSelection, onSubmit, removeNavigationListener, selectTab
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractSelectorWizardStep
getData, getValidDirections, initializeSelection, setActive
 
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,
                                              WikiServiceAsync wikiService)
Creates a new attachment selector wizard step.

Parameters:
selectionLimitedToCurrentPage - true to limit the selection to the current page, false otherwise
wikiService - the service to be used to access the attachments
Method Detail

getRequiredStep

protected java.lang.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(java.lang.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 java.util.List<java.lang.String> getStepNames()

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

getStepTitle

public java.lang.String getStepTitle()

See Also:
WizardStep.getStepTitle()

setStepTitle

public void setStepTitle(java.lang.String stepTitle)
Sets the step title.

Parameters:
stepTitle - the new step title


Copyright © 2004-2010 XWiki. All Rights Reserved.