com.vaadin.addon.touchkit.settings
Class ApplicationCacheSettings

java.lang.Object
  extended by com.vaadin.addon.touchkit.settings.ApplicationCacheSettings
All Implemented Interfaces:
com.vaadin.server.BootstrapListener, Serializable, EventListener

public class ApplicationCacheSettings
extends Object
implements com.vaadin.server.BootstrapListener

This class is used to control HTML5 application cache settings.

See Also:
Serialized Form

Constructor Summary
ApplicationCacheSettings()
           
 
Method Summary
protected  String generateManifestFileName(com.vaadin.server.BootstrapPageResponse response)
          Generates the manifest file name for the given page response
 boolean isCacheManifestEnabled()
           
 void modifyBootstrapFragment(com.vaadin.server.BootstrapFragmentResponse response)
           
 void modifyBootstrapPage(com.vaadin.server.BootstrapPageResponse response)
           
 void setCacheManifestEnabled(boolean cacheManifestEnabled)
          Enable or disable the cache manifest (and thus application cache).
 void setUpdateCheckInterval(int interval)
          Specifies how often to check for and download updates to the application cache (== widget set).
 void setUpdateNowMessage(String message)
          Specifies the message to show when an update to the application cache is available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationCacheSettings

public ApplicationCacheSettings()
Method Detail

modifyBootstrapFragment

public void modifyBootstrapFragment(com.vaadin.server.BootstrapFragmentResponse response)
Specified by:
modifyBootstrapFragment in interface com.vaadin.server.BootstrapListener

modifyBootstrapPage

public void modifyBootstrapPage(com.vaadin.server.BootstrapPageResponse response)
Specified by:
modifyBootstrapPage in interface com.vaadin.server.BootstrapListener

generateManifestFileName

protected String generateManifestFileName(com.vaadin.server.BootstrapPageResponse response)
Generates the manifest file name for the given page response

Parameters:
response - Page response where the manifest will be added.
Returns:
The manifest file name, eg. "safari.manifest".

isCacheManifestEnabled

public boolean isCacheManifestEnabled()
Returns:
true if the cache manifest (and thus application cache) is enabled.

setCacheManifestEnabled

public void setCacheManifestEnabled(boolean cacheManifestEnabled)
Enable or disable the cache manifest (and thus application cache).

Parameters:
cacheManifestEnabled - true to enable.

setUpdateNowMessage

public void setUpdateNowMessage(String message)
Specifies the message to show when an update to the application cache is available. When a new version of the application cache has been loaded by the client, this message is shown in a confirmation box. Answering 'OK' in this box causes the application to refresh and use the new application cache (== new version of the widget set).

Parameters:
message - The new message. The default is "There are updates ready to be installed. Would you like to restart now?"

setUpdateCheckInterval

public void setUpdateCheckInterval(int interval)
Specifies how often to check for and download updates to the application cache (== widget set).

Parameters:
interval - The interval in seconds. The default is 30 minutes (1800 seconds).


Copyright © 2014 Vaadin Ltd. All rights reserved.