be.re.repo
Interface StorageDelta

All Known Subinterfaces:
PlainStorageDelta, XMLStorageDelta

public interface StorageDelta

The interface for storage implementations that wish to store document versions in a delta file. Such modules are declared in /configuration/maps.xml using the storage element as in the following example:

 <storage>
   <mime-type>text/*</mime-type>
   <!-- Additional mime-type elements can come here. -->
   <!-- Several path elements can come here. -->
   <class>
     <name>be.re.repo.mod.TextStorageDelta</name>
     <!-- Optional URL relative to maps.xml.
     <jar>modules/my_module.jar</jar>
     -->
   </class>
 </storage>
 
 

Author:
Werner Donné

Method Summary
 boolean canDeleteIntermediate()
          Return true if the employed delta-format permits the deletion of intermediate versions.
 void delete(String version, InputStream deltaIn, OutputStream deltaOut, String mimeType, Context context)
          Delete a version from the delta.
 

Method Detail

canDeleteIntermediate

boolean canDeleteIntermediate()
Return true if the employed delta-format permits the deletion of intermediate versions. Some formats may employ a chain of transformations that don't allow the removal of an intermediate version. In that case only the last version can be deleted.


delete

void delete(String version,
            InputStream deltaIn,
            OutputStream deltaOut,
            String mimeType,
            Context context)
            throws IOException
Delete a version from the delta.

Parameters:
version - the local path of the version.
deltaIn - the stream that is currently in the repository.
deltaOut - the stream that will replace the current stream in the repository.
mimeType - the MIME type of the resource.
context - the repository context.
Throws:
IOException