base.jdbs
Class ConfigurationManager

java.lang.Object
  extended by base.jdbs.ConfigurationManager
All Implemented Interfaces:
IXMLLoadable, IXMLSaveable

public class ConfigurationManager
extends java.lang.Object
implements IXMLSaveable, IXMLLoadable

This is the class where every JDBS configuration paramenter is placed. This class is helpful to write and load parameters configured by the user in xml format and it is used from the entire application. Only one instance of this class is present at runtime in the system

Author:
skunk

Constructor Summary
protected ConfigurationManager()
          The default constructor.*
 
Method Summary
 java.lang.Object fromXml(org.w3c.dom.Document document)
          This method reads from an XML document various configuration parameters for the JDBS.
 SecurityLevel getDefaultBackupSecurityLevel()
           
static ConfigurationManager getInstance()
           
 java.io.File getKeyRingLocation()
           
 NetworkConnectionType getNetworkConnectionType()
           
 Repository getRepository()
           
 User getUser()
           
 java.lang.String getUserLocation()
           
 boolean isEnabledPeerDownloadAuthentication()
           
static void loadConfiguration()
           
static void saveConfiguration()
           
 void setDefaultBackupSecurityLevel(SecurityLevel defaultBackupSecurityLevel)
           
 void setEnabledPeerDownloadAuthentication(boolean enabledPeerDownloadAuthentication)
           
 void setKeyRingLocation(java.io.File keyRingLocation)
           
 void setNetworkConnectionType(NetworkConnectionType networkConnectionType)
           
 void setUser(User user)
           
 void setUserLocation(java.lang.String userLocation)
           
 org.w3c.dom.Node toXml(org.w3c.dom.Document document)
          This method writes to an XML document various configuration parameters of JDBS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationManager

protected ConfigurationManager()
The default constructor.*

Method Detail

getInstance

public static ConfigurationManager getInstance()
Returns:
the instance

getRepository

public Repository getRepository()
Returns:
the repository

fromXml

public java.lang.Object fromXml(org.w3c.dom.Document document)
This method reads from an XML document various configuration parameters for the JDBS.

Specified by:
fromXml in interface IXMLLoadable
Parameters:
document - An XML document that contains a list of configuration parameters for the JDBS.

toXml

public org.w3c.dom.Node toXml(org.w3c.dom.Document document)
This method writes to an XML document various configuration parameters of JDBS.

Specified by:
toXml in interface IXMLSaveable
Parameters:
document - An XML document that will contain a list of configuration parameters for the JDBS.

loadConfiguration

public static void loadConfiguration()

saveConfiguration

public static void saveConfiguration()

getDefaultBackupSecurityLevel

public SecurityLevel getDefaultBackupSecurityLevel()
Returns:
Returns the defaultBackupSecurityLevel.

setDefaultBackupSecurityLevel

public void setDefaultBackupSecurityLevel(SecurityLevel defaultBackupSecurityLevel)
Parameters:
defaultBackupSecurityLevel - The defaultBackupSecurityLevel to set.

getKeyRingLocation

public java.io.File getKeyRingLocation()
Returns:
Returns the keyRingLocation.

setKeyRingLocation

public void setKeyRingLocation(java.io.File keyRingLocation)
Parameters:
keyRingLocation - The keyRingLocation to set.

getUserLocation

public java.lang.String getUserLocation()
Returns:
Returns the userLocation.

setUserLocation

public void setUserLocation(java.lang.String userLocation)
Parameters:
userLocation - The userLocation to set.

getUser

public User getUser()
Returns:
Returns the user.

setUser

public void setUser(User user)
Parameters:
user - The user to set.

isEnabledPeerDownloadAuthentication

public boolean isEnabledPeerDownloadAuthentication()
Returns:
Returns the enabledPeerDownloadAuthentication.

setEnabledPeerDownloadAuthentication

public void setEnabledPeerDownloadAuthentication(boolean enabledPeerDownloadAuthentication)
Parameters:
enabledPeerDownloadAuthentication - The enabledPeerDownloadAuthentication to set.

getNetworkConnectionType

public NetworkConnectionType getNetworkConnectionType()
Returns:
Returns the networkConnectionType.

setNetworkConnectionType

public void setNetworkConnectionType(NetworkConnectionType networkConnectionType)
Parameters:
networkConnectionType - The networkConnectionType to set.


Copyright © 2006 SF.net. All Rights Reserved.