audiojury.proxy
Class ConfigPlugin

java.lang.Object
  |
  +--audiojury.domain.ConfigBase
        |
        +--audiojury.proxy.ConfigPlugin
All Implemented Interfaces:
ConfigProcessing

public class ConfigPlugin
extends ConfigBase
implements ConfigProcessing

Handles configuration storage details.

See Also:
ConfigManager, ProjectStoragePlugin

Field Summary
 
Fields inherited from class audiojury.domain.ConfigBase
APPLICATION_ROOT, BROWSE_SOUND_PATH, PERSON_INFO, PROJECTS_PATH, REPORT_PATH, RESULT_PATH, SHARED_PATH
 
Constructor Summary
ConfigPlugin()
          Constructor.
 
Method Summary
 java.lang.String getValue(int type)
          Gets the value of a a configuration parameter.
 java.lang.String[] getValues(int type)
          Gets the values of a a multi-valued configuration parameter.
 void saveConfiguration()
          Forces the plugin to flush the settings to disk.
 void setValue(int type, java.lang.String value)
          Sets a configuration parameter.
 void setValues(int type, java.lang.String[] values)
          Sets a multi-valued configuration parameter.
 
Methods inherited from class audiojury.domain.ConfigBase
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigPlugin

public ConfigPlugin()
Constructor.

Method Detail

setValues

public void setValues(int type,
                      java.lang.String[] values)
Sets a multi-valued configuration parameter.

Specified by:
setValues in interface ConfigProcessing
Parameters:
type - A parameter constant as defined in ConfigBase.
values - The values to assign to the configuration parameter.

getValues

public java.lang.String[] getValues(int type)
Gets the values of a a multi-valued configuration parameter.

Specified by:
getValues in interface ConfigProcessing
Parameters:
type - A parameter identifier as defined in ConfigBase.
Returns:
The values of the configuration parameter.

setValue

public void setValue(int type,
                     java.lang.String value)
Sets a configuration parameter.

Specified by:
setValue in interface ConfigProcessing
Parameters:
type - A parameter identifier as defined in audiojury.domain.ConfigBase.
value - The value to assign to the configuration parameter.

getValue

public java.lang.String getValue(int type)
Gets the value of a a configuration parameter.

Specified by:
getValue in interface ConfigProcessing
Parameters:
type - A parameter identifier as defined in audiojury.domain.ConfigBase.
Returns:
The value of the configuration parameter.

saveConfiguration

public void saveConfiguration()
                       throws java.io.FileNotFoundException,
                              java.io.IOException
Forces the plugin to flush the settings to disk.

Throws:
java.io.IOException - if there was an unhandled IO error during the operation.
java.io.FileNotFoundException - if the config file could not be created or overwritten.