The interface

IDS plugins have three interfaces to implement. Please see the Javadoc for details. The IDS has a two level storage model with main storage and an optional archive storage. The main storage deals with individual data files whereas the archive storage deals with zip files holding all the datafiles of a dataset. In addition the ZipMapperInterface must be implemented to define the structure of the Zip file which is used for downloads and for archive storage.

If you only have main storage then a number of the calls to main storage will not be used. An abstract implementation is provided MainStorageWithoutArchive which only leaves three methods to implement: get, put and delete. The methods "get" and "delete just take a datafile location as stored in the ICAT datafile object. The "put" method takes a DsInfo object, a datafile name and an InpuStream. The DsInfo provides a lot of information for the implementation to decide what location to give the file it must store it there and return the location.

Finally if you don't want to support write operations (uploading and deletion of files) then there is another abstract implementation MainStorageWithoutArchiveReadOnly which only needs the "get" method to be implemented. In this case please set the readOnly flag in the ids.properties when you deploy.

Packaging

The IDS expects to find its plugins in lib/applibs below the domain directory. The plugins must be packaged will all dependencies - because of the way the Glassfish classloader works and after deployment Glassfish must be redeployed. Please see the file storage plugin as an example of how to do it.