net.refractions.udig.catalog.ui.export
Class ExportResourceSelectionState

java.lang.Object
  extended by net.refractions.udig.catalog.ui.workflow.Workflow.State
      extended by net.refractions.udig.catalog.ui.export.ExportResourceSelectionState

public class ExportResourceSelectionState
extends Workflow.State


Constructor Summary
ExportResourceSelectionState()
           
ExportResourceSelectionState(ISelection selection)
          The selection to save.
 
Method Summary
protected  java.util.Collection<Data> convertToData(java.lang.Object object)
          Creates data objects from the object.
 java.util.List<Data> getExportData()
           
 java.lang.String getExportDir()
           
 java.util.List<Data> getLayers()
           
 java.lang.String getName()
           
 void init(IProgressMonitor monitor)
          Initialize the state.
 boolean run(IProgressMonitor monitor)
          Performs any "hard" work.
 void setExportDir(java.lang.String text)
           
 void setSelectedLayers(java.util.List<Data> selectedLayers)
           
 
Methods inherited from class net.refractions.udig.catalog.ui.workflow.Workflow.State
getPreviousState, getWorkflow, hasNext, next, setPrevious, setWorkflow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportResourceSelectionState

public ExportResourceSelectionState(ISelection selection)
The selection to save. Expected value is a map or layers

Parameters:
selection -

ExportResourceSelectionState

public ExportResourceSelectionState()
Method Detail

getLayers

public java.util.List<Data> getLayers()

getExportData

public java.util.List<Data> getExportData()

setSelectedLayers

public void setSelectedLayers(java.util.List<Data> selectedLayers)

init

public void init(IProgressMonitor monitor)
          throws java.io.IOException
Description copied from class: Workflow.State
Initialize the state. This is the second method in the lifecycle of the state. It is called after #setPrevious(). If the state needs to "seed" itself with any context, that should occur here.

Overrides:
init in class Workflow.State
Throws:
java.io.IOException

convertToData

protected java.util.Collection<Data> convertToData(java.lang.Object object)
                                            throws java.io.IOException
Creates data objects from the object. The object was part of the selection

Parameters:
object - the object to export feature from.
Returns:
a collection of data objects.
Throws:
java.io.IOException

run

public boolean run(IProgressMonitor monitor)
            throws java.io.IOException
Description copied from class: Workflow.State
Performs any "hard" work. This method is provided is provided for states which have to block to get work done. For instance, making a connection to a remote service. This method returns a boolean which signals wether the state was able to get the work done.

Overrides:
run in class Workflow.State
Parameters:
monitor - A progress monitor.
Returns:
True if the state was able to complete its job, otherwise false.
Throws:
java.io.IOException

getName

public java.lang.String getName()
Specified by:
getName in class Workflow.State

getExportDir

public java.lang.String getExportDir()

setExportDir

public void setExportDir(java.lang.String text)