public synchronized ConversationEntry updateConversationId(String oldId, String newId) { ConversationEntry entry = conversationIdEntryMap.remove(oldId); if (entry==null) { return null; } else { entry.setId(newId); entry.getConversationIdStack().set(0, newId); conversationIdEntryMap.put(newId, entry); setDirty(); return entry; } }
private void endNestedConversations(String id) { for ( ConversationEntry ce: ConversationEntries.instance().getConversationEntries() ) { if ( ce.getConversationIdStack().contains(id) ) { ce.end(); } } }
private void destroyNestedConversationContexts(Map<String, Object> session, String conversationId) { List<ConversationEntry> entries = new ArrayList<ConversationEntry>( ConversationEntries.instance().getConversationEntries() ); for ( ConversationEntry ce: entries ) { if ( ce.getConversationIdStack().contains(conversationId) ) { String entryConversationId = ce.getId(); log.debug("destroying nested conversation: " + entryConversationId); destroyConversation(entryConversationId, session); } } }
List<String> idStack = currentConversationEntry.getConversationIdStack(); List<ConversationEntry> conversationEntryStack = new ArrayList<ConversationEntry>( conversationEntries.size() ); ListIterator<String> ids = idStack.listIterator( idStack.size() );
private String getConversationPropagationSuffix() { String suffix = ""; if (!conversationManager.getCurrentConversationEntry().isNested()) { String cId = conversationManager.getCurrentConversationId(); // tmp hack to handle the case when the logo is rendered // just after the page existed the conversation cId = getLastOrMainConversationId(cId); suffix += conversationManager.getConversationIdParameter() + '=' + cId; /** * if (conversationManager.isLongRunningConversation()) { suffix += '&' + * conversationManager.getConversationIsLongRunningParameter() + "true"; lastMainConversation = cId; } **/ } else { ConversationEntry conv = conversationManager.getCurrentConversationEntry(); String convId = conv.getConversationIdStack().get(0); convId = getLastOrMainConversationId(convId); suffix += conversationManager.getConversationIdParameter() + '=' + convId; /** * suffix += '&' + conversationManager.getConversationIsLongRunningParameter() + "true"; * lastMainConversation = convId; **/ } return suffix; }
setCurrentConversationIdStack( ce.getConversationIdStack() );
setCurrentConversationIdStack( ce.getConversationIdStack() ); if (promote)
touchConversationStack( ce.getConversationIdStack() ); setLongRunningConversation(true); setCurrentConversationId( ce.getId() ); setCurrentConversationIdStack( ce.getConversationIdStack() );