org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation
Class DefaultWindowContextManager

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultWindowContextManager
All Implemented Interfaces:
Serializable, WindowContextManager, EditableWindowContextManager

@Typed
public class DefaultWindowContextManager
extends Object
implements EditableWindowContextManager

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.spi.WindowContextManager
AUTOMATED_ENTRY_POINT_PARAMETER_KEY, WINDOW_CONTEXT_ID_PARAMETER_KEY
 
Constructor Summary
protected DefaultWindowContextManager(WindowContextConfig windowContextConfig, ConversationConfig conversationConfig, ProjectStage projectStage, javax.enterprise.inject.spi.BeanManager beanManager)
           
 
Method Summary
 boolean activateWindowContext(EditableWindowContext windowContext)
          Activates the given WindowContext
 boolean activateWindowContext(String windowContextId)
          Activates the WindowContext with has the given window-id.
 void closeAllWindowContexts()
          Closes all WindowContext of the current user(-session)
 void closeCurrentWindowContext()
          Closes all conversations of the current WindowContext
 void closeWindowContext(EditableWindowContext editableWindowContext)
          Closes all conversations of the given WindowContext
 void closeWindowContext(String windowContextId)
          Closes all conversations of the WindowContext with the given window-id
 WindowContext getCurrentWindowContext()
          
 WindowContext getWindowContext(String windowContextId)
          
 Collection<EditableWindowContext> getWindowContexts()
          Exposes all WindowContext instances for the current user(-session)
protected  void init()
           
 boolean isWindowContextActive(String windowContextId)
          Evaluates if the WindowContext with the given window-id is currently active
 void restartConversations()
          Restarts all conversations of the current WindowContext
 void restartConversations(EditableWindowContext windowContext)
          Restarts all conversations of the given WindowContext
 void restartConversations(String windowContextId)
          Restarts all conversations of the WindowContext with the given window-id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWindowContextManager

protected DefaultWindowContextManager(WindowContextConfig windowContextConfig,
                                      ConversationConfig conversationConfig,
                                      ProjectStage projectStage,
                                      javax.enterprise.inject.spi.BeanManager beanManager)
Method Detail

init

protected void init()

getCurrentWindowContext

public WindowContext getCurrentWindowContext()

Specified by:
getCurrentWindowContext in interface WindowContextManager

getWindowContext

public WindowContext getWindowContext(String windowContextId)

Specified by:
getWindowContext in interface WindowContextManager

activateWindowContext

public boolean activateWindowContext(String windowContextId)
Activates the WindowContext with has the given window-id. If there is no WindowContext which has the given id a new context will be created automatically.

Specified by:
activateWindowContext in interface EditableWindowContextManager
Parameters:
windowContextId - window-id
Returns:
true if the context was created successfully, false otherwise

activateWindowContext

public boolean activateWindowContext(EditableWindowContext windowContext)
Activates the given WindowContext

Specified by:
activateWindowContext in interface EditableWindowContextManager
Parameters:
windowContext - window-context which has to be activated
Returns:
true if the context was created successfully, false otherwise

restartConversations

public void restartConversations()
Restarts all conversations of the current WindowContext

Specified by:
restartConversations in interface EditableWindowContextManager

restartConversations

public void restartConversations(String windowContextId)
Restarts all conversations of the WindowContext with the given window-id

Specified by:
restartConversations in interface EditableWindowContextManager
Parameters:
windowContextId - current window-id

restartConversations

public void restartConversations(EditableWindowContext windowContext)
Restarts all conversations of the given WindowContext

Specified by:
restartConversations in interface EditableWindowContextManager
Parameters:
windowContext - window-context which will be restarted (the conversations of it)

closeCurrentWindowContext

public void closeCurrentWindowContext()
Closes all conversations of the current WindowContext

Specified by:
closeCurrentWindowContext in interface EditableWindowContextManager

closeWindowContext

public void closeWindowContext(String windowContextId)
Closes all conversations of the WindowContext with the given window-id

Specified by:
closeWindowContext in interface EditableWindowContextManager
Parameters:
windowContextId - current window-id

closeWindowContext

public void closeWindowContext(EditableWindowContext editableWindowContext)
Closes all conversations of the given WindowContext

Specified by:
closeWindowContext in interface EditableWindowContextManager
Parameters:
editableWindowContext - window-context which will be closed (the conversations of it)

getWindowContexts

public Collection<EditableWindowContext> getWindowContexts()
Exposes all WindowContext instances for the current user(-session)

Specified by:
getWindowContexts in interface EditableWindowContextManager
Returns:
all window-contexts available in the current user(-session)

closeAllWindowContexts

public void closeAllWindowContexts()
Closes all WindowContext of the current user(-session)

Specified by:
closeAllWindowContexts in interface EditableWindowContextManager

isWindowContextActive

public boolean isWindowContextActive(String windowContextId)
Evaluates if the WindowContext with the given window-id is currently active

Specified by:
isWindowContextActive in interface EditableWindowContextManager
Parameters:
windowContextId - current window-id
Returns:
true if the window-context with the given id is active, false otherwise


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.