audiojury.domain
Interface ResultProcessing

All Known Implementing Classes:
ResultManager, ResultPlugin

public interface ResultProcessing

This interface defines which operations all result handling classes should implement.


Method Summary
 int autoImport()
          Fetches results 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.
 int manualImport(java.io.File[] resfiles)
          Fetches results from the given files and imports them in the admininstrator program.
 java.util.Vector openResults(java.lang.String projname, int state)
          Loads the results associated with a certain project.
 void saveResults(ProjectResults results)
          Saves results from the client.
 

Method Detail

openResults

public java.util.Vector openResults(java.lang.String projname,
                                    int state)
                             throws ResultOperationException
Loads the results associated with a certain project.

Parameters:
projname - The project the results belong to.
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.

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 results from the given files and imports them in the admininstrator program.

Parameters:
resfiles - An array of files containing project results.
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 results from the shared folder and imports them in the administrator program.

Returns:
The number of results 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 results from the client.

Parameters:
results - The results to save.
Throws:
ResultOperationException - if there was an unhandled exception while performing the operation.