org.zkoss.zk.ui.sys
Interface DesktopCache

All Known Implementing Classes:
SimpleDesktopCache

public interface DesktopCache

The cache used to store desktops.

Author:
tomyeh

Method Summary
 void addDesktop(Desktop desktop)
          Adds a desktop to this session.
 Desktop getDesktop(java.lang.String desktopId)
          Returns the desktop for the specified desktop ID.
 Desktop getDesktopIfAny(java.lang.String desktopId)
          Returns the desktop for the specified desktop ID, or null if not found.
 int getNextKey()
          Returns the next available key which is unique in the whole cache.
 void removeDesktop(Desktop desktop)
          Removes a desktop from this session.
 void sessionDidActivate(Session sess)
          Notification that the session has just been activated (aka., deserialized).
 void sessionWillPassivate(Session sess)
          Notification that the session is about to be passivated (aka., serialized).
 void stop()
          Called when to stop and cleanup this cache.
 

Method Detail

getNextKey

int getNextKey()
Returns the next available key which is unique in the whole cache.

Desktop uses this method to generate ID automatically.


getDesktop

Desktop getDesktop(java.lang.String desktopId)
Returns the desktop for the specified desktop ID.

Throws:
ComponentNotFoundException - is thrown if the desktop is not found

getDesktopIfAny

Desktop getDesktopIfAny(java.lang.String desktopId)
Returns the desktop for the specified desktop ID, or null if not found.


addDesktop

void addDesktop(Desktop desktop)
Adds a desktop to this session. It must be called when a desktop is created.

Application shall never access this method.


removeDesktop

void removeDesktop(Desktop desktop)
Removes a desktop from this session. It must be called when a desktop is remove.

Application shall never access this method.


sessionWillPassivate

void sessionWillPassivate(Session sess)
Notification that the session is about to be passivated (aka., serialized).


sessionDidActivate

void sessionDidActivate(Session sess)
Notification that the session has just been activated (aka., deserialized).


stop

void stop()
Called when to stop and cleanup this cache. Once stopped, the caller shall not access it any more. It cannot be called other than the implementation of DesktopCacheProvider.



Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo