ks.client.gamefactory
Class GameFactory

java.lang.Object
  |
  +--ks.client.gamefactory.GameFactory

public class GameFactory
extends java.lang.Object

Factory for creating Solitaire Game objects on demand.

Ultimately, this will be extended to create solitaire games directly from a Jar file, instead of by name.

Creation date: (10/16/01 9:47:57 PM)


Field Summary
protected  java.util.Vector provided
          provided set of interfaces.
protected  java.util.Vector required
          required set of interfaces.
 
Constructor Summary
GameFactory()
          Empty GameFactory constructor needed for Block components.
 
Method Summary
 boolean activate()
          Nothing to do here, really.
 boolean connect(IBlock block, java.lang.String interfaceName)
           
 void customize(java.util.Hashtable properties)
           
 void deactivate()
          Nothing to do here.
 Solitaire generateGame(java.lang.String type)
          Given a game Type, this generates a Solitaire object for it.
 ITableGUI generateWindow(java.lang.String userName, Table tbl, Solitaire theGame)
          Return the working TableGUI entity seen by the users when playing
 java.lang.String getEntry(java.lang.String dirName, java.lang.String pluginName)
          Delegate to factory.
 java.util.Enumeration getProvided()
          We expose ProcessCommand interface.
 java.util.Enumeration getRequired()
          We expose ProcessCommand and IOutput required interfaces.
 java.util.Enumeration plugins(java.lang.String dirName)
          Delegate to factory.
 void registerPlugin(java.lang.String dirName, java.lang.String pluginName)
          Delegate to factory.
 void removePluginList(java.lang.String dirName, java.lang.String pluginName)
          Delegate to factory.
 void setEntry(java.lang.String dirName, java.lang.String pluginName, java.lang.String string)
          Delegate to factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

provided

protected java.util.Vector provided
provided set of interfaces.


required

protected java.util.Vector required
required set of interfaces.

Constructor Detail

GameFactory

public GameFactory()
Empty GameFactory constructor needed for Block components.

Method Detail

generateGame

public Solitaire generateGame(java.lang.String type)
Given a game Type, this generates a Solitaire object for it.

Should work under both jdk1.2 and 1.3 Creation date: (10/16/01 9:48:40 PM)

Parameters:
type - java.lang.String
Returns:
ks.games.Solitaire

customize

public void customize(java.util.Hashtable properties)
               throws java.lang.Exception
java.lang.Exception

activate

public boolean activate()
                 throws java.lang.Exception
Nothing to do here, really.

java.lang.Exception
See Also:
edu.wpi.cs.cs509.cmi.interfaces.IBlock#activate()

connect

public boolean connect(IBlock block,
                       java.lang.String interfaceName)
                throws java.lang.Exception
java.lang.Exception

deactivate

public void deactivate()
                throws java.lang.Exception
Nothing to do here.

java.lang.Exception
See Also:
edu.wpi.cs.cs509.cmi.interfaces.IBlock#deactivate()

getProvided

public java.util.Enumeration getProvided()
We expose ProcessCommand interface.

See Also:
edu.wpi.cs.cs509.cmi.interfaces.IBlock#getProvided()

getRequired

public java.util.Enumeration getRequired()
We expose ProcessCommand and IOutput required interfaces.

See Also:
edu.wpi.cs.cs509.cmi.interfaces.IBlock#getRequired()

registerPlugin

public void registerPlugin(java.lang.String dirName,
                           java.lang.String pluginName)
Delegate to factory.


setEntry

public void setEntry(java.lang.String dirName,
                     java.lang.String pluginName,
                     java.lang.String string)
Delegate to factory.


getEntry

public java.lang.String getEntry(java.lang.String dirName,
                                 java.lang.String pluginName)
Delegate to factory.


removePluginList

public void removePluginList(java.lang.String dirName,
                             java.lang.String pluginName)
Delegate to factory.


plugins

public java.util.Enumeration plugins(java.lang.String dirName)
Delegate to factory.


generateWindow

public ITableGUI generateWindow(java.lang.String userName,
                                Table tbl,
                                Solitaire theGame)
Return the working TableGUI entity seen by the users when playing