/** * Get the id of the immediate parent of a nested conversation */ public String getParentId() { return Manager.instance().getParentConversationId(); }
public String getParentConversationViewId() { ConversationEntry conversationEntry = ConversationEntries.instance().getConversationEntry(getParentConversationId()); return conversationEntry==null ? null : conversationEntry.getViewId(); }
private void updateConversationId() { Manager manager = Manager.instance(); conversationId = manager.isLongRunningConversation() ? manager.getCurrentConversationId() : manager.getParentConversationId(); }
.append(paramName) .append('=') .append( encode( getParentConversationId() ) ) .toString(); .append(parentConversationIdParameter) .append('=') .append( encode( getParentConversationId() ) );
public boolean isCurrent() { Manager manager = Manager.instance(); if ( manager.isLongRunningConversation() ) { return id.equals( manager.getCurrentConversationId() ); } else if ( manager.isNestedConversation() ) { return id.equals( manager.getParentConversationId() ); } else { return false; } }
private String getLongRunningConversationId() { Manager manager = Manager.instance(); if ( manager.isLongRunningConversation() ) { return manager.getCurrentConversationId(); } else if ( manager.isNestedConversation() ) { return manager.getParentConversationId(); } else { //TODO: is there any way to set it to the current outcome, instead of null? return null; } }
public void unlockConversation() { ConversationEntry ce = getCurrentConversationEntry(); if (ce!=null) { if ( ce.isLockedByCurrentThread() ) { ce.unlock(); } } else if ( isNestedConversation() ) { ConversationEntries.instance().getConversationEntry( getParentConversationId() ).unlock(); } }
public void storeConversation() { Manager manager = Manager.instance(); //we only need to execute this code when we are in the //RENDER_RESPONSE phase, ie. not before redirects Session session = Session.getInstance(); boolean sessionInvalid = session!=null && session.isInvalid(); if ( !sessionInvalid && manager.isLongRunningConversation() ) { storeConversation( manager.getCurrentConversationId() ); } else if ( !sessionInvalid && manager.isNestedConversation() ) { discardNestedConversation( manager.getParentConversationId() ); } else { discardTemporaryConversation(); } /*if ( !sessionInvalid && Init.instance().isClientSideConversations() ) { // if we are using client-side conversations, put the // map containing the conversation context variables // into the view root (or remove it for a temp // conversation context) Contexts.getConversationContext().flush(); }*/ }