ArLog.db : the log base.
The path for the location of the database files is given by the semper
configuration file (see semper.Preferences.Configuration), field
semper.archive.dbDir.
The default location is ./database/
- Version:
- $Revision: 1.21 $ $Date: 1997/02/07 10:17:55 $
- Author:
- Marc Mazoue ([email protected])
-
ArchiveMan()
- Prevents instantiation of objects of this class.
-
add(AccessName, int, int, Date, Object)
- Add the given object to the archive.
The handle for further retrieval is the given access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
contains(AccessName)
- Tells if there is an object associated with the given access name in the
archive.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
del(AccessName)
- Removes from the archive the object associated with the specified access
name.
-
getAvailabilityReq(AccessName)
- Get the 'security requirement' storage attributes of the archived object
associated with the specified access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
getExpiryDate(AccessName)
- Get the 'security requirement' storage attributes of the archived object
associated with the specified access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
getSecurityReq(AccessName)
- Get the 'security requirement' storage attributes of the archived object
associated with the specified access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
getSerialNumber()
- Gives the next available serial number
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
init()
- Initialises the static archive manager.
-
isInitialised()
- Checks whether the archive manager has been initialised
-
log(AccessName, Streamable)
- Add the given object to the log base.
-
modifyAttr(AccessName, int, int, Date)
- Modify the storage attributes of the archived object associated with the
specified access name.
The object itself and the date of storage are not modified.
-
read(AccessName)
- Gets from the archive the object associated with the specified access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
readLog()
- Read the log base.
-
search(String)
- This version of search returns an array of Strings ; another version
called vSearch (see below) returns a Vector of AccessName objects
Search in the archive for all access names that include the given token (a
partial access name).
Note, to get the whole list of access names, use [search ""]
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
search(String, Date, Date)
- This version of search returns an array of Strings ; another version
called vSearch (see below) returns a Vector of AccessName objects
Search in the archive for all access names that include the given token (a
partial access name) according the given time window.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
update(AccessName, Object)
- Updates in the archive the object associated with the specified access name.
The storage attributes (security requirement, availability requirement and
expiry date) are kept.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
vSearch(String)
- Search in the archive for all access names that include the given token (a
partial access name).
Note, to get the whole list of access names, use [search ""]
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
-
vSearch(String, Date, Date)
- Search in the archive for all access names that include the given token (a
partial access name) according the given time window.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
ArchiveMan
public ArchiveMan() throws ArchiveManException
- Prevents instantiation of objects of this class. All the methods
of ArchiveMan are class methods.
- Throws: ArchiveManException
- when this method is called.
isInitialised
public static boolean isInitialised()
- Checks whether the archive manager has been initialised
init
public static void init() throws ArchiveManException
- Initialises the static archive manager.
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
getSerialNumber
public static synchronized long getSerialNumber() throws ArchiveManException
- Gives the next available serial number
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Returns:
- a long integer serial number
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
add
public static synchronized void add(AccessName a_n,
int security_req,
int availability_req,
Date expiry_date,
Object obj) throws ArchiveManException, ArchiveOverwriteException, ArchiveObjNotFoundException
- Add the given object to the archive.
The handle for further retrieval is the given access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- a_n - the reference to the object to be stored
- security_req - the level of security required
For the moment, the security requirement is figured by an integer
0 : simple storage
1 : user's password required for store and retrieve
2 : encrypted storage
- availability_req - the level of availability required,
For the moment, The availability requirement is figured by an integer
0 : backup of the stored data is not required
1 : backup of the stored data is required
- expiry_date - the date used for further archive garbage collections
If this parameter is null the date is set to the particular value 0
and the object will never be removed by garbage collection.
- obj - the object to be archived
- Throws: ArchiveManException
- throwed when DatabaseException is caught or
the security_req argument has a bad value or the capability for
add() is not satisfied.
- Throws: ArchiveOverwriteException
- throwed when trying to add an object
the access name of which is already in archive.
read
public static synchronized Object read(AccessName a_n) throws ArchiveManException, ArchiveObjNotFoundException
- Gets from the archive the object associated with the specified access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- a_n - the reference to the stored object.
- Returns:
- the handle of the object
- Throws: ArchiveManException
- throwed when DatabaseException is caught or
the capability for read the object is not satisfied.
- Throws: ArchiveObjNotFoundException
- throwed when trying to read an
object the access name of which is not in archive.
update
public static synchronized void update(AccessName a_n,
Object new_obj) throws ArchiveManException, ArchiveObjNotFoundException
- Updates in the archive the object associated with the specified access name.
The storage attributes (security requirement, availability requirement and
expiry date) are kept.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- access_name - the reference to the stored object.
- new_obj - the object to be updated
- Throws: ArchiveManException
- throwed when DatabaseException is caught or
the capability for update() is not satisfied.
- Throws: ArchiveObjNotFoundException
- throwed when trying to update an
object the access name of which is not in archive.
modifyAttr
public static synchronized void modifyAttr(AccessName a_n,
int security_req,
int availability_req,
Date expiry_date) throws ArchiveManException, ArchiveObjNotFoundException
- Modify the storage attributes of the archived object associated with the
specified access name.
The object itself and the date of storage are not modified. But, regarding
the old and the new security requirement, the way of storage can be changed,
e.g., simply stored -> stored with encryption.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- a_n - the reference to the object to be stored
- security_req - the level of security required
For the moment, the secutity requirement is figured by an integer
0 : simple storage
1 : user's password required for store and retrieve
2 : encrypted storage
- availability_req - the level of availability required,
For the moment, The availability requirement is figured by an integer
0 : backup of the stored data is not required
1 : backup of the stored data is required
- expiry_date - the date used for further archive garbage collections
- Throws: ArchiveManException
- throwed when DatabaseException is caught or
the capability for modifyAttr() is not satisfied.
- Throws: ArchiveObjNotFoundException
- throwed when trying to modify the
storage attributes of an object the access name of which is not
in archive.
getSecurityReq
public static synchronized int getSecurityReq(AccessName a_n) throws ArchiveManException, ArchiveObjNotFoundException
- Get the 'security requirement' storage attributes of the archived object
associated with the specified access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- a_n - the reference to the object to be stored
- Returns:
- the 'security requirement' storage attributes of the object.
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
- Throws: ArchiveObjNotFoundException
- throwed when trying to get the
storage attributes of an object the access name of which is not
in archive.
getAvailabilityReq
public static synchronized int getAvailabilityReq(AccessName a_n) throws ArchiveManException, ArchiveObjNotFoundException
- Get the 'security requirement' storage attributes of the archived object
associated with the specified access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- a_n - the reference to the object to be stored
- Returns:
- the 'security requirement' storage attributes of the object.
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
- Throws: ArchiveObjNotFoundException
- throwed when trying to get the
storage attributes of an object the access name of which is not
in archive.
getExpiryDate
public static synchronized Date getExpiryDate(AccessName a_n) throws ArchiveManException, ArchiveObjNotFoundException
- Get the 'security requirement' storage attributes of the archived object
associated with the specified access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- a_n - the reference to the object to be stored
- Returns:
- the 'security requirement' storage attributes of the object.
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
- Throws: ArchiveObjNotFoundException
- throwed when trying to get the
storage attributes of an object the access name of which is not
in archive.
del
public static synchronized void del(AccessName a_n) throws ArchiveManException, ArchiveObjNotFoundException
- Removes from the archive the object associated with the specified access
name. The removed object is put in the waste basket database file.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- access_name - the reference to the stored object.
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
search
public static synchronized String[] search(String token) throws ArchiveManException
- This version of search returns an array of Strings ; another version
called vSearch (see below) returns a Vector of AccessName objects
Search in the archive for all access names that include the given token (a
partial access name).
Note, to get the whole list of access names, use [search ""]
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- token - the string to be searched in the access names
- Returns:
- the set of fitting access names Strings
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
search
public static synchronized String[] search(String token,
Date start_date,
Date end_date) throws ArchiveManException
- This version of search returns an array of Strings ; another version
called vSearch (see below) returns a Vector of AccessName objects
Search in the archive for all access names that include the given token (a
partial access name) according the given time window.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- token - the string to be searched in the access names
- start_date - the begining of time window for the search.
- end_date - the end of time window for the search.
- Returns:
- the set of fitting access names Strings
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
vSearch
public static synchronized Vector vSearch(String token) throws ArchiveManException
- Search in the archive for all access names that include the given token (a
partial access name).
Note, to get the whole list of access names, use [search ""]
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- token - the string to be searched in the access names
- Returns:
- as a Vector the set of fitting access names Strings
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
vSearch
public static synchronized Vector vSearch(String token,
Date start_date,
Date end_date) throws ArchiveManException
- Search in the archive for all access names that include the given token (a
partial access name) according the given time window.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- token - the string to be searched in the access names
- start_date - the begining of time window for the search.
- end_date - the end of time window for the search.
- Returns:
- as a Vector the set of fitting access names Strings
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
contains
public static synchronized boolean contains(AccessName a_n) throws ArchiveManException
- Tells if there is an object associated with the given access name in the
archive.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- access_name - the reference to the object to be looked for
- Returns:
- true if the object is present in the archive, false otherwise.
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
log
public static synchronized void log(AccessName a_n,
Streamable obj) throws ArchiveManException
- Add the given object to the log base. The current date is added to the
access name.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Parameters:
- access_name - the reference to the object to be stored
- obj - the object to be archived
- Throws: ArchiveManException
- throwed when DatabaseException is caught.
readLog
public static synchronized void readLog() throws ArchiveManException
- Read the log base. Not yet implemented.
The Archive Manager must be initialized before calling this method,
otherwise an exception is risen.
- Throws: ArchiveManException
- throwed when this method is called (function
readLog not implemented).
All Packages Class Hierarchy This Package Previous Next Index