org.moyoman.module
Class ModeConfigTool

java.lang.Object
  |
  +--org.moyoman.module.ModeConfigTool

public class ModeConfigTool
extends Object

This application provides the user with a user interface for editing the mode configuration files. Specifically, the user defined mode list can be edited.


Field Summary
private  ModeConfig mc
          The ModeConfig object.
 
Constructor Summary
ModeConfigTool()
          Create a new ModeConfigTool object.
 
Method Summary
 void addMode(String newModeName, Mode oldMode)
          Create a new user defined mode.
 void cancel()
          Cancel any changes since the last save() or cancel() call.
 void deleteMode(Mode mode)
          Delete the user defined mode.
static void main(String[] args)
          Start up the test application.
 void save()
          Save any changes since the last save() or cancel() call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mc

private ModeConfig mc
The ModeConfig object.

Constructor Detail

ModeConfigTool

public ModeConfigTool()
               throws InternalErrorException
Create a new ModeConfigTool object.

Throws:
InternalErrorException - - Thrown if the operation fails for any reason.
Method Detail

main

public static void main(String[] args)
Start up the test application.

Parameters:
args - Command line arguments to the application.

addMode

public void addMode(String newModeName,
                    Mode oldMode)
             throws DataAlreadyExistsException,
                    NoSuchDataException
Create a new user defined mode. The ordering of modules in the new mode will be exactly the same as in the old mode.

Parameters:
newModeName - The name of the new mode.
oldMode - The old mode.
Throws:
DataAlreadyExistsException - Thrown if the mode already exists.
NoSuchDataException - Thrown if the old mode does not exist.

deleteMode

public void deleteMode(Mode mode)
                throws PermissionsException,
                       NoSuchDataException
Delete the user defined mode.

Parameters:
mode - The mode to be deleted.
Throws:
PermissionsException - - Thrown if the mode is a standard mode.
NoSuchDataException - - Thrown if the mode does not exist.

cancel

public void cancel()
            throws InternalErrorException
Cancel any changes since the last save() or cancel() call.

Throws:
InternalErrorException - - Thrown if the operation fails for any reason.

save

public void save()
          throws InternalErrorException
Save any changes since the last save() or cancel() call.

Throws:
InternalErrorException - - Thrown if the operation fails for any reason.