audiojury.proxy
Class ResultPlugin

java.lang.Object
  |
  +--audiojury.proxy.ResultPlugin
All Implemented Interfaces:
ResultProcessing

public class ResultPlugin
extends java.lang.Object
implements ResultProcessing

Deals with result storage details.

See Also:
ProjectResults

Constructor Summary
ResultPlugin()
          Constructor
 
Method Summary
 int autoImport()
          Fetches ProjectResults from the shared folder and imports them in the administrator program.
 void createReport(java.lang.String filename, java.util.Vector results)
          Creates a report file from the results of a Project.
protected  ConfigManager getConfigManager()
          Returns the unique instance of ConfigManager.
 int manualImport(java.io.File[] resfiles)
          Fetches ProjectResults from the given files and imports them in the admininstrator program.
 java.util.Vector openResults(java.lang.String projname, int state)
          Returns all the ProjectResults of a specific Project.
 void saveResults(ProjectResults results)
          Saves ProjectResults from the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultPlugin

public ResultPlugin()
Constructor

Method Detail

openResults

public java.util.Vector openResults(java.lang.String projname,
                                    int state)
                             throws ResultOperationException
Returns all the ProjectResults of a specific Project.

Specified by:
openResults in interface ResultProcessing
Parameters:
projname - The name of the Project to retrive the ProjectResults from.
state - In which state to look for the Project.
Returns:
A vector of ProjectResults.
Throws:
ResultOperationException - if there was an unhandled exception while performing the operation.

createReport

public void createReport(java.lang.String filename,
                         java.util.Vector results)
                  throws ResultOperationException
Creates a report file from the results of a Project. The report file is comma-separated and can be opened in a spreadsheet program such as Microsoft Excel. Reports are saved in the directory called reports in the AudioJury base directory.

Specified by:
createReport in interface ResultProcessing
Parameters:
filename - The name of the report to create.
results - A vector containing ProjectResults objects.
Throws:
ResultOperationException - if there was an unhandled exception while performing the operation.

manualImport

public int manualImport(java.io.File[] resfiles)
                 throws ResultOperationException
Fetches ProjectResults from the given files and imports them in the admininstrator program.

Specified by:
manualImport in interface ResultProcessing
Parameters:
resfiles - An array of files containing project results (a number of ProjectResults).
Returns:
The number of results imported.
Throws:
ResultOperationException - if there was an unhandled exception while performing the operation.

autoImport

public int autoImport()
               throws ResultOperationException,
                      NoSharedFolderException
Fetches ProjectResults from the shared folder and imports them in the administrator program.

Specified by:
autoImport in interface ResultProcessing
Returns:
The number of ProjectResults imported.
Throws:
ResultOperationException - if there was an unhandled exception while performing the operation.
NoSharedFolderException - if the shared folder could not be found.

saveResults

public void saveResults(ProjectResults results)
                 throws ResultOperationException
Saves ProjectResults from the client.

Specified by:
saveResults in interface ResultProcessing
Parameters:
results - The ProjectResults to save.
Throws:
ResultOperationException - if there was an unhandled exception while performing the operation.

getConfigManager

protected ConfigManager getConfigManager()
Returns the unique instance of ConfigManager.

Returns:
A ConfigManager instance.