com.openexchange.file.storage.composition.IDBasedF ileAccessFactory has been extended by method:

IDBasedAdministrativeFileAccess createAccess(int contextId);

Via this method an instance of com.openexchange.file.storage.composition.IDBasedA dministrativeFileAccess can be obtained. It's method signatures are:

boolean supports(String id) throws OXException;
File getFileMetadata(String id, String version) throws OXException;
void saveFileMetadata(File document, long sequenceNumber, List<File.Field> modifiedColumns) throws OXException;
void removeDocument(String id) throws OXException;
void removeDocuments(List<String> ids) throws OXException;


On the SPI layer a new interface com.openexchange.file.storage.AdministrativeFileSt orageService was introduced, which extends com.openexchange.file.storage.FileStorageService. Implementations of FileStorageService that want or need to allow administrative operations are encouraged to implement this new interface. It provides the following method signature:

AdministrativeFileStorageFileAccess getAdministrativeFileAccess(String accountId, int contextId) throws OXException;


The interface com.openexchange.file.storage.AdministrativeFileSt orageFileAccess finally provides the necessary administrative methods:

File getFileMetadata(String folderId, String id, String version) throws OXException;
void saveFileMetadata(File document, long sequenceNumber, List<File.Field> modifiedColumns) throws OXException;
void removeDocument(String folderId, String id) throws OXException;
void removeDocuments(List<IDTuple> ids) throws OXException;

com.openexchange.file.storage.infostore.internal.A dministrativeInfostoreFileAccess can be seen as a reference implementation.