wt.dataops.archivesystem.fileimpl
Class FileArchiveSystem

java.lang.Object
  extended bywt.dataops.archivesystem.fileimpl.FileArchiveSystem
All Implemented Interfaces:
Externalizable, Serializable, WTArchiveSystem

public class FileArchiveSystem
extends Object
implements WTArchiveSystem, Externalizable



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private  WTArchiveSystemQuery arQuery
           
private static String CLASSNAME
           
private  boolean connected
           
static long EXTERNALIZATION_VERSION_UID
           
private  String fileArchiveVol
           
private static String indexFileName
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static boolean verbose
           
 
Constructor Summary
FileArchiveSystem()
           
 
Method Summary
 void addClause(String name, String val, WTArchiveSystemInClauseOper oper)
          

Supported API: false
 void addOperator(WTArchiveSystemBetClauseOper op)
          

Supported API: false
 void addType(String typeName)
          

Supported API: false
private  void checkFile(String localPath, boolean checkFile, boolean checkWrite)
           
private  void checkInFile(File checkVol, boolean checkWrite)
           
 boolean connect()
          

Supported API: false
 ArchiveResident createObject(File file, String objName, String aVol, String source, long retentionPeriod)
          

Supported API: false
 ArchiveResident createObject(InputStream is, String objName, String aVol, String source, long retentionPeriod)
          

Supported API: false
 ArchiveResident createObject(String localPath, String objName, String aVol, String source, long retentionPeriod)
          

Supported API: false
 void disconnect()
          

Supported API: false
 ArchiveResident[] executeQuery()
          

Supported API: false
 void finalizeQuery()
          

Supported API: false
 WTArchiveVolume[] getAllVolumes()
          

Supported API: false
private  boolean isPartOf(String source, String[] sources)
           
 void newQuery(String[] aVols, String[] sources)
          

Supported API: false
 ArchiveResident[] queryObject(Map criteria, String[] aVols, String[] sources)
          

Supported API: false
 ArchiveResident[] queryObject(Map criteria, String[] aVols, String[] sources, WTArchiveSystemInClauseOper operInClause, WTArchiveSystemBetClauseOper operBetClause)
          

Supported API: false
 ArchiveResident[] queryObject(String[] queryTypes, String queryString, String[] aVols, String[] sources)
          

Supported API: false
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(FileArchiveSystem thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 boolean removeObject(ArchiveResident arObj)
          

Supported API: false
 boolean removeObject(String objId, String aVol)
          

Supported API: false
private  void reset()
           
 boolean retrieveObject(ArchiveResident arObj, File file)
          

Supported API: false
 boolean retrieveObject(ArchiveResident arObj, OutputStream os)
          

Supported API: false
 boolean retrieveObject(ArchiveResident arObj, String localPath)
          

Supported API: false
 boolean retrieveObject(String objName, String aVol, File file)
          

Supported API: false
 boolean retrieveObject(String objName, String aVol, OutputStream os)
          

Supported API: false
 boolean retrieveObject(String objName, String aVol, String localPath)
          

Supported API: false
 String setRetentionPeriod(String aVol, String[] objName, Date futureDate, String source)
          

Supported API: false
 String setRetentionPeriod(String aVol, String[] objName, long period, String source)
          

Supported API: false
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
private static void writeFile(InputStream is, String fileName, boolean append)
           
private static void writeLineToIndex(String dir, String line)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

verbose

private static boolean verbose

indexFileName

private static String indexFileName

connected

private boolean connected

fileArchiveVol

private String fileArchiveVol

arQuery

private WTArchiveSystemQuery arQuery

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

FileArchiveSystem

public FileArchiveSystem()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(FileArchiveSystem thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

connect

public boolean connect()
                throws WTArchiveSystemException


Supported API: false

Specified by:
connect in interface WTArchiveSystem
Returns:
boolean
Throws:
WTArchiveSystemException

disconnect

public void disconnect()
                throws WTArchiveSystemException


Supported API: false

Specified by:
disconnect in interface WTArchiveSystem
Throws:
WTArchiveSystemException

createObject

public ArchiveResident createObject(String localPath,
                                    String objName,
                                    String aVol,
                                    String source,
                                    long retentionPeriod)
                             throws WTArchiveSystemException


Supported API: false

Specified by:
createObject in interface WTArchiveSystem
Parameters:
localPath -
objName -
aVol -
source -
retentionPeriod -
Returns:
ArchiveResident
Throws:
WTArchiveSystemException

createObject

public ArchiveResident createObject(File file,
                                    String objName,
                                    String aVol,
                                    String source,
                                    long retentionPeriod)
                             throws WTArchiveSystemException


Supported API: false

Specified by:
createObject in interface WTArchiveSystem
Parameters:
file -
objName -
aVol -
source -
retentionPeriod -
Returns:
ArchiveResident
Throws:
WTArchiveSystemException

createObject

public ArchiveResident createObject(InputStream is,
                                    String objName,
                                    String aVol,
                                    String source,
                                    long retentionPeriod)
                             throws WTArchiveSystemException


Supported API: false

Specified by:
createObject in interface WTArchiveSystem
Parameters:
is -
objName -
aVol -
source -
retentionPeriod -
Returns:
ArchiveResident
Throws:
WTArchiveSystemException

retrieveObject

public boolean retrieveObject(String objName,
                              String aVol,
                              String localPath)
                       throws WTArchiveSystemException


Supported API: false

Specified by:
retrieveObject in interface WTArchiveSystem
Parameters:
objName -
aVol -
localPath -
Returns:
boolean
Throws:
WTArchiveSystemException

retrieveObject

public boolean retrieveObject(String objName,
                              String aVol,
                              File file)
                       throws WTArchiveSystemException


Supported API: false

Specified by:
retrieveObject in interface WTArchiveSystem
Parameters:
objName -
aVol -
file -
Returns:
boolean
Throws:
WTArchiveSystemException

retrieveObject

public boolean retrieveObject(String objName,
                              String aVol,
                              OutputStream os)
                       throws WTArchiveSystemException


Supported API: false

Specified by:
retrieveObject in interface WTArchiveSystem
Parameters:
objName -
aVol -
os -
Returns:
boolean
Throws:
WTArchiveSystemException

queryObject

public ArchiveResident[] queryObject(Map criteria,
                                     String[] aVols,
                                     String[] sources)
                              throws WTArchiveSystemException


Supported API: false

Specified by:
queryObject in interface WTArchiveSystem
Parameters:
criteria -
aVols -
sources -
Returns:
ArchiveResident[]
Throws:
WTArchiveSystemException

queryObject

public ArchiveResident[] queryObject(Map criteria,
                                     String[] aVols,
                                     String[] sources,
                                     WTArchiveSystemInClauseOper operInClause,
                                     WTArchiveSystemBetClauseOper operBetClause)
                              throws WTArchiveSystemException


Supported API: false

Specified by:
queryObject in interface WTArchiveSystem
Parameters:
criteria -
aVols -
sources -
operInClause -
operBetClause -
Returns:
ArchiveResident[]
Throws:
WTArchiveSystemException

queryObject

public ArchiveResident[] queryObject(String[] queryTypes,
                                     String queryString,
                                     String[] aVols,
                                     String[] sources)
                              throws WTArchiveSystemException


Supported API: false

Specified by:
queryObject in interface WTArchiveSystem
Parameters:
queryTypes -
queryString -
aVols -
sources -
Returns:
ArchiveResident[]
Throws:
WTArchiveSystemException

newQuery

public void newQuery(String[] aVols,
                     String[] sources)
              throws WTArchiveSystemException


Supported API: false

Specified by:
newQuery in interface WTArchiveSystem
Parameters:
aVols -
sources -
Throws:
WTArchiveSystemException

addOperator

public void addOperator(WTArchiveSystemBetClauseOper op)
                 throws WTArchiveSystemException


Supported API: false

Specified by:
addOperator in interface WTArchiveSystem
Parameters:
op -
Throws:
WTArchiveSystemException

addClause

public void addClause(String name,
                      String val,
                      WTArchiveSystemInClauseOper oper)
               throws WTArchiveSystemException


Supported API: false

Specified by:
addClause in interface WTArchiveSystem
Parameters:
name -
val -
oper -
Throws:
WTArchiveSystemException

finalizeQuery

public void finalizeQuery()
                   throws WTArchiveSystemException


Supported API: false

Specified by:
finalizeQuery in interface WTArchiveSystem
Throws:
WTArchiveSystemException

executeQuery

public ArchiveResident[] executeQuery()
                               throws WTArchiveSystemException


Supported API: false

Specified by:
executeQuery in interface WTArchiveSystem
Returns:
ArchiveResident[]
Throws:
WTArchiveSystemException

setRetentionPeriod

public String setRetentionPeriod(String aVol,
                                 String[] objName,
                                 long period,
                                 String source)
                          throws WTArchiveSystemException


Supported API: false

Specified by:
setRetentionPeriod in interface WTArchiveSystem
Parameters:
aVol -
objName -
period -
source -
Returns:
String
Throws:
WTArchiveSystemException

setRetentionPeriod

public String setRetentionPeriod(String aVol,
                                 String[] objName,
                                 Date futureDate,
                                 String source)
                          throws WTArchiveSystemException


Supported API: false

Specified by:
setRetentionPeriod in interface WTArchiveSystem
Parameters:
aVol -
objName -
futureDate -
source -
Returns:
String
Throws:
WTArchiveSystemException

getAllVolumes

public WTArchiveVolume[] getAllVolumes()
                                throws WTArchiveSystemException


Supported API: false

Specified by:
getAllVolumes in interface WTArchiveSystem
Returns:
WTArchiveVolume[]
Throws:
WTArchiveSystemException

removeObject

public boolean removeObject(String objId,
                            String aVol)
                     throws WTArchiveSystemException


Supported API: false

Specified by:
removeObject in interface WTArchiveSystem
Parameters:
objId -
aVol -
Returns:
boolean
Throws:
WTArchiveSystemException

retrieveObject

public boolean retrieveObject(ArchiveResident arObj,
                              String localPath)
                       throws WTArchiveSystemException


Supported API: false

Specified by:
retrieveObject in interface WTArchiveSystem
Parameters:
arObj -
localPath -
Returns:
boolean
Throws:
WTArchiveSystemException

removeObject

public boolean removeObject(ArchiveResident arObj)
                     throws WTArchiveSystemException


Supported API: false

Specified by:
removeObject in interface WTArchiveSystem
Parameters:
arObj -
Returns:
boolean
Throws:
WTArchiveSystemException

retrieveObject

public boolean retrieveObject(ArchiveResident arObj,
                              File file)
                       throws WTArchiveSystemException


Supported API: false

Specified by:
retrieveObject in interface WTArchiveSystem
Parameters:
arObj -
file -
Returns:
boolean
Throws:
WTArchiveSystemException

retrieveObject

public boolean retrieveObject(ArchiveResident arObj,
                              OutputStream os)
                       throws WTArchiveSystemException


Supported API: false

Specified by:
retrieveObject in interface WTArchiveSystem
Parameters:
arObj -
os -
Returns:
boolean
Throws:
WTArchiveSystemException

addType

public void addType(String typeName)
             throws WTArchiveSystemException


Supported API: false

Specified by:
addType in interface WTArchiveSystem
Parameters:
typeName -
Throws:
WTArchiveSystemException

writeLineToIndex

private static void writeLineToIndex(String dir,
                                     String line)
                              throws WTArchiveSystemException
Throws:
WTArchiveSystemException

writeFile

private static void writeFile(InputStream is,
                              String fileName,
                              boolean append)
                       throws IOException
Throws:
IOException

reset

private void reset()

checkFile

private void checkFile(String localPath,
                       boolean checkFile,
                       boolean checkWrite)
                throws WTArchiveSystemException
Throws:
WTArchiveSystemException

checkInFile

private void checkInFile(File checkVol,
                         boolean checkWrite)
                  throws WTArchiveSystemException
Throws:
WTArchiveSystemException

isPartOf

private boolean isPartOf(String source,
                         String[] sources)