|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.impl.AbstractWebApp
public abstract class AbstractWebApp
A skeletal implementation of WebApp.
| Constructor Summary | |
|---|---|
protected |
AbstractWebApp()
Constructor. |
| Method Summary | |
|---|---|
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. |
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)
Invokes getDesktopCacheProvider()'s
DesktopCacheProvider.sessionDidActivate(org.zkoss.zk.ui.Session). |
void |
sessionWillPassivate(Session sess)
Invokes getDesktopCacheProvider()'s
DesktopCacheProvider.sessionWillPassivate(org.zkoss.zk.ui.Session). |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.zkoss.zk.ui.WebApp |
|---|
getAttribute, getAttributes, getInitParameter, getInitParameterNames, getMimeType, getNativeContext, getRealPath, getResource, getResourceAsStream, getResourcePaths, getServletContext, getUpdateURI, getUpdateURI, getWebApp, log, log, removeAttribute, setAttribute |
| Methods inherited from interface org.zkoss.zk.ui.ext.Scope |
|---|
addScopeListener, hasAttribute, removeScopeListener |
| Methods inherited from interface org.zkoss.util.resource.Locator |
|---|
getDirectory |
| Constructor Detail |
|---|
protected 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).
| Method Detail |
|---|
public java.lang.String getAppName()
WebAppDefault: ZK
getAppName in interface WebApppublic void setAppName(java.lang.String name)
WebApp
setAppName in interface WebApppublic final java.lang.String getVersion()
WebApp
getVersion in interface WebAppWebApp.getSubversion(int),
Utils.parseVersion(java.lang.String),
Utils.compareVersion(int[], int[])public final java.lang.String getBuild()
WebAppEach time ZK is built, a different build identifier is assigned.
getBuild in interface WebApppublic int getSubversion(int portion)
WebApp
getSubversion 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()
WebApp
getConfiguration in interface WebApp
public java.lang.Object getAttribute(java.lang.String name,
boolean recurse)
Scope
getAttribute 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)
Scope
setAttribute 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)
Scope
removeAttribute 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)
WebAppCtrl
init 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()
WebAppCtrl
getUiEngine in interface WebAppCtrlpublic void setUiEngine(UiEngine engine)
WebAppCtrl
setUiEngine 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()
WebAppCtrl
getDesktopCacheProvider in interface WebAppCtrlpublic void setDesktopCacheProvider(DesktopCacheProvider provider)
WebAppCtrl
setDesktopCacheProvider in interface WebAppCtrlprovider - the desktop cache providerpublic UiFactory getUiFactory()
WebAppCtrl
getUiFactory in interface WebAppCtrlpublic void setUiFactory(UiFactory factory)
WebAppCtrl
setUiFactory in interface WebAppCtrlfactory - the UI factorypublic FailoverManager getFailoverManager()
WebAppCtrl
getFailoverManager in interface WebAppCtrlpublic void setFailoverManager(FailoverManager failover)
WebAppCtrl
setFailoverManager in interface WebAppCtrlfailover - the failover manager.
If null, it means no failover manager at all.public IdGenerator getIdGenerator()
WebAppCtrl
getIdGenerator in interface WebAppCtrlpublic void setIdGenerator(IdGenerator idgen)
WebAppCtrl
setIdGenerator in interface WebAppCtrlidgen - the ID generator.
If null, it means no (custom) ID generator at all.public SessionCache getSessionCache()
WebAppCtrl
getSessionCache in interface WebAppCtrlpublic void setSessionCache(SessionCache cache)
WebAppCtrl
setSessionCache in interface WebAppCtrlcache - the session cachepublic AuDecoder getAuDecoder()
WebAppCtrl
getAuDecoder 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)
WebAppCtrl
sessionDestroyed in interface WebAppCtrlpublic static java.lang.String loadBuild()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||