|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.module.ModuleConfigTool
This application provides the user with an interface for editing the module configuration files. Specifically, the names and order of module types, and the names and order of module implementions for each module type can be edited.
Field Summary | |
private ModuleConfig |
mc
The ModuleConfig object. |
Constructor Summary | |
ModuleConfigTool()
Create the ModuleConfigTool object. |
Method Summary | |
void |
addMode(String newModeName,
Mode oldMode)
Create a new user defined mode. |
ModuleName |
addModuleName(String simple,
String full,
ModuleType type)
Add the module name for the module type. |
ModuleType |
addModuleType(String simple,
String full,
int pos)
|
void |
cancel()
Undo all changes since the last call to cancel() or save(). |
void |
deleteMode(Mode mode)
Delete the specifiec mode. |
void |
deleteModuleName(ModuleName mn)
Delete the module name. |
void |
deleteModuleType(ModuleType mt)
Delete the module type. |
ModuleType[] |
getAllModuleTypes()
Return all ModuleType objects, in ascending order. |
ModuleName[] |
getModuleNames(ModuleType mt,
Mode m)
Get the module names for a given module type and mode. |
void |
orderModuleNames(ModuleName[] mn,
ModuleType mt,
Mode mode)
Set the order of the module names. |
void |
orderModuleTypes(ModuleType[] mt)
Set the order of the module types. |
void |
save()
Save all changes since the last call to cancel() or save(). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private ModuleConfig mc
Constructor Detail |
public ModuleConfigTool() throws InternalErrorException
InternalErrorException
- Thrown if the operation fails for any reason.Method Detail |
public ModuleType[] getAllModuleTypes()
public ModuleName[] getModuleNames(ModuleType mt, Mode m)
mt
- The ModuleType.m
- The mode.public ModuleType addModuleType(String simple, String full, int pos) throws IllegalArgumentException
IllegalArgumentException
public void deleteModuleType(ModuleType mt) throws PermissionsException, NoSuchDataException
mt
- The ModuleType to be deleted.
PermissionsException
- Thrown if the module type cannot be deleted.
NoSuchDataException
- Thrown if the module type does not exist.public ModuleName addModuleName(String simple, String full, ModuleType type)
simple
- The simple name of the module name.full
- The full name of the module name.type
- The module type with which this module name is to be associated.
public void deleteModuleName(ModuleName mn)
mn
- The module name to be deleted.public void orderModuleTypes(ModuleType[] mt) throws InternalErrorException
mt
- An array of ModuleType objects in ascending order.
InternalErrorException
- Thrown if the operation fails for any reason.public void orderModuleNames(ModuleName[] mn, ModuleType mt, Mode mode) throws InternalErrorException
mn
- An array of ModuleName objects, ordered from most to least preferred.mt
- The ModuleType to associate them with.mode
- The mode for which the order is being set.
InternalErrorException
- Thrown if the operation fails for any reason.public void addMode(String newModeName, Mode oldMode) throws DataAlreadyExistsException, NoSuchDataException, InternalErrorException
newModeName
- The name of the new mode.oldMode
- The old mode.
DataAlreadyExistsException
- Thrown if the new mode already exists.
NoSuchDataException
- Thrown if the old mode does not exist.
InternalErrorException
- Thrown if the operation fails for any reason.public void deleteMode(Mode mode) throws PermissionsException, NoSuchDataException
mode
- The mode to be deleted.
PermissionsException
- Thrown if the mode is a standard mode.
NoSuchDataException
- Thrown if the mode does not exist.public void cancel() throws InternalErrorException
InternalErrorException
- Thrown if the operation fails for any reason.public void save() throws InternalErrorException
InternalErrorException
- Thrown if the operation fails for any reason.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |