Package hermes.browser.model.tree

Examples of hermes.browser.model.tree.ContextTreeNode


               {
                  AbstractTreeNode node = (AbstractTreeNode) component;

                  if (node instanceof ConnectionFactoryTreeNode)
                  {
                     ContextTreeNode ctxNode = (ContextTreeNode) node.getParent();
                     ConnectionFactoryTreeNode cfNode = (ConnectionFactoryTreeNode) node;
                     String binding = getAbsoluteBinding(cfNode);
                     Class clazz = null;

                     if (cfNode.getBean() instanceof QueueConnectionFactory && cfNode.getBean() instanceof TopicConnectionFactory)
                     {
                        clazz = JNDIConnectionFactory.class;
                     }
                     else if (cfNode.getBean() instanceof QueueConnectionFactory)
                     {
                        clazz = JNDIQueueConnectionFactory.class;
                     }
                     else
                     {
                        clazz = JNDITopicConnectionFactory.class;
                     }

                     FactoryConfig factoryConfig = HermesBrowser.getConfigDAO().createJNDIFactoryConfig(ctxNode.getConfig().getClasspathId(), "S:" + System.currentTimeMillis()
                           + ":" + node.getId(), binding, ctxNode.getConfig().getProperties(), clazz.getName());

                     rval.add(factoryConfig);
                  }
               }
            }
View Full Code Here


     
       LoaderSupport.populateBean(contextBean, namingConfig.getProperties()) ;
      
       Context rootContext = contextBean.createContext() ;
      
       ContextTreeNode rootNode = new ContextTreeNode(namingConfig.getId(), namingConfig, rootContext) ;
       ContextTreeModel model = new ContextTreeModel(contextBean, rootNode) ;
      
       Hermes.ui.getDefaultMessageSink().add("Finished searching InitialContext "+ namingConfig.getId()) ;
     
       return model ;
View Full Code Here

   public void actionPerformed(ActionEvent e)
   {
      try
      {
         final BrowseContextAction browseContext = (BrowseContextAction) HermesBrowser.getBrowser().getDocumentPane().getActiveDocument();
         final ContextTreeNode node = (ContextTreeNode) browseContext.getContextTree().getSelectionPath().getLastPathComponent();
         final String binding = JOptionPane.showInputDialog(HermesBrowser.getBrowser(), "Enter Binding", "");

         if (binding != null && !binding.equals(""))
         {
            final Context context = node.getContextFactory().createContext();

            context.createSubcontext(binding);
            context.close();

            Hermes.ui.getDefaultMessageSink().add("Subcontext " + binding + " created.");
View Full Code Here

         if (binding != null && !binding.equals(""))
         {
            if (node.getParent() instanceof ContextTreeNode)
            {
               ContextTreeNode contextNode = (ContextTreeNode) node.getParent();
               Context context = (Context) contextNode.getContextFactory().createContext().lookup(node.getPathFromRoot());
               context.rename(node.getId(), binding);
               context.close();

               Hermes.ui.getDefaultMessageSink().add(node.getId() + " renamed to " + binding);
            }
View Full Code Here

            if (JOptionPane.showConfirmDialog(HermesBrowser.getBrowser(), confirmMessage, "Please confirm", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
            {
               for (final AbstractTreeNode node : treeNodes)
               {
                  ContextTreeNode contextNode = (ContextTreeNode) node.getParent();
                  Context context = contextNode.getContextFactory().createContext();
                  context.unbind(node.getId());
                  context.close();
               }

               Hermes.ui.getDefaultMessageSink().add(doneMessage);
View Full Code Here

TOP

Related Classes of hermes.browser.model.tree.ContextTreeNode

Copyright © 2018 www.massapicom. 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.