站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Seam 1.0.0 API 英文版文档

Manager (JBoss Seam API Documentation) - JBoss Seam 1.0.0 API 英文版文档


org.jboss.seam.core
Class Manager

java.lang.Object
  extended by org.jboss.seam.core.Manager

@Scope(value=EVENT)
@Name(value="org.jboss.seam.core.manager")
@Intercept(value=NEVER)
public class Manager
extends Object

The Seam conversation manager.

Version:
$Revision: 1.63 $
Author:
Gavin King, Thomas Heute

Field Summary
static String CONVERSATION_ID
           
static String CONVERSATION_ID_MAP
           
static String PAGEFLOW_COUNTER
           
static String PAGEFLOW_NODE_NAME
           
 
Constructor Summary
Manager()
           
 
Method Summary
 void beforeRedirect()
          Temporarily promote a temporary conversation to a long running conversation for the duration of a browser redirect.
 void beginConversation(String initiator)
          Promote a temporary conversation and make it long-running
 void beginNestedConversation(String ownerName)
          Begin a new nested conversation.
 void conversationTimeout(javax.faces.context.ExternalContext externalContext)
          Clean up timed-out conversations
 String encodeConversationId(String url)
          Beware of side-effect!
 void endConversation()
          Make a long-running conversation temporary.
 void flushConversationIdMapToSession()
           
 Map<String,ConversationEntry> getConversationIdEntryMap()
           
 int getConversationTimeout()
           
 String getCurrentConversationDescription()
           
 ConversationEntry getCurrentConversationEntry()
           
 String getCurrentConversationId()
           
 LinkedList<String> getCurrentConversationIdStack()
           
 Object getCurrentConversationInitiator()
          Get the name of the component that started the current conversation.
 String getCurrentConversationViewId()
           
 String getParentConversationId()
           
 String getParentConversationViewId()
           
 Set<String> getSessionConversationIds()
           
 void handleConversationPropagation(Map parameters)
          Look for a conversation propagation style in the request parameters and begin, nest or join the conversation, as necessary.
 void initializeTemporaryConversation()
          Initialize a new temporary conversation context, and assign it a conversation id.
static Manager instance()
           
 void interpolateAndRedirect(String url)
           
 boolean isLongRunningConversation()
           
 void leaveConversation()
          Leave the scope of the current conversation, leaving it completely intact.
 void prepareBackswitch(javax.faces.event.PhaseEvent event)
          If a page description is defined, remember the description and view id for the current page, to support conversation switching.
 void redirect(String viewId)
          Redirect to the given view id, encoding the conversation id into the request URL.
 void redirect(String viewId, Map<String,Object> parameters, boolean includeConversationId)
          Redirect to the given view id, after encoding parameters and conversation id into the request URL.
 void restoreConversation(Map parameters)
          Initialize the request conversation context, taking into account conversation propagation style, and any conversation id passed as a request parameter or in the PAGE context.
 void restoreConversation(String storedConversationId)
          Initialize the request conversation context, given the conversation id.
 void setConversationTimeout(int conversationTimeout)
           
 void setCurrentConversationDescription(String description)
           
 void setCurrentConversationId(String id)
           
 void setCurrentConversationTimeout(int timeout)
           
 void setCurrentConversationViewId(String viewId)
           
 void setLongRunningConversation(boolean isLongRunningConversation)
           
 void storeConversation(Session session, Object response)
          Flush the server-side conversation context to the session and write the conversation id and pageflow info to the response if we have a long running conversation, or discard the state of a temporary conversation.
 boolean swapConversation(String id)
          Switch to another long-running conversation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONVERSATION_ID_MAP

public static final String CONVERSATION_ID_MAP

CONVERSATION_ID

public static final String CONVERSATION_ID

PAGEFLOW_COUNTER

public static final String PAGEFLOW_COUNTER

PAGEFLOW_NODE_NAME

public static final String PAGEFLOW_NODE_NAME
Constructor Detail

Manager

public Manager()
Method Detail

getCurrentConversationId

public String getCurrentConversationId()

setCurrentConversationId

public void setCurrentConversationId(String id)

getSessionConversationIds

public Set<String> getSessionConversationIds()

getConversationIdEntryMap

public Map<String,ConversationEntry> getConversationIdEntryMap()

getCurrentConversationInitiator

public Object getCurrentConversationInitiator()
Get the name of the component that started the current conversation.


getCurrentConversationIdStack

public LinkedList<String> getCurrentConversationIdStack()

setCurrentConversationDescription

public void setCurrentConversationDescription(String description)

setCurrentConversationViewId

public void setCurrentConversationViewId(String viewId)

setCurrentConversationTimeout

public void setCurrentConversationTimeout(int timeout)

getCurrentConversationDescription

public String getCurrentConversationDescription()

getCurrentConversationViewId

public String getCurrentConversationViewId()

getParentConversationViewId

public String getParentConversationViewId()

getParentConversationId

public String getParentConversationId()

flushConversationIdMapToSession

@Destroy
public void flushConversationIdMapToSession()

isLongRunningConversation

public boolean isLongRunningConversation()

setLongRunningConversation

public void setLongRunningConversation(boolean isLongRunningConversation)

instance

public static Manager instance()

conversationTimeout

public void conversationTimeout(javax.faces.context.ExternalContext externalContext)
Clean up timed-out conversations


storeConversation

public void storeConversation(Session session,
                              Object response)
Flush the server-side conversation context to the session and write the conversation id and pageflow info to the response if we have a long running conversation, or discard the state of a temporary conversation.


restoreConversation

public void restoreConversation(Map parameters)
Initialize the request conversation context, taking into account conversation propagation style, and any conversation id passed as a request parameter or in the PAGE context.

Parameters:
parameters - the request parameters

handleConversationPropagation

public void handleConversationPropagation(Map parameters)
Look for a conversation propagation style in the request parameters and begin, nest or join the conversation, as necessary.

Parameters:
parameters - the request parameters

restoreConversation

public void restoreConversation(String storedConversationId)
Initialize the request conversation context, given the conversation id.


initializeTemporaryConversation

public void initializeTemporaryConversation()
Initialize a new temporary conversation context, and assign it a conversation id.


beginConversation

public void beginConversation(String initiator)
Promote a temporary conversation and make it long-running

Parameters:
initiator - the name of the component starting the conversation.

endConversation

public void endConversation()
Make a long-running conversation temporary.


beginNestedConversation

public void beginNestedConversation(String ownerName)
Begin a new nested conversation.

Parameters:
ownerName - the name of the component starting the conversation

getCurrentConversationEntry

public ConversationEntry getCurrentConversationEntry()

leaveConversation

public void leaveConversation()
Leave the scope of the current conversation, leaving it completely intact.


swapConversation

public boolean swapConversation(String id)
Switch to another long-running conversation.

Parameters:
id - the id of the conversation to switch to
Returns:
true if the conversation exists

getConversationTimeout

public int getConversationTimeout()

setConversationTimeout

public void setConversationTimeout(int conversationTimeout)

beforeRedirect

public void beforeRedirect()
Temporarily promote a temporary conversation to a long running conversation for the duration of a browser redirect. After the redirect, the conversation will be demoted back to a temporary conversation.


encodeConversationId

public String encodeConversationId(String url)
Beware of side-effect!


redirect

public void redirect(String viewId)
Redirect to the given view id, encoding the conversation id into the request URL.

Parameters:
viewId - the JSF view id

interpolateAndRedirect

public void interpolateAndRedirect(String url)

redirect

public void redirect(String viewId,
                     Map<String,Object> parameters,
                     boolean includeConversationId)
Redirect to the given view id, after encoding parameters and conversation id into the request URL.

Parameters:
viewId - the JSF view id
parameters - request parameters to be encoded
includeConversationId - determines if the conversation id is to be encoded

prepareBackswitch

public void prepareBackswitch(javax.faces.event.PhaseEvent event)
If a page description is defined, remember the description and view id for the current page, to support conversation switching.