Package org.wicketstuff.offline.mode
Class OfflineCacheEntry
- java.lang.Object
-
- org.wicketstuff.offline.mode.OfflineCacheEntry
-
public class OfflineCacheEntry extends Object
The cache entry is used to be add a Page, a ResourceReference, an IRequestHandler or simply a String to the caching context.- Author:
- Tobias Soloschenko
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOfflineCacheEntry.CorsCORS settings to be applied to the service worker request / against the server or the cache
-
Constructor Summary
Constructors Constructor Description OfflineCacheEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetCacheObject()Gets the object to be cachedOfflineCacheEntry.CorsgetCors()Gets the cors settings of the entityPageParametersgetPageParameters()Gets the page parameters to be cachedStringgetSuffix()Gets the suffix to be placed behind the object / page parameters that are cachedOfflineCacheEntrysetCacheObject(Class<? extends Page> cacheObject)Sets the object to be cachedOfflineCacheEntrysetCacheObject(String url)Sets the object to be cachedOfflineCacheEntrysetCacheObject(IRequestHandler cacheObject)Sets the object to be cachedOfflineCacheEntrysetCacheObject(ResourceReference cacheObject)Sets the object to be cachedOfflineCacheEntrysetCors(OfflineCacheEntry.Cors cors)Sets the cors settings of the entityOfflineCacheEntrysetPageParameters(PageParameters pageParameters)Sets the page parameter to be cachedOfflineCacheEntrysetSuffix(String suffix)Sets the suffix to be placed behind the object / page parameters that are cached
-
-
-
Method Detail
-
getCacheObject
public Object getCacheObject()
Gets the object to be cached- Returns:
- the object to be cached
-
setCacheObject
public OfflineCacheEntry setCacheObject(IRequestHandler cacheObject)
Sets the object to be cached- Parameters:
cacheObject- the object to be cached- Returns:
- the current instance of the entry
-
setCacheObject
public OfflineCacheEntry setCacheObject(ResourceReference cacheObject)
Sets the object to be cached- Parameters:
cacheObject- the object to be cached- Returns:
- the current instance of the entry
-
setCacheObject
public OfflineCacheEntry setCacheObject(Class<? extends Page> cacheObject)
Sets the object to be cached- Parameters:
cacheObject- the object to be cached- Returns:
- the current instance of the entry
-
setCacheObject
public OfflineCacheEntry setCacheObject(String url)
Sets the object to be cached- Parameters:
url- the URL to be cached (e.g. /wicket/myMountedResource)- Returns:
- the current instance of the entry
-
getPageParameters
public PageParameters getPageParameters()
Gets the page parameters to be cached- Returns:
- the page parameters to be cached
-
setPageParameters
public OfflineCacheEntry setPageParameters(PageParameters pageParameters)
Sets the page parameter to be cached- Parameters:
pageParameters- the page parameters to be cached- Returns:
- the current instance of the entry
-
getSuffix
public String getSuffix()
Gets the suffix to be placed behind the object / page parameters that are cached- Returns:
- the suffix
-
setSuffix
public OfflineCacheEntry setSuffix(String suffix)
Sets the suffix to be placed behind the object / page parameters that are cached- Parameters:
suffix- to be placed behind the object / page parameters that are cached- Returns:
- the current instance of the entry
-
getCors
public OfflineCacheEntry.Cors getCors()
Gets the cors settings of the entity- Returns:
- the cors settings
-
setCors
public OfflineCacheEntry setCors(OfflineCacheEntry.Cors cors)
Sets the cors settings of the entity- Parameters:
cors- the cors settings to be used- Returns:
- the current instance of the entry
-
-