Example usage for org.apache.wicket.settings StoreSettings getFileStoreFolder

List of usage examples for org.apache.wicket.settings StoreSettings getFileStoreFolder

Introduction

In this page you can find the example usage for org.apache.wicket.settings StoreSettings getFileStoreFolder.

Prototype

public File getFileStoreFolder() 

Source Link

Usage

From source file:de.alpharogroup.wicket.base.application.BaseWebApplication.java

License:Apache License

/**
 * Factory method that can be overwritten to provide an application data store. Here the default
 * will be returned./*from w  w w. j a  va  2 s.  co  m*/
 *
 * For instance:
 *
 * <pre>
 * public void init() {
 * ...
 * getStoreSettings().setInmemoryCacheSize(30);
 *
 * setPageManagerProvider(new DefaultPageManagerProvider(this)
 * {
 *    &#064;Override
 *    protected IDataStore newDataStore()
 *    {
 *       return newApplicationDataStore();
 *    }
 * });
 * ...
 * }
 * </pre>
 *
 * @return the IDataStore.
 */
protected IDataStore newApplicationDataStore() {
    final StoreSettings storeSettings = getStoreSettings();
    final Bytes maxSizePerSession = storeSettings.getMaxSizePerSession();
    final File fileStoreFolder = storeSettings.getFileStoreFolder();
    return new DiskDataStore(this.getName(), fileStoreFolder, maxSizePerSession);
}