Examples of DestinationConfigTreeNode


Examples of hermes.browser.model.tree.DestinationConfigTreeNode

    setEnabled(false);
    enableOnBrowserTreeSelection(new Class[] { DestinationConfigTreeNode.class }, this, true);
  }

  public void actionPerformed(ActionEvent arg0) {
    final DestinationConfigTreeNode dNode = getBrowserTree().getSelectedDestinationNodes().get(0);
    final HermesTreeNode hNode = getBrowserTree().getSelectedHermesNode();

    try {
      MessageEditorDialog dialog = new MessageEditorDialog(null, dNode.getDestinationName(), dNode.getDomain(), new AbstractEditedMessageHandler(
          hNode.getHermes()) {
        @Override
        public void onMessage(Message message) {
          HermesBrowser
              .getBrowser()
              .getActionFactory()
              .createMessageCopyAction(hNode.getHermes(), dNode.getDestinationName(), dNode.getDomain(),
                  new ArrayList<Message>(Arrays.asList(message)), false, false);
        }
      });
      dialog.setLocationRelativeTo(HermesBrowser.getBrowser());
      dialog.setVisible(true);
View Full Code Here

Examples of hermes.browser.model.tree.DestinationConfigTreeNode

      {
         public void valueChanged(TreeSelectionEvent event)
         {
            if (event.getPath() != null && event.getPath().getLastPathComponent() instanceof DestinationConfigTreeNode)
            {
               final DestinationConfigTreeNode destinationNode = (DestinationConfigTreeNode) event.getPath().getLastPathComponent();

               setEnabled(destinationNode.getConfig().isDurable());
            }
            else
            {
               setEnabled(false);
            }
View Full Code Here

Examples of hermes.browser.model.tree.DestinationConfigTreeNode

         if (node instanceof DestinationConfigTreeNode)
         {
            try
            {
               final DestinationConfigTreeNode tNode = (DestinationConfigTreeNode) node;
               final HermesTreeNode hNode = (HermesTreeNode) tNode.getHermesTreeNode();
               final DestinationConfig dConfig = tNode.getConfig();

               if (dConfig.isDurable())
               {
                  if (JOptionPane.showConfirmDialog(HermesBrowser.getBrowser(), "Would you like to unsubscribe from durable subscription clientID="
                        + dConfig.getClientID() + " on " + tNode.getDestinationName(), "Please confirm", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
                  {
                     Hermes.ui.getThreadPool().invokeLater(new Runnable()
                     {
                        public void run()
                        {
View Full Code Here

Examples of hermes.browser.model.tree.DestinationConfigTreeNode

  public void actionPerformed(ActionEvent arg0) {
    final BrowserTree browserTree = HermesBrowser.getBrowser().getBrowserTree();
    try {
      if (browserTree.getSelectionPath().getLastPathComponent() instanceof DestinationConfigTreeNode) {
        final DestinationConfigTreeNode destinationNode = (DestinationConfigTreeNode) browserTree.getSelectionPath().getLastPathComponent();
        final HermesTreeNode hermesNode = (HermesTreeNode) destinationNode.getHermesTreeNode();
        final BrowserAction browserAction = (BrowserAction) HermesBrowser.getBrowser().getDocumentPane().getActiveDocument();
        if (browserAction != null) {
          final Collection<Message> messages = browserAction.getSelectedMessages();
          if (messages.size() > 0) {
            final StringWriter selector = new StringWriter();
            for (Iterator<Message> iter = messages.iterator(); iter.hasNext();) {
              Message message = iter.next();
              selector.append("JMSMessageID = '" + message.getJMSMessageID() + "' ");
              selector.append("OR JMSCorrelationID = '" + message.getJMSMessageID() + "' ");
              if (message.getJMSCorrelationID() != null) {
                selector.append("OR JMSMessageID = '" + message.getJMSCorrelationID() + "' ");
                selector.append("OR JMSCorrelationID = '" + message.getJMSCorrelationID() + "' ");

              }

              if (iter.hasNext()) {
                selector.append(" OR ");
              }
            }

            final DestinationConfig dConfig = HermesBrowser.getConfigDAO().duplicate(destinationNode.getConfig());
            dConfig.setSelector(selector.toString());

            HermesBrowser.getBrowser().getActionFactory().createQueueBrowseAction(hermesNode.getHermes(), dConfig);
          }
        }
View Full Code Here

Examples of hermes.browser.model.tree.DestinationConfigTreeNode

      try {
        final String selector = JOptionPane.showInputDialog(HermesBrowser.getBrowser(), "Enter Selector", "");

        if (!TextUtils.isEmpty(selector)) {
          if (selectionPath.getLastPathComponent() instanceof DestinationConfigTreeNode) {
            final DestinationConfigTreeNode destinationNode = (DestinationConfigTreeNode) selectionPath.getLastPathComponent();
            final Hermes hermes = ((HermesTreeNode) destinationNode.getHermesTreeNode()).getHermes();

            DestinationConfig newConfig = HermesBrowser.getConfigDAO().duplicate(destinationNode.getConfig());
            newConfig.setSelector(selector);

            log.info("browsing " + hermes.getId() + ": " + destinationNode.getDestinationName() + " with user selector " + selector);

            HermesBrowser.getBrowser().getActionFactory().createQueueBrowseAction(hermes, newConfig);
          } else if (selectionPath.getLastPathComponent() instanceof MessageStoreTreeNode) {
            final MessageStoreTreeNode node = (MessageStoreTreeNode) selectionPath.getLastPathComponent();
            final Hermes hermes = HermesBrowser.getBrowser().getBrowserTree().getHermesAsMessageFactory();
View Full Code Here

Examples of hermes.browser.model.tree.DestinationConfigTreeNode

                HermesTreeNode treeNode = (HermesTreeNode) row.node;
                visitor.onHermes(treeNode.getHermes(), row.binding);
            }
            else if ( row.node instanceof DestinationConfigTreeNode)
            {
                DestinationConfigTreeNode treeNode = (DestinationConfigTreeNode) row.node;
                HermesTreeNode hermesNode = (HermesTreeNode) treeNode.getParent();

                visitor.onDestination(hermesNode.getHermes(), treeNode.getDestinationName(), treeNode.getDomain(), row.binding);
            }
        }
    }
View Full Code Here

Examples of hermes.browser.model.tree.DestinationConfigTreeNode

    {
        final RowInfo row = (RowInfo) rows.get(y);

        if ( row.node instanceof DestinationConfigTreeNode)
        {
            DestinationConfigTreeNode treeNode = (DestinationConfigTreeNode) row.node;

            switch (x)
            {
            case 0:
                return treeNode.getIcon();
            case 1:
                return treeNode.getDestinationName();
            case 2:
                return row.binding;
            default:
                return null;
            }
        }
        else if ( row.node instanceof HermesTreeNode)
        {
            final HermesTreeNode treeNode = (HermesTreeNode) row.node;

            switch (x)
            {
            case 0:
                return IconCache.getIcon("jms.connectionFactory");
            case 1:
                return treeNode.getHermes().getId();
            case 2:
                return row.binding;
            default:
                return null;
            }
View Full Code Here

Examples of hermes.browser.model.tree.DestinationConfigTreeNode

         public void run()
         {
            if (hermesMap.containsKey(hermes.getId()))
            {
               final HermesTreeNode cfNode = (HermesTreeNode) hermesMap.get(hermes.getId());
               final DestinationConfigTreeNode dNode = new DestinationConfigTreeNode(cfNode, destinationConfig, cfNode.isCascadeNamespace());
               final DestinationConfigKeyWrapper key = new DestinationConfigKeyWrapper(hermes, destinationConfig);

               if (destinationMap.containsKey(key))
               {
                  cat.error("duplicate destination key=" + key);
View Full Code Here

Examples of hermes.browser.model.tree.DestinationConfigTreeNode

               final HermesTreeNode cfNode = (HermesTreeNode) hermesMap.get(hermes.getId());
               final DestinationConfigKeyWrapper key = new DestinationConfigKeyWrapper(hermes, destinationConfig);

               if (destinationMap.containsKey(key))
               {
                  final DestinationConfigTreeNode node = destinationMap.remove(key);

                  if (node != null)
                  {
                     if (node.getParent() == cfNode)
                     {

                        int index = cfNode.getIndex(node);
                        cfNode.remove(node);
                        nodesWereRemoved(cfNode, new int[] { index }, new Object[] { node });
                     }
                     else if (node.getParent() instanceof DestinationFragmentTreeNode)
                     {
                        AbstractTreeNode cleanup = node;
                        do
                        {
                           AbstractTreeNode cleanupParent = (AbstractTreeNode) cleanup.getParent();
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.