Examples of Conversation


Examples of org.gatein.pc.test.unit.protocol.Conversation

   }

   @Test
   public final void test() throws Exception
   {
      new Conversation(getBaseURL(), name).performInteractions();
   }
View Full Code Here

Examples of org.jboss.seam.core.Conversation

    * Called just before the render phase.
    */
   public void prepareBackswitch(FacesContext facesContext)
   {
     
      Conversation conversation = Conversation.instance();

      //stuff from jPDL takes precedence
      org.jboss.seam.pageflow.Page page =
            Manager.instance().isLongRunningConversation() &&
            Init.instance().isJbpmInstalled() &&
            Pageflow.instance().isInProcess() && Pageflow.instance().isStarted() ?
                  Pageflow.instance().getPage() : null;
     
      if (page==null)
      {
         //handle stuff defined in pages.xml
         Pages pages = Pages.instance();
         if (pages!=null) //for tests
         {
            String viewId = Pages.getViewId(facesContext);
            org.jboss.seam.navigation.Page pageEntry = pages.getPage(viewId);
            if ( pageEntry.isSwitchEnabled() )
            {
               conversation.setViewId(viewId);
            }
            if ( pageEntry.hasDescription() )
            {
               conversation.setDescription( pageEntry.renderDescription() );
            }
            else if(pages.hasDescription(viewId))
            {
               conversation.setDescription( pages.renderDescription(viewId) )
            }
            conversation.setTimeout( pages.getTimeout(viewId) );
            conversation.setConcurrentRequestTimeout( pages.getConcurrentRequestTimeout(viewId) );
         }
      }
      else
      {
         //use stuff from the pageflow definition
         if ( page.isSwitchEnabled() )
         {
            conversation.setViewId( Pageflow.instance().getPageViewId() );
         }
         if ( page.hasDescription() )
         {
            conversation.setDescription( page.getDescription() );
         }
         conversation.setTimeout( page.getTimeout() );
      }
     
      flushConversationMetadata();

   }
View Full Code Here

Examples of org.jibeframework.core.app.conversation.Conversation

    return bean;
  }

  public void startModelBuilding(String modelId) {
    logger.debug("Starting model building:" + modelId);
    Conversation conversation = getConversation();
    conversation.setAttribute("__currentModelId", modelId);
    getModelRegistry().put(modelId, new LinkedHashMap<String, Object>());
  }
View Full Code Here

Examples of org.jibeframework.core.app.conversation.Conversation

    return model;
  }

  @SuppressWarnings("unchecked")
  private Map<String, Object> getViewRegistry() {
    Conversation conversation = getConversation();
    Map<String, Object> registry = (Map<String, Object>) conversation.getAttribute("__viewRegistry");
    if (registry == null) {
      registry = new HashMap<String, Object>();
      conversation.setAttribute("__viewRegistry", registry);
    }
    return registry;
  }
View Full Code Here

Examples of org.jibeframework.core.app.conversation.Conversation

    return registry;
  }

  @SuppressWarnings("unchecked")
  private Map<String, Object> getModelRegistry() {
    Conversation conversation = getConversation();
    Map<String, Object> registry = (Map<String, Object>) conversation.getAttribute("__modelRegistry");
    if (registry == null) {
      registry = new HashMap<String, Object>();
      conversation.setAttribute("__modelRegistry", registry);
    }
    return registry;
  }
View Full Code Here

Examples of org.jibeframework.core.app.conversation.Conversation

    }
    return registry;
  }

  public String getCurrentModelId() {
    Conversation conversation = getConversation();
    String modelId = (String) conversation.getAttribute("__currentModelId");
    if (modelId != null) {
      return modelId;
    }
    throw new IllegalStateException("Current model id has not been set in the conversation");
  }
View Full Code Here

Examples of org.jivesoftware.openfire.archive.Conversation

        Collection<Conversation> conversations = conversationManager.getConversations();
        List<Conversation> lConversations = Arrays.asList(conversations.toArray(new Conversation[conversations.size()]));
        Collections.sort(lConversations, conversationComparator);
        int counter = 0;
        for (Iterator<Conversation> i = lConversations.iterator(); i.hasNext() && counter < count;) {
            Conversation con = i.next();
            if (mostRecentConversationID == con.getConversationID()) {
                break;
            } else {
                Map mCon = new HashMap();
                mCon.put("conversationid", con.getConversationID());
                String users[];
                int usersIdx = 0;
                if (con.getRoom() == null) {
                    users = new String[con.getParticipants().size()];
                    for (JID jid : con.getParticipants()) {
                        String identifier = jid.toBareJID();
                        try {
                            identifier = UserNameManager.getUserName(jid, jid.toBareJID());
                        }
                        catch (UserNotFoundException e) {
                            // Ignore
                        }
                        users[usersIdx++] = StringUtils.abbreviate(identifier, 20);
                    }
                }
                else {
                    users = new String[2];
                    users[0] = LocaleUtils.getLocalizedString("dashboard.group_conversation", "monitoring");
                    try {
                        users[1] = "(<i>" + LocaleUtils.getLocalizedString("muc.room.summary.room") +
                                ": <a href='../../muc-room-occupants.jsp?roomName=" +
                                URLEncoder.encode(con.getRoom().getNode(), "UTF-8") + "'>" + con.getRoom().getNode() +
                                "</a></i>)";
                    } catch (UnsupportedEncodingException e) {
                        Log.error(e.getMessage(), e);
                    }
                }
                mCon.put("users", users);
                mCon.put("lastactivity", formatTimeLong(con.getLastActivity()));
                mCon.put("messages", con.getMessageCount());
                cons.add(0, mCon);
                counter++;
            }
        }
        return cons;
View Full Code Here

Examples of org.oasisopen.sca.Conversation

    public void testConversation() {
        ServiceReference<BComponent> bSR = componentContext.getServiceReference(BComponent.class, "bReference");
        bSR.setConversationID("AConversationID");
        bSR.getService().testCustomConversationID();

        Conversation bc = bSR.getConversation();
        Assert.assertEquals("AConversationID", bc.getConversationID());
        bc.end();

        Assert.assertEquals("ComponentB", bReference.getService().getName());
        bReference.getService().testGeneratedConversationID(bReference.getConversation().getConversationID());
        bReference.getConversation().end();
View Full Code Here

Examples of org.osoa.sca.Conversation

            // it is expected that this call returns a reference to Gamma that
            // reuses the established Conversation
            gammaRef = beta.getRef();

            // no Conversation exists
            Conversation con = gammaRef.getConversation();
            if (con == null) {
                System.out.println("Alpha1: Conversation to gamma is null");
            } else {
                System.out
                        .println("Alpha1: Conversation to gamma exists. conversationId="
                                + con.getConversationID());
                conversationId1 = con.getConversationID();               
            }

            // this call should reuse a Conversation, but as none exists it
            // creates a new conversation
            gammaRef.getService().doSomething();
            gammaRef.getService().doSomething();
            gammaRef.getService().doSomething();
           
            con = gammaRef.getConversation();
            if (con == null) {
                System.out.println("Alpha2: Conversation to gamma is null");
            } else {
                System.out
                        .println("Alpha2: Conversation to gamma exists. conversationId="
                                + con.getConversationID());
                conversationId2 = con.getConversationID();               
            }
           
            boolean testPassed = conversationId1.equals(conversationId2);
           
            if (conversationId0 == null){
View Full Code Here

Examples of org.osoa.sca.Conversation

            // it is expected that this call returns a reference to Gamma that
            // reuses the established Conversation
            gammaRef = beta.getRef();

            // no Conversation exists
            Conversation con = gammaRef.getConversation();
            if (con == null) {
                System.out.println("Alpha: Conversation to gamma is null");
            } else {
                System.out
                        .println("Alpha: Conversation to gamma exists. conversationId="
                                + con.getConversationID());
                conversationId1 = con.getConversationID();
            }

            // this call should reuse a Conversation, but as none exists it
            // creates a new conversation
            gammaRef.getService().doSomething();
            con = gammaRef.getConversation();
            if (con == null) {
                System.out.println("Alpha: Conversation to gamma is null");
            } else {
                System.out
                        .println("Alpha: Conversation to gamma exists. conversationId="
                                + con.getConversationID());
                conversationId2 = con.getConversationID();
            }

            if ((conversationId1 == null) || (conversationId2 == null)) {
                return false;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.