org.jboss.seam.core
@Scope(value=CONVERSATION) @Name(value="org.jboss.seam.core.conversation") @Install(precedence=0) @BypassInterceptors public class Conversation extends Object implements Serializable
Constructor and Description |
---|
Conversation() |
Modifier and Type | Method and Description |
---|---|
boolean |
begin()
Start a long-running conversation, if no long-running
conversation is active.
|
boolean |
begin(boolean join,
boolean nested)
Begin or join a conversation, or begin a new nested conversation.
|
void |
beginNested()
Start a nested conversation.
|
void |
changeFlushMode(FlushModeType flushMode)
Change the flush mode of all Seam-managed persistence
contexts in this conversation.
|
void |
end()
End a long-runnning conversation.
|
void |
end(boolean beforeRedirect)
End a long-runnning conversation.
|
boolean |
endAndRedirect()
End a child conversation and redirect to the last defined
view-id for the parent conversation.
|
boolean |
endAndRedirect(boolean endBeforeRedirect)
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.
|
Integer |
getConcurrentRequestTimeout() |
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 conversation 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 |
killAllOthers()
Kills all conversations except the current one
|
void |
leave()
Leave the scope of the current conversation
|
void |
pop()
"Pop" the conversation stack, switching to the parent conversation
|
boolean |
redirect()
Switch back to the last defined view-id for the
current conversation.
|
boolean |
redirectToParent()
Pop the conversation stack and redirect to the last defined
view-id for the parent conversation.
|
boolean |
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 |
setConcurrentRequestTimeout(Integer concurrentRequestTimeout) |
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.
|
public void killAllOthers()
public Integer getTimeout()
public void setTimeout(Integer timeout)
timeout
- the timeout in millispublic Integer getConcurrentRequestTimeout()
public void setConcurrentRequestTimeout(Integer concurrentRequestTimeout)
public String getId()
public String getDescription()
public String getViewId()
public void setDescription(String description)
public void setViewId(String outcome)
public static Conversation instance()
public boolean redirect()
public boolean endAndRedirect()
public boolean endAndRedirect(boolean endBeforeRedirect)
endBeforeRedirect
- should the conversation be destroyed before the redirect?public void leave()
public boolean begin()
public void beginNested()
IllegalStateException
- if no long-running conversation was activepublic boolean begin(boolean join, boolean nested)
join
- if a conversation is active, should we join it?nested
- if a conversation is active, should we start a new nested conversation?public void end()
public void endBeforeRedirect()
public void end(boolean beforeRedirect)
beforeRedirect
- should the conversation be destroyed before any redirect?public boolean isLongRunning()
public boolean isNested()
public String getParentId()
public String getRootId()
public void pop()
public boolean redirectToParent()
public void root()
public boolean redirectToRoot()
public void changeFlushMode(FlushModeType flushMode)
Copyright © 2015 Seam Framework. All Rights Reserved.