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

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

@SessionScoped
@Named(value="windowContextManager")
public class EditableWindowContextManagerProxy
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 EditableWindowContextManagerProxy()
           
  EditableWindowContextManagerProxy(WindowContextConfig windowContextConfig, ConversationConfig conversationConfig, javax.enterprise.inject.spi.BeanManager beanManager)
          Workaround for a producer-method which produces a session-scoped instance.
 
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 windowContext)
          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)
 boolean isWindowContextActive(String windowContextId)
          Evaluates if the WindowContext with the given window-id is currently active
protected  void preDestroy()
           
 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

EditableWindowContextManagerProxy

protected EditableWindowContextManagerProxy()

EditableWindowContextManagerProxy

@Inject
public EditableWindowContextManagerProxy(WindowContextConfig windowContextConfig,
                                                ConversationConfig conversationConfig,
                                                javax.enterprise.inject.spi.BeanManager beanManager)
Workaround for a producer-method which produces a session-scoped instance. Workaround for Weld 1.x

Parameters:
windowContextConfig - current windowContextConfig
conversationConfig - current conversationConfig
beanManager - current beanManager
Method Detail

preDestroy

@PreDestroy
protected void preDestroy()

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 windowContext)
Closes all conversations of the given WindowContext

Specified by:
closeWindowContext in interface EditableWindowContextManager
Parameters:
windowContext - 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

getCurrentWindowContext

public WindowContext getCurrentWindowContext()

Specified by:
getCurrentWindowContext in interface WindowContextManager

getWindowContext

public WindowContext getWindowContext(String windowContextId)

Specified by:
getWindowContext in interface WindowContextManager

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.