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

Conversation (JBoss Seam API Documentation) - JBoss Seam 1.1.0 bate1 API 英文版文档


org.jboss.seam.core
Class Conversation

java.lang.Object
  extended by org.jboss.seam.core.Conversation
All Implemented Interfaces:
Serializable

@Scope(value=CONVERSATION)
@Name(value="conversation")
@Intercept(value=NEVER)
public class Conversation
extends Object
implements Serializable

Allows the conversation timeout to be set per-conversation, and the conversation description and switchable outcome to be set when the application requires workspace management functionality.

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
Conversation()
           
 
Method Summary
 void begin()
          Start a long-running conversation.
 void begin(String componentName)
          Start a long-running conversation.
 void beginPageflow(String pageflowName)
           
 void changeFlushMode(FlushModeType flushMode)
          Change the flush mode of all Seam-managed peristence contexts in this conversation.
 void end()
          End a long-runnning conversation.
 String endAndRedirect()
          End a child conversation and redirect to the last defined view-id for the parent conversation.
 void endBeforeRedirect()
          End a long-runnning conversation and destroy it before a redirect.
 String getDescription()
           
 String getId()
          Get the conversation id.
 String getParentId()
          Get the id of the immediate parent of a nested conversation
 String getRootId()
          Get the id of root conversation of a nested conversation
 Integer getTimeout()
          Get the timeout for this converstaion instance.
 String getViewId()
           
static Conversation instance()
           
 boolean isLongRunning()
          Is this conversation long-running? Note that this method returns false even when the conversation has been temporarily promoted to long-running for the course of a redirect, so it does what the user really expects.
 boolean isNested()
          Is this conversation a nested conversation?
 void leave()
          Leave the scope of the current conversation
 void pop()
          "Pop" the conversation stack, switching to the parent conversation
 String redirect()
          Switch back to the last defined view-id for the current conversation.
 String redirectToParent()
          Pop the conversation stack and redirect to the last defined view-id for the parent conversation.
 String redirectToRoot()
          Switch to the root conversation and redirect to the last defined view-id for the root conversation.
 void root()
          Switch to the root conversation
 void setDescription(String description)
          Sets the description of this conversation, for use in the conversation list, breadcrumbs, or conversation switcher.
 void setTimeout(Integer timeout)
          Set the timeout for this converstaion instance.
 void setViewId(String outcome)
          Sets the JSF outcome to be used when we switch back to this conversation from the conversation list, breadcrumbs, or conversation switcher.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Conversation

public Conversation()
Method Detail

getTimeout

public Integer getTimeout()
Get the timeout for this converstaion instance.

Returns:
the timeout in millis

setTimeout

public void setTimeout(Integer timeout)
Set the timeout for this converstaion instance.

Parameters:
timeout - the timeout in millis

getId

public String getId()
Get the conversation id.


getDescription

public String getDescription()

getViewId

public String getViewId()

setDescription

public void setDescription(String description)
Sets the description of this conversation, for use in the conversation list, breadcrumbs, or conversation switcher.


setViewId

public void setViewId(String outcome)
Sets the JSF outcome to be used when we switch back to this conversation from the conversation list, breadcrumbs, or conversation switcher.


instance

public static Conversation instance()

redirect

public String redirect()
Switch back to the last defined view-id for the current conversation.


endAndRedirect

public String endAndRedirect()
End a child conversation and redirect to the last defined view-id for the parent conversation.


leave

public void leave()
Leave the scope of the current conversation


begin

public void begin()
Start a long-running conversation.


begin

public void begin(String componentName)
Start a long-running conversation.


beginPageflow

public void beginPageflow(String pageflowName)

end

public void end()
End a long-runnning conversation.


endBeforeRedirect

public void endBeforeRedirect()
End a long-runnning conversation and destroy it before a redirect.


isLongRunning

public boolean isLongRunning()
Is this conversation long-running? Note that this method returns false even when the conversation has been temporarily promoted to long-running for the course of a redirect, so it does what the user really expects.


isNested

public boolean isNested()
Is this conversation a nested conversation?


getParentId

public String getParentId()
Get the id of the immediate parent of a nested conversation


getRootId

public String getRootId()
Get the id of root conversation of a nested conversation


pop

public void pop()
"Pop" the conversation stack, switching to the parent conversation


redirectToParent

public String redirectToParent()
Pop the conversation stack and redirect to the last defined view-id for the parent conversation.


root

public void root()
Switch to the root conversation


redirectToRoot

public String redirectToRoot()
Switch to the root conversation and redirect to the last defined view-id for the root conversation.


changeFlushMode

public void changeFlushMode(FlushModeType flushMode)
Change the flush mode of all Seam-managed peristence contexts in this conversation.