|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enableit.db.darrt.DarHandler
Manipulates Database Archives (.dar) files.
Field Summary | |
static java.lang.String |
ABOUT
CVS info ABOUT this class and its current version |
static java.lang.String |
SCHEMA_ENTRY
Name of .DAR entry representing the schema deployment descriptor. |
Constructor Summary | |
DarHandler()
Default Constructor. |
Method Summary | |
void |
create(java.io.OutputStream out,
org.enableit.db.beans.Database database)
|
void |
create(java.io.OutputStream out,
org.enableit.db.beans.Database database,
java.util.List dataList)
Creates a .dar file. |
void |
install(java.net.URL url)
Installs a data archive in its entirety. |
void |
process(java.io.File file,
java.lang.String fileType)
Process the specified file. |
void |
setDebug(boolean debug)
Sets the dar file name. |
void |
setProvider(org.enableit.db.beans.Provider provider)
Override the target for the DAR file to be imported to. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ABOUT
public static final java.lang.String SCHEMA_ENTRY
Constructor Detail |
public DarHandler()
Method Detail |
public void setDebug(boolean debug)
public void create(java.io.OutputStream out, org.enableit.db.beans.Database database) throws DBException, DarHandlingException
DBException
DarHandlingException
public void create(java.io.OutputStream out, org.enableit.db.beans.Database database, java.util.List dataList) throws DBException, DarHandlingException
Implementation Note: Once there is a good take up of the
generics capability on JDK 1.5 this method will be refactored into
two or more methods overloading the List
parameter with
typed lists.
out
- The stream to write the .dar to.database
- Identifies Provider
and other meta-data
for the .dar.dataList
- List
of Strings
naming
tables to export or RowSets
of already exported data.
See implementation note above.
DBException
DarHandlingException
public void install(java.net.URL url) throws DBException
DBException
public void process(java.io.File file, java.lang.String fileType) throws ConfigurationException, DBException, java.rmi.RemoteException
FileProcessor
process
in interface FileProcessor
file
- The file to upload.fileType
- A file type that will be recognised by the
implentation. Typically this should refer to the type of the
data in the file not the file's format or mime type, which the
implementation is expected to detect for itself (for example by
file extension or using the Java Activation Framework).
java.rmi.RemoteException
- If some system exception occurs within an
implementing class that is running in a distributed environment
(i.e. an EJB)
ConfigurationException
- If the fileType parameter is
unrecognised
DBException
- If the handling of the file goes wrong
in some recoverable way.public void setProvider(org.enableit.db.beans.Provider provider) throws ConfigurationException, DBException, java.rmi.RemoteException
setProvider
in interface FileProcessor
provider
- Provider to be used by the FileProcessor
.
DBException
- If the handling of the file goes wrong
in some recoverable way.
java.rmi.RemoteException
- If some system exception occurs within an
implementing class that is running in a distributed environment
(i.e. an EJB)
ConfigurationException
- If this FileProcessor
does
not expect a provider.FileProcessor.setProvider(org.enableit.db.beans.Provider)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |