org.alfresco.web.app.context
Class UIContextService

java.lang.Object
  extended by org.alfresco.web.app.context.UIContextService
All Implemented Interfaces:
java.io.Serializable

public final class UIContextService
extends java.lang.Object
implements java.io.Serializable

Beans supporting the IContextListener interface are registered against this class. Then Beans which wish to indicate that the UI should refresh itself i.e. dump all cached data and settings, call the UIContextService.notifyBeans() to inform all registered instances of the change.

Registered beans will also be informed of changes in location, for example when the current space changes or when the user has changed area i.e. from company home to my home.

See Also:
Serialized Form

Method Summary
 void areaChanged()
          Call to notify all register beans that the area i.e.
static UIContextService getInstance(javax.faces.context.FacesContext fc)
          Returns a Session local instance of the UIContextService
 void notifyBeans()
          Call to notify all register beans that the UI context has changed and they should refresh themselves as appropriate.
 void registerBean(IContextListener bean)
          Register a bean to be informed of context events
 void spaceChanged()
          Call to notify all register beans that the current space has changed and they should refresh themselves as appropriate.
 void unregisterBean(IContextListener bean)
          Remove a bean reference from those notified of changes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UIContextService getInstance(javax.faces.context.FacesContext fc)
Returns a Session local instance of the UIContextService

Returns:
UIContextService for this Thread

registerBean

public void registerBean(IContextListener bean)
Register a bean to be informed of context events

Parameters:
bean - Conforming to the IContextListener interface

unregisterBean

public void unregisterBean(IContextListener bean)
Remove a bean reference from those notified of changes

Parameters:
bean - Conforming to the IContextListener interface

notifyBeans

public void notifyBeans()
Call to notify all register beans that the UI context has changed and they should refresh themselves as appropriate.


spaceChanged

public void spaceChanged()
Call to notify all register beans that the current space has changed and they should refresh themselves as appropriate.


areaChanged

public void areaChanged()
Call to notify all register beans that the area i.e. my home, has changed and they should refresh themselves as appropriate.



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.