Exemplo n.º 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();
 }
Exemplo n.º 2
0
  public void getResponse() {
    responseGridManager.setResponseFieldset(responseFieldsetPanel);
    responseGridManager.setResponseFieldsetGrid(responseFieldsetGridPanel);
    responseGridManager.setActionButtonGroup(actionButtonGroup);
    responseGridManager.setCtypeButtonGroup(ctypeButtonGroup);
    responseGridManager.setFrame(frame);

    saveSessionInfo();
    String response_mpm = actionCommandSubscriber.executeBsoSubscriberCommand(createBean());

    responseGridManager.setResponseGridAssurance(response_mpm);
    textArea.setText(response_mpm.trim());

    btnExecute.setEnabled(true);

    if (response_mpm.equals(components.getErrorMessages().get_NOT_LOGGED_WARN())
        || response_mpm.equals(components.getErrorMessages().get_MPM_CONNECTION_WARN())) {
      if (response_mpm.equals(components.getErrorMessages().get_NOT_LOGGED_WARN())) {
        btnExecute.setText(SUBSCRIBERActions.SUBSCRIBER_ACTION_RECONNECT);
        btnExecute.setActionCommand(SUBSCRIBERActions.SUBSCRIBER_ACTION_RECONNECT);
      } else if (response_mpm.equals(components.getErrorMessages().get_MPM_CONNECTION_WARN())) {
        btnExecute.setText(SUBSCRIBERActions.SUBSCRIBER_ACTION_HOME);
        btnExecute.setActionCommand(SUBSCRIBERActions.SUBSCRIBER_ACTION_HOME);
      }
    }
  }
  public OptionManagerInitialization(DAPBeanInterface components) {
    XmlReaderInterface xmlReader = new XmlReader();
    xmlReader.setComponents(components);

    optionManager = new OptionManager();
    optionManager.setLog(components.getLogger());
    optionManager.setNotification(components.getNotifications());
    optionManager.setXml_reader(xmlReader);
  }
Exemplo n.º 4
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");
 }