public abstract class AbstractWebApp extends java.lang.Object implements WebApp, WebAppCtrl
WebApp.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractWebApp()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys this Web application.
|
java.lang.String |
getAppName()
Returns the application name, never null.
|
java.lang.Object |
getAttribute(java.lang.String name,
boolean recurse)
Returns the custom attribute associated with this object.
|
AuDecoder |
getAuDecoder()
Returns the AU decoder for this Web application,
or null if not assigned.
|
java.lang.String |
getBuild()
Returns the build identifier, such as 2007121316.
|
static java.lang.String |
getBuildStamp() |
Configuration |
getConfiguration()
Returns the configuration.
|
DesktopCache |
getDesktopCache(Session sess)
Returns the desktop cache.
|
DesktopCacheProvider |
getDesktopCacheProvider()
Returns the desktop cache provider.
|
FailoverManager |
getFailoverManager()
Returns the failover manager, or null if not available.
|
IdGenerator |
getIdGenerator()
Returns the ID generator, or null if not available.
|
SessionCache |
getSessionCache()
Returns the session cache (never null).
|
int |
getSubversion(int portion)
Returns a portion of the version in an integer by specifying its index.
|
UiEngine |
getUiEngine()
Returns the UI engine for this Web application (never null).
|
UiFactory |
getUiFactory()
Returns the UI factory for this Web application (never null).
|
java.lang.String |
getVersion()
Returns the ZK version, such as "1.1.0" and "2.0.0".
|
boolean |
hasAttribute(java.lang.String name,
boolean recurse)
Returns if a custom attribute is associated with this object.
|
void |
init(java.lang.Object context,
Configuration config)
Initializes this Web application.
|
static java.lang.String |
loadBuild()
Loads the build identifier.
|
java.lang.Object |
removeAttribute(java.lang.String name,
boolean recurse)
Removes the custom attribute associated with this scope.
|
void |
sessionDestroyed(Session sess)
Called when the native session of the specified session
has been destroyed
|
void |
sessionDidActivate(Session sess)
|
void |
sessionWillPassivate(Session sess)
|
void |
setAppName(java.lang.String name)
Sets the application name.
|
java.lang.Object |
setAttribute(java.lang.String name,
java.lang.Object value,
boolean recurse)
Sets the custom attribute associated with this scope, or the parent
scope.
|
void |
setAuDecoder(AuDecoder audec)
Sets the AU decoder for this Web application.
|
void |
setDesktopCacheProvider(DesktopCacheProvider provider)
Sets the desktop provider for this Web application.
|
void |
setFailoverManager(FailoverManager failover)
Sets the failover manager for this Web application.
|
void |
setIdGenerator(IdGenerator idgen)
Sets the ID generator for this Web application.
|
void |
setSessionCache(SessionCache cache)
Sets the session cache for this Web application.
|
void |
setUiEngine(UiEngine engine)
Sets the UI engine for this Web application.
|
void |
setUiFactory(UiFactory factory)
Sets the UI factory for this Web application.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttribute, getAttributes, getInitParameter, getInitParameterNames, getMimeType, getNativeContext, getRealPath, getResource, getResourceAsStream, getResourcePaths, getResourceURI, getResourceURI, getServletContext, getUpdateURI, getUpdateURI, getWebApp, log, log, removeAttribute, setAttributeaddScopeListener, hasAttribute, removeScopeListenergetDirectoryprotected AbstractWebApp()
Note: after constructed, it is not initialized completely.
For example, getConfiguration() returns null.
WebManager will initialize it later such as initializing
a Configuration instance by loading zk.xml,
and then calling init(java.lang.Object, org.zkoss.zk.ui.util.Configuration).
public java.lang.String getAppName()
WebAppDefault: ZK
getAppName in interface WebApppublic void setAppName(java.lang.String name)
WebAppsetAppName in interface WebApppublic final java.lang.String getVersion()
WebAppgetVersion in interface WebAppWebApp.getSubversion(int),
Utils.parseVersion(java.lang.String),
Utils.compareVersion(int[], int[])public java.lang.String getBuild()
WebAppEach time ZK is built, a different build identifier is assigned.
public static final java.lang.String getBuildStamp()
public int getSubversion(int portion)
WebAppgetSubversion in interface WebAppportion - which portion of the version; starting from 0.
If you want to retrieve the major version, specify 0.WebApp.getVersion()public final Configuration getConfiguration()
WebAppgetConfiguration in interface WebApppublic java.lang.Object getAttribute(java.lang.String name,
boolean recurse)
ScopegetAttribute in interface Scoperecurse - whether to search its ancestor scope.
If true and the current scope doen't define the attribute,
it searches up its ancestor to see
any of them has defined the specified attribute.public boolean hasAttribute(java.lang.String name,
boolean recurse)
ScopeNotice that null is a valid value, so you can
tell if an attribute is associated by examining the return value
of Scope.getAttribute(java.lang.String).
hasAttribute in interface Scoperecurse - whether to search its ancestor scope.
If true and the current scope doen't define the attribute,
it searches up its ancestor to see
any of them has defined the specified attribute.public java.lang.Object setAttribute(java.lang.String name,
java.lang.Object value,
boolean recurse)
ScopesetAttribute in interface Scoperecurse - whether to look up the parent scope for the
existence of the attribute.Scope.setAttribute(String,Object).public java.lang.Object removeAttribute(java.lang.String name,
boolean recurse)
ScoperemoveAttribute in interface Scoperecurse - whether to look up the parent scope for the
existence of the attribute.Scope.removeAttribute(String).public void init(java.lang.Object context,
Configuration config)
WebAppCtrlinit in interface WebAppCtrlcontext - the servlet context, if servlets are used.
Currently, ZK supports only servlets. In the future there might be
more to support.config - the configuration (never null)public void destroy()
WebAppCtrlNote; once destroyed, this instance cannot be used anymore.
destroy in interface WebAppCtrlpublic final UiEngine getUiEngine()
WebAppCtrlgetUiEngine in interface WebAppCtrlpublic void setUiEngine(UiEngine engine)
WebAppCtrlsetUiEngine in interface WebAppCtrlengine - the UI enginepublic DesktopCache getDesktopCache(Session sess)
WebAppCtrlWebAppCtrl.getDesktopCacheProvider()'s
DesktopCacheProvider.getDesktopCache(org.zkoss.zk.ui.Session).getDesktopCache in interface WebAppCtrlpublic DesktopCacheProvider getDesktopCacheProvider()
WebAppCtrlgetDesktopCacheProvider in interface WebAppCtrlpublic void setDesktopCacheProvider(DesktopCacheProvider provider)
WebAppCtrlsetDesktopCacheProvider in interface WebAppCtrlprovider - the desktop cache providerpublic UiFactory getUiFactory()
WebAppCtrlgetUiFactory in interface WebAppCtrlpublic void setUiFactory(UiFactory factory)
WebAppCtrlsetUiFactory in interface WebAppCtrlfactory - the UI factorypublic FailoverManager getFailoverManager()
WebAppCtrlgetFailoverManager in interface WebAppCtrlpublic void setFailoverManager(FailoverManager failover)
WebAppCtrlsetFailoverManager in interface WebAppCtrlfailover - the failover manager.
If null, it means no failover manager at all.public IdGenerator getIdGenerator()
WebAppCtrlgetIdGenerator in interface WebAppCtrlpublic void setIdGenerator(IdGenerator idgen)
WebAppCtrlsetIdGenerator in interface WebAppCtrlidgen - the ID generator.
If null, it means no (custom) ID generator at all.public SessionCache getSessionCache()
WebAppCtrlgetSessionCache in interface WebAppCtrlpublic void setSessionCache(SessionCache cache)
WebAppCtrlsetSessionCache in interface WebAppCtrlcache - the session cachepublic AuDecoder getAuDecoder()
WebAppCtrlgetAuDecoder in interface WebAppCtrlpublic void setAuDecoder(AuDecoder audec)
WebAppCtrlDefault: null (using the system default).
setAuDecoder in interface WebAppCtrlpublic void sessionWillPassivate(Session sess)
getDesktopCacheProvider()'s
DesktopCacheProvider.sessionWillPassivate(org.zkoss.zk.ui.Session).sessionWillPassivate in interface WebAppCtrlpublic void sessionDidActivate(Session sess)
getDesktopCacheProvider()'s
DesktopCacheProvider.sessionDidActivate(org.zkoss.zk.ui.Session).sessionDidActivate in interface WebAppCtrlpublic void sessionDestroyed(Session sess)
WebAppCtrlsessionDestroyed in interface WebAppCtrlpublic static java.lang.String loadBuild()
Copyright © 2005-2024 Potix Corporation. All Rights Reserved.