예제 #1
0
 public String get(String msisdn, String market, String ctype) {
   StringBuffer command = new StringBuffer(ALLRESOURCECommands.AIR_COMMAND_GET);
   command.append(ALLRESOURCECommands.TRANSID).append(components.getTRANSID().generateTransID());
   if (market.equals(DAPBeanInterface.CONSUMER)) {
     command.append(DAPBeanInterface.CH1);
   } else if (market.equals(DAPBeanInterface.CORPORATE)) {
     if (ctype.equals(DAPBeanInterface.PREPAID)) {
       command.append(DAPBeanInterface.CH2);
     } else if (ctype.equals(DAPBeanInterface.POSTPAID)) {
       command.append(DAPBeanInterface.CH1);
     }
   }
   command.append(ALLRESOURCECommands.MSISDN).append(msisdn);
   command.append(ALLRESOURCECommands.BALANCEANDDATE);
   if (!components.getConnectionManagerCai().getSession().isSessionAvailable()) {
     return components
         .getConnectionManagerStandard()
         .getSession()
         .getConnection()
         .send(command.append(ALLRESOURCECommands.END).toString())
         .trim();
   }
   return components
       .getConnectionManagerCai()
       .getSession()
       .getConnectionCai()
       .send(command.append(ALLRESOURCECommands.END).toString())
       .trim();
 }
예제 #2
0
 private void saveSessionInfo() {
   components.getLogger().info("SAVING SESSION");
   if (!components
       .getConnectionManagerStandard()
       .getSession()
       .getCurrent_msisdn()
       .equals(msisdnField.getText())) {
     components
         .getConnectionManagerStandard()
         .getSession()
         .setCurrent_msisdn(msisdnField.getText());
     components.getMsisdnCompleter().store(msisdnField.getText());
   }
   if (!components
       .getConnectionManagerStandard()
       .getSession()
       .getCurrent_market()
       .equals(marketButtonGroup.getSelection().getActionCommand())) {
     components
         .getConnectionManagerStandard()
         .getSession()
         .setCurrent_market(marketButtonGroup.getSelection().getActionCommand());
   }
   if (!components
       .getConnectionManagerStandard()
       .getSession()
       .getCurrent_ctype()
       .equals(ctypeButtonGroup.getSelection().getActionCommand())) {
     components
         .getConnectionManagerStandard()
         .getSession()
         .setCurrent_ctype(ctypeButtonGroup.getSelection().getActionCommand());
   }
   components.getLogger().info("SESSION SAVED");
 }