org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config
Class WindowContextConfig

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.core.api.config.AbstractAttributeAware
      extended by org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.WindowContextConfig
All Implemented Interfaces:
Serializable, AttributeAware, CodiConfig

@ApplicationScoped
public class WindowContextConfig
extends AbstractAttributeAware
implements CodiConfig

Author:
Gerhard Petracek
See Also:
Serialized Form

Constructor Summary
protected WindowContextConfig()
           
 
Method Summary
 int getMaxWindowContextCount()
          Restricts the number of active windows.
 int getWindowContextTimeoutInMinutes()
          Specifies the time for the timeout for a window.
 boolean isAddWindowIdToActionUrlsEnabled()
          Deprecated. 
 boolean isCloseEmptyWindowContextsEnabled()
          Allows to activate the cleanup of empty window contexts to avoid cleanup e.g.
 boolean isCloseWindowContextEventEnabled()
           
 boolean isCreateWindowContextEventEnabled()
           
 boolean isUnknownWindowIdsAllowed()
          Allows to restrict window-ids.
 boolean isUrlParameterSupported()
          Specifies if it is allowed to use URL params for forwarding the current window-id.
 
Methods inherited from class org.apache.myfaces.extensions.cdi.core.api.config.AbstractAttributeAware
containsAttribute, getAttribute, initConfig, setAttribute, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowContextConfig

protected WindowContextConfig()
Method Detail

isUrlParameterSupported

public boolean isUrlParameterSupported()
Specifies if it is allowed to use URL params for forwarding the current window-id. (deactivate it e.g. for higher security - in this case it's required to use a window id provided by a component lib or a server-side window-handler)

Returns:
true if it is allowed to add the window-id as URL parameter

isUnknownWindowIdsAllowed

public boolean isUnknownWindowIdsAllowed()
Allows to restrict window-ids. With the default window handler (esp. for JSF 1.2), URLs have to contain the window-id. If users bookmark these links, they could open 2-n tabs (with the bookmark) which have the same window-id. It isn't possible to prevent it if the session is still active, but it's possible to prevent it as soon as the session gets closed.

Returns:
true to allow window-ids which aren't generated by CODI, false otherwise

isAddWindowIdToActionUrlsEnabled

@Deprecated
public boolean isAddWindowIdToActionUrlsEnabled()
Deprecated. 

if set to true CODI will add a windowId=xxx parameter while encoding each action URL.


getWindowContextTimeoutInMinutes

public int getWindowContextTimeoutInMinutes()
Specifies the time for the timeout for a window. After a timeout is detected all beans which are only linked to the window will be destroyed.

Returns:
the time for the timeout for a window

getMaxWindowContextCount

public int getMaxWindowContextCount()
Restricts the number of active windows.

Returns:
limit for active windows

isCloseEmptyWindowContextsEnabled

public boolean isCloseEmptyWindowContextsEnabled()
Allows to activate the cleanup of empty window contexts to avoid cleanup e.g. of the eldest window context instances if the max. count is reached.

Returns:
true for activating it, false otherwise

isCreateWindowContextEventEnabled

public boolean isCreateWindowContextEventEnabled()

isCloseWindowContextEventEnabled

public boolean isCloseWindowContextEventEnabled()


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