|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--audiojury.action.TestManager
Manages a collection of Tests within a Project.
The class implements the Singleton design pattern, which means
there is only one instance of this class. This is necessary to
make concurrent access to tests impossible.
TestBuilder| Method Summary | |
void |
cancelTest()
Use this method to forget about the current Test (for undo operations). |
void |
deleteTest(java.lang.String name)
Delets a Test in the current Project. |
void |
duplicateTest(java.lang.String name,
java.lang.String newname)
Duplicates a Test. |
protected ProjectBuilder |
getProjectBuilder()
Gets the ProjectBuilder currently being used. |
protected TestBuilder |
getTestBuilder()
Gets the TestBuilder currently being used. |
java.util.Hashtable |
getTests()
Returns a hashtable of all Tests in the current project.
|
static TestManager |
getUniqueInstance()
Enforces the Singleton design pattern by always returning the same instance of TestManager. |
void |
importTest(java.lang.String projname,
Test test,
java.lang.String newname)
Imports a Test from another Project into the current project. |
boolean |
isUniqueTestName(java.lang.String name)
Checks it a Test name is unique within the current Project. |
Test |
newTest(java.lang.String name)
Creates a new Test. |
Test |
openTest(java.lang.String name)
Opens a Test in the current Project
and makes it current in the TestBuilder. |
void |
renameTest(java.lang.String name,
java.lang.String newname)
Renames a Test in the current Project. |
void |
saveTest()
Saves the current Test.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public Test newTest(java.lang.String name)
throws NotUniqueNameException
Test.
name - The desired name of the new Test.
Test.
NotUniqueNameException - if the proposed name is not unique.
public Test openTest(java.lang.String name)
throws NoTestFoundException,
TestOperationException
Test in the current Project
and makes it current in the TestBuilder.
name - The name of the Test to open.
Test.
NoTestFoundException - if no test could be found with the specified name.
TestOperationException - if an unhandled error occurs.public void cancelTest()
Test (for undo operations).
public void saveTest()
Test.
Tests are not saved immediately to disk.
Instead the save is postponed until the whole Project is saved.
public void deleteTest(java.lang.String name)
throws NoTestFoundException
Test in the current Project.
name - The name of the test to delete.
NoTestFoundException - if no test could be found with the specified name.
public void renameTest(java.lang.String name,
java.lang.String newname)
throws NotUniqueNameException,
NoTestFoundException
Test in the current Project.
name - The current name of the Test.newname - The new desired name of the Test.
NotUniqueNameException - if the proposed name is not unique.
NoTestFoundException - if no test could be found with the specified name.
public void duplicateTest(java.lang.String name,
java.lang.String newname)
throws NotUniqueNameException,
NoTestFoundException,
TestOperationException
Test.
name - The current name of the Test.newname - The desired name of the new copy.
NotUniqueNameException - if the proposed name is not unique.
NoTestFoundException - if no test could be found with the specified name.
TestOperationException - if an unhandled error occurs.
public void importTest(java.lang.String projname,
Test test,
java.lang.String newname)
throws NotUniqueNameException,
TestOperationException
Test from another Project into the current project.
projname - The name of the Project to import from.test - The Test within this Project to import.newname - The desired name of the imported Test copy.
NotUniqueNameException - if the proposed name is not unique.
TestOperationException - if an unhandled error occurs.public java.util.Hashtable getTests()
Tests in the current project.
The key in the hash is the name of the respective test.
Tests.public boolean isUniqueTestName(java.lang.String name)
Test name is unique within the current Project.
name - A name candidate.
public static TestManager getUniqueInstance()
TestManager. This should be used instead of
a constructor.
protected ProjectBuilder getProjectBuilder()
ProjectBuilder currently being used.
protected TestBuilder getTestBuilder()
TestBuilder currently being used.
TestBuilder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||