com.isti.util.test
Class ArchiveManagerTest

java.lang.Object
  extended by com.isti.util.test.ArchiveManagerTest

public class ArchiveManagerTest
extends java.lang.Object

Test program for ArchiveManager classes. 7/15/2003 -- [HS,ET] 9/26/2003 -- [KF] Add optional extended archive test.


Field Summary
static java.lang.String EXT_DATE_FORMAT_STR
          Extended date-formatter pattern string.
 
Constructor Summary
ArchiveManagerTest(boolean extendedFlag)
           
 
Method Summary
protected  boolean archiveItem()
          Inserts an item into the archive.
protected  boolean archiveItem(Archivable item)
          Inserts an item into the archive.
protected  boolean archiveOldItem()
          Attempts to insert an item that is too old into the archive.
protected  java.lang.String archiveText(ArchivableData m)
          Gets the archive text.
static void main(java.lang.String[] args)
           
 void printElements(java.util.Vector v)
          Prints the elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXT_DATE_FORMAT_STR

public static final java.lang.String EXT_DATE_FORMAT_STR
Extended date-formatter pattern string.

See Also:
Constant Field Values
Constructor Detail

ArchiveManagerTest

public ArchiveManagerTest(boolean extendedFlag)
Method Detail

archiveOldItem

protected boolean archiveOldItem()
                          throws java.io.IOException
Attempts to insert an item that is too old into the archive.

Returns:
true if the item was added, false otherwise.
Throws:
java.io.IOException - if the archive file can not be written to.

archiveItem

protected boolean archiveItem(Archivable item)
                       throws java.io.IOException
Inserts an item into the archive.

Parameters:
item - the item to be archived.
Returns:
true if the item was added, false otherwise.
Throws:
java.io.IOException - if the archive file can not be written to.

archiveItem

protected boolean archiveItem()
                       throws java.io.IOException
Inserts an item into the archive.

Returns:
true if the item was added, false otherwise.
Throws:
java.io.IOException - if the archive file can not be written to.

archiveText

protected java.lang.String archiveText(ArchivableData m)
Gets the archive text.

Parameters:
m - the archive data.
Returns:
the archive text.

printElements

public void printElements(java.util.Vector v)
Prints the elements.

Parameters:
v - the vector of elements.

main

public static void main(java.lang.String[] args)