use of org.alfresco.filesys.repo.ContentDiskDriver2 in project alfresco-repository by Alfresco.
the class ServerConfigurationBean method isContentDiskDriver2.
/**
* Returns true if either: the disk interface is a ContentDiskDriver2; or
* the disk interface is a {@link BufferedContentDiskDriver} and its disk
* interface is a ContentDiskDriver2 (wrapped by several other DiskInterface objects).
*
* @param diskInterface ExtendedDiskInterface
* @return boolean
*/
private boolean isContentDiskDriver2(ExtendedDiskInterface diskInterface) {
if (diskInterface instanceof ContentDiskDriver2) {
return true;
}
if (diskInterface instanceof BufferedContentDiskDriver) {
BufferedContentDiskDriver bufferedDriver = (BufferedContentDiskDriver) diskInterface;
ExtendedDiskInterface underlyingDriver = bufferedDriver.getDiskInterface();
if (underlyingDriver instanceof LegacyFileStateDriver) {
LegacyFileStateDriver legacyDriver = (LegacyFileStateDriver) underlyingDriver;
underlyingDriver = legacyDriver.getDiskInterface();
if (underlyingDriver instanceof NonTransactionalRuleContentDiskDriver) {
// say for sure if it is a ContentDiskDriver2.
return true;
}
}
}
return false;
}
Aggregations