Search in sources :

Example 1 with BinderDeliveryOptions

use of org.olat.modules.portfolio.BinderDeliveryOptions in project OpenOLAT by OpenOLAT.

the class PortfolioServiceImpl method getDeliveryOptions.

@Override
public BinderDeliveryOptions getDeliveryOptions(OLATResource resource) {
    FileResourceManager frm = FileResourceManager.getInstance();
    File reFolder = frm.getFileResourceRoot(resource);
    File configXml = new File(reFolder, PACKAGE_CONFIG_FILE_NAME);
    BinderDeliveryOptions config;
    if (configXml.exists()) {
        config = (BinderDeliveryOptions) configXstream.fromXML(configXml);
    } else {
        // set default config
        config = BinderDeliveryOptions.defaultOptions();
        setDeliveryOptions(resource, config);
    }
    return config;
}
Also used : BinderDeliveryOptions(org.olat.modules.portfolio.BinderDeliveryOptions) FileResourceManager(org.olat.fileresource.FileResourceManager) File(java.io.File)

Example 2 with BinderDeliveryOptions

use of org.olat.modules.portfolio.BinderDeliveryOptions in project openolat by klemens.

the class PortfolioServiceImpl method getDeliveryOptions.

@Override
public BinderDeliveryOptions getDeliveryOptions(OLATResource resource) {
    FileResourceManager frm = FileResourceManager.getInstance();
    File reFolder = frm.getFileResourceRoot(resource);
    File configXml = new File(reFolder, PACKAGE_CONFIG_FILE_NAME);
    BinderDeliveryOptions config;
    if (configXml.exists()) {
        config = (BinderDeliveryOptions) configXstream.fromXML(configXml);
    } else {
        // set default config
        config = BinderDeliveryOptions.defaultOptions();
        setDeliveryOptions(resource, config);
    }
    return config;
}
Also used : BinderDeliveryOptions(org.olat.modules.portfolio.BinderDeliveryOptions) FileResourceManager(org.olat.fileresource.FileResourceManager) File(java.io.File)

Aggregations

File (java.io.File)2 FileResourceManager (org.olat.fileresource.FileResourceManager)2 BinderDeliveryOptions (org.olat.modules.portfolio.BinderDeliveryOptions)2