net.kwfgrid.gwes
Class GenericWorkflowHandlerTable

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<String,GenericWorkflowHandler>
          extended by net.kwfgrid.gwes.GenericWorkflowHandlerTable
All Implemented Interfaces:
Serializable, Cloneable, Map<String,GenericWorkflowHandler>

public class GenericWorkflowHandlerTable
extends Hashtable<String,GenericWorkflowHandler>

A workflow handler table is an extended Hashtable with GenericWorkflowHandlers as values and their corresponding workflow instance identifiers as keys.

Version:
$Id: GenericWorkflowHandlerTable.java 1447 2010-12-10 11:27:08Z hoheisel $
Author:
Andreas Hoheisel (www.andreas-hoheisel.de)
See Also:
Serialized Form

Constructor Summary
GenericWorkflowHandlerTable()
           
 
Method Summary
 GenericWorkflowHandler get(String workflowID)
          Returns the handler to which the specified workflowID is mapped in this hashtable.
 GenericWorkflowHandler put(String workflowID, GenericWorkflowHandler handler)
          Maps the specified workflowID to the specified handler in this table.
 GenericWorkflowHandler remove(String workflowID)
          Removes the workflowID (and its corresponding handler) from this hashtable.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericWorkflowHandlerTable

public GenericWorkflowHandlerTable()
Method Detail

put

public final GenericWorkflowHandler put(String workflowID,
                                        GenericWorkflowHandler handler)
Maps the specified workflowID to the specified handler in this table. Neither the workflowID nor the handler can be null.

Specified by:
put in interface Map<String,GenericWorkflowHandler>
Overrides:
put in class Hashtable<String,GenericWorkflowHandler>
Parameters:
workflowID - The workflow identifier
handler - The workflow handler
Returns:
the previous workflow handler of the specified workflowID in this hashtable, or null if it did not have one.

get

public final GenericWorkflowHandler get(String workflowID)
                                 throws NoSuchWorkflowException
Returns the handler to which the specified workflowID is mapped in this hashtable. This method will never return null.

Parameters:
workflowID - a workflowID in the hashtable.
Returns:
the handler to which the workflowID is mapped in this hashtable;
Throws:
NullPointerException - if the workflowID is null.
NoSuchWorkflowException - if the workflowID is not mapped to any handler in this hashtable.
See Also:
put(String, GenericWorkflowHandler)

remove

public final GenericWorkflowHandler remove(String workflowID)
Removes the workflowID (and its corresponding handler) from this hashtable. This method does nothing if the workflowID is not in the hashtable.

Parameters:
workflowID - the workflowID that needs to be removed.
Returns:
the handler to which the workflowID had been mapped in this hashtable, or null if the workflowID did not have a mapping.
Throws:
NullPointerException - if the workflowID is null.


Copyright © 2005-2011 Fraunhofer FIRST. All Rights Reserved.