private void demoteConversation() { if (this.iPromotedTheConversation) { Manager.instance().setLongRunningConversation(false); this.iPromotedTheConversation = false; } }
private void demoteConversation() { if (this.iPromotedTheConversation) { Manager.instance().setLongRunningConversation(false); this.iPromotedTheConversation = false; } }
/** * Initialize a new temporary conversation context, * and assign it a conversation id. */ public void initializeTemporaryConversation() { String id = generateInitialConversationId(); setCurrentConversationId(id); createCurrentConversationIdStack(id); setLongRunningConversation(false); }
private void promoteConversation() { try { if (!Manager.instance().isLongRunningConversation()) { Manager.instance().setLongRunningConversation(true); this.iPromotedTheConversation = true; } } catch (IllegalStateException e) { // ignore } }
private void promoteConversation() { try { if (!Manager.instance().isLongRunningConversation()) { Manager.instance().setLongRunningConversation(true); this.iPromotedTheConversation = true; } } catch (IllegalStateException e) { // ignore } }
/** * 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. */ public void beforeRedirect() { //DONT BREAK, icefaces uses this if (!destroyBeforeRedirect) { ConversationEntry ce = getCurrentConversationEntry(); if (ce==null) { ce = createConversationEntry(); } //ups, we don't really want to destroy it on this request after all! ce.setRemoveAfterRedirect( !isLongRunningConversation() ); setLongRunningConversation(true); } }
/** * Promote a temporary conversation and make it long-running */ public void beginConversation() { if ( !isLongRunningConversation() ) { log.debug("Beginning long-running conversation"); setLongRunningConversation(true); createConversationEntry(); Conversation.instance(); //force instantiation of the Conversation in the outer (non-nested) conversation storeConversationToViewRootIfNecessary(); if ( Events.exists() ) Events.instance().raiseEvent(EVENT_CONVERSATION_BEGIN); } }
/** * Make a long-running conversation temporary. */ public void endConversation(boolean beforeRedirect) { if ( isLongRunningConversation() ) { log.debug("Ending long-running conversation"); if ( Events.exists() ) Events.instance().raiseEvent(EVENT_CONVERSATION_END); setLongRunningConversation(false); destroyBeforeRedirect = beforeRedirect; endNestedConversations( getCurrentConversationId() ); storeConversationToViewRootIfNecessary(); } unlockConversation(); }
if (promote) setLongRunningConversation(true);
setLongRunningConversation(true); setCurrentConversationId( ce.getId() ); setCurrentConversationIdStack( ce.getConversationIdStack() ); if (removeAfterRedirect) setLongRunningConversation(false); ce.setRemoveAfterRedirect(false);