Package hermes.config

Examples of hermes.config.SessionConfig


    *      java.lang.String)
    */
   public void renameSession(FactoryConfig factoryConfig, String newSessionId)
   {
      ConnectionConfig connectionConfig = (ConnectionConfig) factoryConfig.getConnection().get(0);
      SessionConfig sessionConfig = (SessionConfig) connectionConfig.getSession().get(0);

      sessionConfig.setId(newSessionId);
   }
View Full Code Here


         FactoryConfig factoryConfig = factoryIter.next();
         ConnectionConfig connectionConfig = (ConnectionConfig) factoryConfig.getConnection().get(0);

         if (connectionConfig.getSession().size() > 0)
         {
            SessionConfig sessionConfig = (SessionConfig) connectionConfig.getSession().get(0);

            if (sessionConfig.getId().equals(hermesId))
            {
               return factoryConfig;
            }
         }
      }
View Full Code Here

    * @see hermes.impl.ConfigDAO#duplicate(hermes.config.SessionConfig,
    *      java.lang.String)
    */
   public SessionConfig duplicate(SessionConfig sourceSession, String newId) throws JAXBException
   {
      SessionConfig rval = factory.createSessionConfig();

      rval.setAudit(sourceSession.isAudit());
      rval.setAuditDirectory(sourceSession.getAuditDirectory());
      rval.setCheckSize(sourceSession.isCheckSize());
      rval.setCheckSizePeriod(sourceSession.getCheckSizePeriod());
      rval.setId(newId);
      rval.setReconnects(sourceSession.getReconnects());
      rval.setTransacted(sourceSession.isTransacted());

      return rval;
   }
View Full Code Here

    *      java.lang.String)
    */
   public ConnectionConfig duplicate(ConnectionConfig sourceConnection, String newSessionId) throws JAXBException
   {
      ConnectionConfig rval = factory.createConnectionConfig();
      SessionConfig sessionConfig = (SessionConfig) sourceConnection.getSession().get(0);

      rval.setPassword(sourceConnection.getPassword());
      rval.setUsername(sourceConnection.getUsername());

      rval.getSession().add(duplicate(sessionConfig, newSessionId));
View Full Code Here

         public void actionPerformed(ActionEvent arg0)
         {
            try
            {
               ConnectionConfig cConfig = (ConnectionConfig) factoryConfig.getConnection().get(0);
               SessionConfig sConfig = (SessionConfig) cConfig.getSession().get(0);
               DestinationConfig dConfig = new DestinationConfig() ;
               dConfig.setDomain(Domain.QUEUE.getId()) ;
               dConfig.setName("NEW") ;

               destinationTableModel.addItem(dConfig) ;
               doEdit(sConfig.getId(), dConfig);
               dialog.setDirty();
            }
            catch (Exception ex)
            {
               cat.error(ex.getMessage(), ex);
            }
         }
      });

      removeItem.addActionListener(new ActionListener()
      {
         public void actionPerformed(ActionEvent arg0)
         {
            for (int row : destinationTable.getSelectedRows())
            {
               if (row >= 0)
               {
                  int realRow = destinationTable.getActualRowAt(row);
                  destinationTableModel.removeRow(realRow);
                  dialog.setDirty();
               }
            }
         }
      });

      mouseAdapter = new MouseAdapter()
      {
         public void mousePressed(MouseEvent e)
         {
            if (SwingUtilities.isRightMouseButton(e))
            {
               if (e.getComponent() == destinationTableSP)
               {
                  removeItem.setEnabled(false);
               }
               else
               {
                  removeItem.setEnabled(true);
               }

               popupMenu.show(e.getComponent(), e.getX(), e.getY());
            }
            else if (e.getClickCount() == 2)
            {
               int row = destinationTable.getActualRowAt(destinationTable.getSelectedRow());

               if (row >= 0)
               {
                  ConnectionConfig cConfig = (ConnectionConfig) factoryConfig.getConnection().get(0);
                  SessionConfig sConfig = (SessionConfig) cConfig.getSession().get(0);
                  doEdit(sConfig.getId(), destinationTableModel.getRowConfig(row));
               }
            }
         }
      };
View Full Code Here

        passwordTF.setText(connectionConfig.getPassword());
        clientIDTF.setText(connectionConfig.getClientID()) ;

        if (connectionConfig.getSession().size() == 0)
        {
            connectionConfig.getSession().add(new SessionConfig());
        }
    }
View Full Code Here

               connectionConfigPanel.setConnectionConfig(connectionConfig);

               for (Iterator iter4 = connectionConfig.getSession().iterator(); iter4.hasNext();)
               {
                  SessionConfig sessionConfig = (SessionConfig) iter4.next();

                  if (firstSessionId == null)
                  {
                     firstSessionId = sessionConfig.getId();
                  }

                  sessionConfigPanel.addSessionConfig(sessionConfig);
                  sessionToFactoryMap.put(sessionConfig.getId(), factoryConfig);
               }
            }
         }

         sessionPanel.setLayout(new BorderLayout());
View Full Code Here

               ConnectionConfig cConfig = (ConnectionConfig) fConfig.getConnection().get(0);

               for (Iterator iter2 = cConfig.getSession().iterator(); iter2.hasNext();)
               {
                  SessionConfig sConfig = (SessionConfig) iter2.next();

                  if (sConfig.getId() == null || sConfig.getId().equals(""))
                  {
                     iter2.remove();
                  }
               }
            }
View Full Code Here

  private JTextField sessionName;

  public BasicConnectionPanel(String serverUrlProperty, FactoryConfig factoryConfig, HermesConfig config) {
    this.factoryConfig = factoryConfig;
    ConnectionConfig connectionConfig = factoryConfig.getConnection().get(0) ;
    SessionConfig sessionConfig = connectionConfig.getSession().get(0) ;
    setLayout(new FormLayout(new ColumnSpec[] {
        FormFactory.RELATED_GAP_COLSPEC,
        ColumnSpec.decode("max(41dlu;default)"),
        FormFactory.RELATED_GAP_COLSPEC,
        ColumnSpec.decode("118dlu:grow"),
View Full Code Here

    return !TextUtils.isEmpty(sessionName.getText()) ;
  }
 
  public void setValues(FactoryConfig config) {
    ConnectionConfig connectionConfig = HermesBrowser.getConfigDAO().getFactory().createConnectionConfig() ;
    SessionConfig sessionConfig = HermesBrowser.getConfigDAO().getFactory().createSessionConfig() ;
   
    connectionConfig.setUsername(getUsername()) ;
    connectionConfig.setPassword(getPassword()) ;
    connectionConfig.setClientID(getClientID()) ;
   
    sessionConfig.setId(sessionName.getText()) ;
   
    connectionConfig.getSession().add(sessionConfig) ;
    config.getConnection().add(connectionConfig) ;
  }
View Full Code Here

TOP

Related Classes of hermes.config.SessionConfig

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.