|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--audiojury.proxy.ProjectStoragePlugin
Deals with project storage details. It can be replaced if another storage subsystem, such as a DBMS, if wanted. This specific plugin implementation is based on directory hierarchy and common files. It can utilize Windows shared folders to distribute projects.
ProjectProcessing
,
ProjectManager
Constructor Summary | |
ProjectStoragePlugin()
Constructor. |
Method Summary | |
void |
activateProject(java.lang.String name,
java.lang.String activeName)
Activates a Project by copying it from the dynamic directory
to the active directory and also changing the name.
|
void |
closeProject(java.lang.String name)
Moves a Project from active to closed state. |
Scale[] |
createStandardScales()
Generates the standard Scale s ACR, CCR and DCR. |
void |
deleteProject(java.lang.String name,
int state)
Deletes a Project permanently. |
void |
duplicateProject(java.lang.String name,
java.lang.String newname)
Duplicates a Project in dynamic state. |
boolean |
existsSharedFolder()
Checks for the existence and accessebility of a shared folder |
protected ConfigManager |
getConfigManager()
Returns the unique instance of ConfigManager . |
java.lang.String |
getProjectPath(java.lang.String name,
int state)
Retrieves the path to a specifc Project in a specific state. |
boolean |
isUniqueProjectName(java.lang.String name,
int state)
Checks it a Project name is unique within a specific project state domain. |
java.util.Hashtable |
listActiveProjects()
Used by the client to discover available projects. |
java.util.Hashtable |
listProjects(int state)
Lists Project s. |
java.util.Hashtable |
listProjectsAndTests(int state)
Lists Project s and Test s. |
Project |
newProject(java.lang.String name)
Creates a new Project . |
Project |
openProject(java.lang.String name)
Opens a Project that is in dynamic state. |
Project |
openProjectPassive(java.lang.String name)
Opens a Project for AudioJury Client |
Scale[] |
openScales()
Opens Scale s from a scale.conf file.
|
Test |
openTest(java.lang.String testname,
java.lang.String proj_path)
Opens a Test within a specific Project . |
void |
reactivateProject(java.lang.String name)
Moves a Project from closed state back to active state. |
void |
registerObserver(java.util.Observer observer)
Registers an observer so that the observer will be notified when status of the ProjectStoragePlugin changes. |
void |
renameProject(java.lang.String name,
java.lang.String newname)
Renames a Project in dynamic state. |
void |
saveProject(Project project)
Saves a Project object to disk. |
void |
saveScales(Scale[] scales)
Saves Scale objects in a stream file named scale.conf |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProjectStoragePlugin()
Method Detail |
public void registerObserver(java.util.Observer observer)
observer
- An observer.public boolean existsSharedFolder()
public Scale[] createStandardScales()
Scale
s ACR, CCR and DCR.
createStandardScales
in interface ProjectProcessing
Scale
s.public Scale[] openScales() throws ProjectOperationException
Scale
s from a scale.conf file.
The scale is located in the project base directory.
openScales
in interface ProjectProcessing
Scale
s loaded from file.
ProjectOperationException
- if there was an unhandled exception while performing the operationpublic void saveScales(Scale[] scales) throws ProjectOperationException
Scale
objects in a stream file named scale.conf
saveScales
in interface ProjectProcessing
scales
- An array of Scale
s.
ProjectOperationException
- if there was an unhandled exception while performing the operationpublic java.util.Hashtable listProjectsAndTests(int state) throws ProjectOperationException
Project
s and Test
s.
listProjectsAndTests
in interface ProjectProcessing
state
- List projects in this state. State identifiers are defined in audiojury.domain.Project
ProjectOperationException
- if there was an unhandled exception while performing the operationaudiojury.domain.Project#
public java.util.Hashtable listProjects(int state) throws ProjectOperationException
Project
s.
listProjects
in interface ProjectProcessing
state
- List projects in this state. State identifiers are defined in
audiojury.domain.Project
ProjectOperationException
- if there was an unhandled exception while performing the operationaudiojury.domain.Project#
public java.util.Hashtable listActiveProjects() throws ProjectOperationException
listActiveProjects
in interface ProjectProcessing
ProjectOperationException
- if there was an unhandled exception while performing the operationpublic boolean isUniqueProjectName(java.lang.String name, int state) throws ProjectOperationException
Project
name is unique within a specific project state domain.
isUniqueProjectName
in interface ProjectProcessing
name
- A name candidate.state
- The project state domain to check against. Project states are
defined in audiojury.domain.Project
ProjectOperationException
- if there was an unhandled exception while performing the operationpublic void duplicateProject(java.lang.String name, java.lang.String newname) throws ProjectOperationException, NotUniqueNameException
Project
in dynamic state.
duplicateProject
in interface ProjectProcessing
name
- The name of the project to duplicate.newname
- The name of the copy that will be created.
ProjectOperationException
- if there was an unhandled exception while performing the operation
NotUniqueNameException
- if the proposed name is not unique.public void renameProject(java.lang.String name, java.lang.String newname) throws ProjectOperationException, NotUniqueNameException
Project
in dynamic state.
renameProject
in interface ProjectProcessing
name
- The current name of the Project
.newname
- The new desired name of the Project
.
ProjectOperationException
- if there was an unhandled exception while performing the operation
NotUniqueNameException
- if the proposed name is not unique.public void closeProject(java.lang.String name) throws ProjectOperationException
Project
from active to closed state.
closeProject
in interface ProjectProcessing
name
- The name of the Project
to close. The project must be in active state for the closure to be possible.
ProjectOperationException
- if there was an unhandled exception while performing the operation.public void reactivateProject(java.lang.String name) throws ProjectOperationException
Project
from closed state back to active state.
reactivateProject
in interface ProjectProcessing
name
- The name of the Project
to reactivate.
ProjectOperationException
- if there was an unhandled exception while performing the operationpublic void activateProject(java.lang.String name, java.lang.String activeName) throws ProjectOperationException
Project
by copying it from the dynamic directory
to the active directory and also changing the name.
If a shared folder exists the project is also copied there.
activateProject
in interface ProjectProcessing
name
- The name of the Project
to activateactiveName
- The name the Project
should have in active state.
ProjectOperationException
- if there was an unhandled exception while performing the operationpublic void deleteProject(java.lang.String name, int state) throws ProjectOperationException
Project
permanently.
deleteProject
in interface ProjectProcessing
name
- Name of the Project
to delete.state
- In which state to look for the Project
.
ProjectOperationException
- if there was an unhandled exception while performing the operationpublic void saveProject(Project project) throws ProjectOperationException
Project
object to disk.
saveProject
in interface ProjectProcessing
project
- A Project
object to save.
ProjectOperationException
- if there was an unhandled exception while performing the operationpublic Project openProject(java.lang.String name) throws ProjectOperationException, NoProjectFoundException
Project
that is in dynamic state.
openProject
in interface ProjectProcessing
name
- The name of the Project
.
Project
.
ProjectOperationException
- if there was an unhandled exception while performing the operation
NoProjectFoundException
- if no project was found with the specified name.public Project openProjectPassive(java.lang.String name) throws ProjectOperationException, NoProjectFoundException
Project
for AudioJury Client
name
- The name of the Project
.
Project
.
ProjectOperationException
- if there was an unhandled exception while performing the operation
NoProjectFoundException
- if no project was found with the specified name.public Project newProject(java.lang.String name) throws ProjectOperationException, NotUniqueNameException
Project
.
newProject
in interface ProjectProcessing
name
- The desired name of the new Project
.
Project
object.
ProjectOperationException
- if there was an unhandled exception while performing the operation
NotUniqueNameException
- if the proposed name is not unique.protected ConfigManager getConfigManager()
ConfigManager
.
ConfigManager
instance.public java.lang.String getProjectPath(java.lang.String name, int state)
Project
in a specific state.
name
- The name of the Project
to get the path to.state
- The state of the Project
to get the path to.
String
with the path to the specified Project
.public Test openTest(java.lang.String testname, java.lang.String proj_path) throws java.io.IOException, java.lang.ClassNotFoundException
Test
within a specific Project
.
testname
- The name of the Test
to open.proj_path
- The path to the Project
containing the Test
.
Test
.
java.io.IOException
- if there was an unhandled IO error during the operation.
java.lang.ClassNotFoundException
- if the class of a serialized object cannot be found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |