net.sourceforge.jdbdump.connect
Class ConfigurationIO

java.lang.Object
  extended by net.sourceforge.jdbdump.connect.ConfigurationIO
Direct Known Subclasses:
DbConfigurationIO, FilesystemConfigurationIO, FTPConfigurationIO

public abstract class ConfigurationIO
extends java.lang.Object

This abstract method is a definition of classes that manage access to configuration data, wherever it is stored. Implementing subclasses can access configuration data on filesystem, using database, over FTP connection, or somewhere else, depending on the implementation.

Author:
tymoteusz

Constructor Summary
ConfigurationIO()
           
 
Method Summary
 boolean getDefaultAutoload()
           
 boolean getDefaultAutosave()
           
protected abstract  java.io.InputStream getInputStream()
          Implementations of this abstract method should cover all logic for reading data from it's storage place, and provide access to it through an InputStream object.
protected abstract  java.io.OutputStream getOutputStream()
          Implementations of this abstract method should cover all logic for writing data to it's storage place, and provide access to it through an OutputStream object.
 java.util.Hashtable<java.lang.String,java.io.Serializable> load()
          This method feeds this class' configuration data with current data grabbed from its storage place.
 void save(java.util.Hashtable<java.lang.String,java.io.Serializable> data)
          This method puts this class' current configuration data to its storage place.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationIO

public ConfigurationIO()
Method Detail

getDefaultAutosave

public boolean getDefaultAutosave()

getDefaultAutoload

public boolean getDefaultAutoload()

load

public java.util.Hashtable<java.lang.String,java.io.Serializable> load()
                                                                throws java.io.IOException
This method feeds this class' configuration data with current data grabbed from its storage place.

Throws:
java.io.IOException - if storage place is inaccessible
java.lang.ClassNotFoundException

save

public void save(java.util.Hashtable<java.lang.String,java.io.Serializable> data)
          throws java.io.IOException
This method puts this class' current configuration data to its storage place.

Throws:
java.io.IOException - if storage place is inaccessible

getInputStream

protected abstract java.io.InputStream getInputStream()
                                               throws java.io.IOException
Implementations of this abstract method should cover all logic for reading data from it's storage place, and provide access to it through an InputStream object.

Returns:
InputStream object from which configuration data can be retrieved
Throws:
java.io.IOException

getOutputStream

protected abstract java.io.OutputStream getOutputStream()
                                                 throws java.io.IOException
Implementations of this abstract method should cover all logic for writing data to it's storage place, and provide access to it through an OutputStream object.

Returns:
OutputStream object to which configuration data can be stored
Throws:
java.io.IOException


Copyright © 2005-2006 AGH International University of Science and Technology. All Rights Reserved.