Marc Mazoué, SEPT
The archive service provides a local storage for the needs of the various managers of the SEMPER architecture. It's features are detailled in the SEMPER activity paper, 221SP035: Specification of the Archive Manager.
There is one archive per installed SEMPER application. Thus, respective data regarding different users running successively the SEMPER application will be stored in the same archive. This point must be taken into account when naming the objects to be stored in order to avoid conflicts.
The archive package includes two main parts:
Database files will be generated by the archive manager at the first initialisation and will remain after that on the user's computer hard disk. The location of these .db files is parametrisable in the semper configuration file.
The Archive Manager is mainly implemented by the class ArchiveMan. No ArchiveMan object can be instanciated, all its methods are class methods. The other public classes required to use the archive services are the class AccessName and the Archive exception classes.
This is the main class of the archive block, where services are provided. It's methods are static and it must be initialised at the SEMPER startup, what is normally done by the SEMPER bootstrap program.
The init method verifies that the database files are present and create them if necessary (at the very first init). It looks at the semper Configuration to get the path for the .db files.
The class ArchiveMan offers services for storage and retrival of data
in the local database. It's methods implement functions such as add, read,
modify or delete objects and also a search service. A secure storage can
be performed by the add method, using services of the Crypto
Objects are stored into the database under an externalized form ; all the objects that implement the Streamable interface and the objects of the standard Java classes can be archived.
Each object is recorded with some specific storage attributes : security requirement, availability requirement, and expiry date. These storage attributes must be given as parameters by the managers that asks to store an object. The ArchiveMan class has methods to read and modify the storage attributes.
Another attribute added at time storage is the current date.
The ArchiveMan class also includes a serial number generator, usable by the other managers.
That class is used for handling objects in the archive. For doing some operations with the archive, using the methods of the Archive Manager (add, read, del... an object), one manager has first to create an AccessName object. That AccessName object will be used as a key for indexing stored objects in the database.
As the access name is used to handle objects at storage time and also for further retrieval, it is up to managers of the various blocks to manage their own access names. It should be noted that the ArchiveMan.search service provides a facility for retrieving access names.
There are three exception classes :
Exceptions of that class are throwed by most of the Archive methods, particularly when an exception from the database module is caught.
Exceptions of that class are throwed by the methods of ArchiveMan when an object is not found in the archive.
Exceptions of that class are throwed by the methods of ArchiveMan when one tries to add an already existing object in the archive.
Protected classes used by the Archive Manager methods :
That class implements the the storage attributes associated with each stored object : security and availability requirements, expiry date.
That class implements the surrogate table, used to map access names to already instatiated objects. Static methods, only one Surrogate object.
Some test programs for the Archive Manager are in the Test directory
The database module is implemented using the interface defined by the
interface class Database
which has the methods store, delete, readDate, readAttr, readData, modify,
All access to the database module must be done via the Archive manager.
That class implements the database. It uses a simple storage model without
an index table. The internal records have the following structure :
<key size, key, date, storage attributes size, storage attributes, data size, data>
Some test programs for the database are in the Test/Test directory.
The current version of the archive manager offers services that allows secure storage and retrival of objects without the access control features.
Updated: February 03, 1997.