use of org.olat.core.util.vfs.FileStorage in project OpenOLAT by OpenOLAT.
the class MailManagerImpl method afterPropertiesSet.
@Override
public void afterPropertiesSet() throws Exception {
VFSContainer root = mailModule.getRootForAttachments();
attachmentStorage = new FileStorage(root);
PublisherData pdata = getPublisherData();
SubscriptionContext scontext = getSubscriptionContext();
notificationsManager.getOrCreatePublisher(scontext, pdata);
Properties p = null;
try {
velocityEngine = new VelocityEngine();
p = new Properties();
p.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.SimpleLog4JLogSystem");
p.setProperty(RuntimeConstants.RESOURCE_MANAGER_CACHE_CLASS, "org.olat.core.gui.render.velocity.InfinispanResourceCache");
p.setProperty("runtime.log.logsystem.log4j.category", "syslog");
velocityEngine.init(p);
} catch (Exception e) {
throw new RuntimeException("config error " + p.toString());
}
}
use of org.olat.core.util.vfs.FileStorage in project OpenOLAT by OpenOLAT.
the class CertificatesManagerImpl method afterPropertiesSet.
@Override
public void afterPropertiesSet() {
// create the folders
getCertificateTemplatesRoot();
templatesStorage = new FileStorage(getCertificateTemplatesRootContainer());
getCertificateRoot();
usersStorage = new FileStorage(getCertificateRootContainer());
Properties p = null;
try {
velocityEngine = new VelocityEngine();
p = new Properties();
p.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.SimpleLog4JLogSystem");
p.setProperty("runtime.log.logsystem.log4j.category", "syslog");
velocityEngine.init(p);
} catch (Exception e) {
throw new RuntimeException("config error " + p.toString());
}
// deploy script
try (InputStream inRasteriez = CertificatesManager.class.getResourceAsStream("rasterize.js")) {
Path rasterizePath = getRasterizePath();
Files.copy(inRasteriez, rasterizePath, StandardCopyOption.REPLACE_EXISTING);
} catch (Exception e) {
log.error("Can not read rasterize.js library for PhantomJS PDF generation", e);
}
try (InputStream inQRCodeLib = CertificatesManager.class.getResourceAsStream("qrcode.min.js")) {
Path qrCodeLibPath = getQRCodeLibPath();
Files.copy(inQRCodeLib, qrCodeLibPath, StandardCopyOption.REPLACE_EXISTING);
} catch (Exception e) {
log.error("Can not read qrcode.min.js for QR Code PDF generation", e);
}
// start the queues
try {
startQueue();
} catch (JMSException e) {
log.error("", e);
}
}
use of org.olat.core.util.vfs.FileStorage in project openolat by klemens.
the class MailManagerImpl method afterPropertiesSet.
@Override
public void afterPropertiesSet() throws Exception {
VFSContainer root = mailModule.getRootForAttachments();
attachmentStorage = new FileStorage(root);
PublisherData pdata = getPublisherData();
SubscriptionContext scontext = getSubscriptionContext();
notificationsManager.getOrCreatePublisher(scontext, pdata);
Properties p = null;
try {
velocityEngine = new VelocityEngine();
p = new Properties();
p.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.SimpleLog4JLogSystem");
p.setProperty(RuntimeConstants.RESOURCE_MANAGER_CACHE_CLASS, "org.olat.core.gui.render.velocity.InfinispanResourceCache");
p.setProperty("runtime.log.logsystem.log4j.category", "syslog");
velocityEngine.init(p);
} catch (Exception e) {
throw new RuntimeException("config error " + p.toString());
}
}
use of org.olat.core.util.vfs.FileStorage in project openolat by klemens.
the class QPoolFileStorage method init.
@PostConstruct
public void init() {
VFSContainer rootContainer = qpoolModule.getRootContainer();
fileStorage = new FileStorage(rootContainer);
}
use of org.olat.core.util.vfs.FileStorage in project OpenOLAT by OpenOLAT.
the class QPoolFileStorage method init.
@PostConstruct
public void init() {
VFSContainer rootContainer = qpoolModule.getRootContainer();
fileStorage = new FileStorage(rootContainer);
}
Aggregations