use of org.olat.fileresource.ZippedDirectoryMediaResource in project openolat by klemens.
the class EvaluationFormHandler method getAsMediaResource.
/**
* Transform the map in a XML file and zip it (Repository export want a zip)
* @see org.olat.repository.handlers.RepositoryHandler#getAsMediaResource(org.olat.core.id.OLATResourceable)
*/
@Override
public MediaResource getAsMediaResource(OLATResourceable res, boolean backwardsCompatible) {
File unzippedDir = FileResourceManager.getInstance().unzipFileResource(res);
String displayName = repositoryManager.lookupDisplayNameByOLATResourceableId(res.getResourceableId());
return new ZippedDirectoryMediaResource(displayName, unzippedDir);
}
use of org.olat.fileresource.ZippedDirectoryMediaResource in project OpenOLAT by OpenOLAT.
the class ImsCPHandler method getAsMediaResource.
@Override
public MediaResource getAsMediaResource(OLATResourceable res, boolean backwardsCompatible) {
File unzippedDir = FileResourceManager.getInstance().unzipFileResource(res);
String displayName = CoreSpringFactory.getImpl(RepositoryManager.class).lookupDisplayNameByOLATResourceableId(res.getResourceableId());
return new ZippedDirectoryMediaResource(displayName, unzippedDir);
}
use of org.olat.fileresource.ZippedDirectoryMediaResource in project openolat by klemens.
the class SCORMCPHandler method getAsMediaResource.
@Override
public MediaResource getAsMediaResource(OLATResourceable res, boolean backwardsCompatible) {
File unzippedDir = FileResourceManager.getInstance().unzipFileResource(res);
String displayName = CoreSpringFactory.getImpl(RepositoryManager.class).lookupDisplayNameByOLATResourceableId(res.getResourceableId());
return new ZippedDirectoryMediaResource(displayName, unzippedDir);
}
Aggregations