net.refractions.udig.catalog.ui.workflow
Class EndConnectionState

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

public class EndConnectionState
extends Workflow.State


Constructor Summary
EndConnectionState(UDIGConnectionFactoryDescriptor descriptor, boolean validateServices)
          Create instance
 
Method Summary
 UDIGConnectionFactory getConnectionFactory()
           
 UDIGConnectionFactoryDescriptor getDescriptor()
           
 java.util.Map<IService,java.lang.Throwable> getErrors()
           
 java.lang.String getName()
           
 java.util.Map<java.lang.String,java.io.Serializable> getParams()
          52¡North added method return the parameters for this state
 java.util.Set<IService> getServices()
           
 boolean hasNext()
          52¡North added return true, if there are no errors and there is a successor state(which can be the same state)
 boolean isValidateState()
           
 Workflow.State next()
          52¡North changed Method returns null if there is not a succesor state.
 boolean run(IProgressMonitor monitor)
          Performs any "hard" work.
 void setNextState(EndConnectionState state)
          52¡North added
 void setParams(java.util.Map<java.lang.String,java.io.Serializable> params)
           
 void setURLs(java.util.Set<java.net.URL> urls)
           
 void setValidateState(boolean validateState)
           
 
Methods inherited from class net.refractions.udig.catalog.ui.workflow.Workflow.State
getPreviousState, getWorkflow, init, setPrevious, setWorkflow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndConnectionState

public EndConnectionState(UDIGConnectionFactoryDescriptor descriptor,
                          boolean validateServices)
Create instance

Parameters:
descriptor - The connection factory descriptor to use in state
validateServices - indicates whether the service should be probed for its members and metadata.
Method Detail

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

hasNext

public boolean hasNext()
52¡North added return true, if there are no errors and there is a successor state(which can be the same state)

Overrides:
hasNext in class Workflow.State
Returns:
true if the state can create a new state, otherwise false.

next

public Workflow.State next()
52¡North changed Method returns null if there is not a succesor state. Method returns a ConnectionErrorState, if any errors have occured. Method returns a State, if there are no errors and there is a successor state

Overrides:
next in class Workflow.State
Returns:
A new state which is to become the next active state, otherwise null.

getDescriptor

public UDIGConnectionFactoryDescriptor getDescriptor()

getConnectionFactory

public UDIGConnectionFactory getConnectionFactory()

getServices

public java.util.Set<IService> getServices()

setParams

public void setParams(java.util.Map<java.lang.String,java.io.Serializable> params)

setURLs

public void setURLs(java.util.Set<java.net.URL> urls)

getName

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

isValidateState

public boolean isValidateState()

setValidateState

public void setValidateState(boolean validateState)

getErrors

public java.util.Map<IService,java.lang.Throwable> getErrors()

setNextState

public void setNextState(EndConnectionState state)
52¡North added

Parameters:
state -

getParams

public java.util.Map<java.lang.String,java.io.Serializable> getParams()
52¡North added method return the parameters for this state