Package com.any_erp_vendor.moa.jmsobjects.person.v1_0

Examples of com.any_erp_vendor.moa.jmsobjects.person.v1_0.BasicPerson


      if (a.size() == 0) {
        bp_resultsTextArea.setText("No rows found matching the query.");
      }
      else {
        for (int i=0; i<a.size(); i++) {
          BasicPerson bp = (BasicPerson)a.get(i);
          baselineBasicPerson = (BasicPerson)bp.clone();
         
          // get the addresses associated to the basic person
          java.util.List addrs = bp.getAddress();
          java.util.Vector vAddr = new java.util.Vector();
          if (addrs.size() > 0) {
            for (int j=0; j<addrs.size(); j++) {
              Address addr = bp.getAddress(j);
              vAddr.add(addr);
            }
          }
          bp_addressList.setListData(vAddr);
          bp_addressList.updateUI();
          // get the phones associated to the basic person
          java.util.List phones = bp.getPhone();
          java.util.Vector vPhone = new java.util.Vector();
          if (phones.size() > 0) {
            for (int j=0; j<phones.size(); j++) {
              Phone p = bp.getPhone(j);
              vPhone.add(p);
            }
          }
          bp_phoneList.setListData(vPhone);
          bp_phoneList.updateUI();
          // get the emails associated to the basic person
          java.util.List emails = bp.getEmail();
          java.util.Vector vEmail = new java.util.Vector();
          if (emails.size() > 0) {
            for (int j=0; j<emails.size(); j++) {
              Email p = bp.getEmail(j);
              vEmail.add(p);
              org.openeai.OpenEaiObject.logger.info("Email="+p.toXmlString());
            }
          }
          bp_emailList.setListData(vEmail);
          bp_emailList.updateUI();
         
          results.append(bp.getXmlEnterpriseObject().toXmlString() + "\n");
          bp_lastNameTextField.setText(bp.getName().getLastName());
          bp_firstNameTextField.setText(bp.getName().getFirstName());
          bp_middleNameTextField.setText(bp.getName().getMiddleName());
          bp_genderComboBox.setSelectedItem(bp.getGender());
          if (bp.getBirthDate() != null && bp.getBirthDate().isEmpty() == false) {
            bp_birthDateTextField.setText(bp.getBirthDate().getMonth() + "/" +
                bp.getBirthDate().getDay() + "/" +
                bp.getBirthDate().getYear());
          }
        }     
        bp_resultsTextArea.setText(results.toString());
      }
    }
View Full Code Here


    String messageObjectName = getProperties().getProperty(MESSAGE_OBJECT_NAME_PROP);
    String producerName = getProperties().getProperty(PRODUCER_NAME_PROP);
    String xml = INITIAL_XML;
    try {
      // get the baseline (current value of 'xml' variable)
      BasicPerson baselineBp = (BasicPerson)getAppConfig().getObject(messageObjectName);
      baselineBp.getXmlEnterpriseObject().getEnterpriseFields().setIgnoreValidation(true);
      baselineBp.getXmlEnterpriseObject().buildObjectFromXmlString(getBaselineXml());


      // where to get the newdata (the form data)?
      BasicPerson bp = (BasicPerson)getAppConfig().getObject(messageObjectName);
      bp.setInstitutionalId(getChannelRuntimeData().getParameter("InstitutionalId"));
      Name name = bp.newName();
      name.setFirstName(getChannelRuntimeData().getParameter("FirstName"));
      name.setLastName(getChannelRuntimeData().getParameter("LastName"));
      bp.setName(name);

      // address info
      String[] addrTypes = getChannelRuntimeData().getParameterValues("Address@type");
      for (int i=0; i<addrTypes.length; i++) {
        String type = addrTypes[i];
        if (type == null || type.length() == 0) { continue; }
        Address addr = bp.newAddress();
        addr.setType(addrTypes[i]);
        addr.setStreet1(getChannelRuntimeData().getParameterValues("Street1")[i]);
        addr.setCityOrLocality(getChannelRuntimeData().getParameterValues("CityOrLocality")[i]);
        addr.setStateOrProvince(getChannelRuntimeData().getParameterValues("StateOrProvince")[i]);
        /*
        String stateFormValue = getChannelRuntimeData().getParameterValues("StateOrPovince")[i];
        if (stateFormValue != null) {
          addr.setStateOrProvince(stateFormValue);
        }
        */
        com.any_erp_vendor.moa.objects.resources.v1_0.Date effDate = addr.newEffectiveDate();
        effDate.setMonth(getChannelRuntimeData().getParameterValues("EffectiveDate/Month")[i]);
        effDate.setDay(getChannelRuntimeData().getParameterValues("EffectiveDate/Day")[i]);
        effDate.setYear(getChannelRuntimeData().getParameterValues("EffectiveDate/Year")[i]);
        addr.setEffectiveDate(effDate);
        bp.addAddress(addr);
      }

      bp.getXmlEnterpriseObject().setBaseline(baselineBp.getXmlEnterpriseObject());
     
      LogService.log(LogService.INFO, "[BasicPersonUpdateHandler] built " + messageObjectName + " from form data, performing Update...");

      // todo - use producer pool
      // todo - map producer name based on message object since different message
      // objects may be going against different sources.
      bp.update((PointToPointProducer)getAppConfig().getObject(producerName));
      LogService.log(LogService.INFO, "[BasicPersonUpdateHandler] " + messageObjectName + " update is done.");

      xml = INITIAL_XML;
      xml += bp.getXmlEnterpriseObject().toXmlString();
    }
    catch (Exception openeaiExc) {
      LogService.log(LogService.ERROR, openeaiExc);
      openeaiExc.printStackTrace();
      throw new UportalFormHandlerException("[BasicPersonUpdateHandler] Error performing update action", openeaiExc);
View Full Code Here

  protected void bp_updateButton_mouseClicked(MouseEvent e)
  {
    try {
      String messageObjectName = BASIC_PERSON;
      org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
      BasicPerson bPerson = (BasicPerson)APP_CONFIG.getObject(messageObjectName);
      org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig, performing Update...");
      populateBasicPerson(bPerson);
      bPerson.setBaseline(baselineBasicPerson);
     
      try {
        bPerson.update((PointToPointProducer)APP_CONFIG.getObject(SELF_SERVICE_PRODUCER));
        baselineBasicPerson = (BasicPerson)bPerson.getXmlEnterpriseObject().clone();
        org.openeai.OpenEaiObject.logger.info("Executed Update request...");
        bp_resultsTextArea.setText("Update was successful.");
      }
      catch (Exception openeaiExc) {
        String errMessage = "Exception executing update.  " + openeaiExc.getMessage();
View Full Code Here

   **/
  protected void bp_createButton_mouseClicked(MouseEvent e) {
    try {
      String messageObjectName = BASIC_PERSON;
      org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
      BasicPerson bPerson = (BasicPerson)APP_CONFIG.getObject(messageObjectName);
      org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig, performing Create...");
      populateBasicPerson(bPerson);
     
      try {
        bPerson.create((PointToPointProducer)APP_CONFIG.getObject(SELF_SERVICE_PRODUCER));
        baselineBasicPerson = (BasicPerson)bPerson.clone();
        org.openeai.OpenEaiObject.logger.info("Executed Create request...");
        bp_resultsTextArea.setText("Create was successful.");
      }
      catch (Exception openeaiExc) {
        String errMessage = "Exception executing create.  " + openeaiExc.getMessage();
View Full Code Here

   **/
  protected void bp_deleteButton_mouseClicked(MouseEvent e) {
    try {
      String messageObjectName = BASIC_PERSON;
      org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
      BasicPerson bPerson = (BasicPerson)APP_CONFIG.getObject(messageObjectName);
      org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig, performing Delete...");
      populateBasicPerson(bPerson);
     
      try {
        bPerson.delete("delete", (PointToPointProducer)APP_CONFIG.getObject(SELF_SERVICE_PRODUCER));
        org.openeai.OpenEaiObject.logger.info("Executed Delete request...");
        bp_resultsTextArea.setText("Delete was successful.");
      }
      catch (Exception openeaiExc) {
        String errMessage = "Exception executing delete.  " + openeaiExc.getMessage();
View Full Code Here

    org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
    try {
      Address addr = null;
      int index = bp_addressList.getSelectedIndex();
      if (index == -1) {
        BasicPerson bPerson = (BasicPerson)APP_CONFIG.getObject(messageObjectName);
        org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig");
        addr = bPerson.newAddress();
      }
      else {
        addr = (Address)bp_addressList.getSelectedValue();
      }
      addr.setType((String)bp_addressType.getSelectedItem());
View Full Code Here

      org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
      try {
        Phone p = null;
        int index = bp_phoneList.getSelectedIndex();
        if (index == -1) {
          BasicPerson bPerson = (BasicPerson)APP_CONFIG.getObject(messageObjectName);
          org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig");
          p = bPerson.newPhone();
        }
        else {
          p = (Phone)bp_phoneList.getSelectedValue();
        }
        p.setType((String)bp_phoneType.getSelectedItem());
View Full Code Here

      org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
      try {
        Email p = null;
        int index = bp_emailList.getSelectedIndex();
        if (index == -1) {
          BasicPerson bPerson = (BasicPerson)APP_CONFIG.getObject(messageObjectName);
          org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig");
          p = bPerson.newEmail();
        }
        else {
          p = (Email)bp_emailList.getSelectedValue();
        }
        p.setType((String)bp_emailType.getSelectedItem());
View Full Code Here

          ec_textArea.setText("No Person information can be found for that inst id.");
          return;
        }
        else {
          for (int i=0; i<a.size(); i++) {
            BasicPerson bp = (BasicPerson)a.get(i);
            personName = bp.getName().getFirstName() + " " + bp.getName().getLastName();
            ec_bpName.setText(personName);
          }     
        }
       
        // now, query for the emerency contacts for this person using the same LightweightPerson
View Full Code Here

        return;
      }
    }
   
    // get the object(s) we need to build from AppConfig
    BasicPerson bPerson = null;
    BasicPerson baselinePerson = null;

    // build the message object from the element retrieved from the XML document.
    // this is done via the default XmlLayout manager.
    try {
      bPerson = (BasicPerson)getAppConfig().getObject(msgObject + "." + generateRelease(msgRelease));
      bPerson.buildObjectFromInput(eMessageObject);
      if (msgAction.equalsIgnoreCase(UPDATE_ACTION)) {
        baselinePerson = (BasicPerson)getAppConfig().getObject(msgObject + "." + generateRelease(msgRelease));
        baselinePerson.buildObjectFromInput(eBaselineMessageObject);
      }
    }
    catch (Exception e) {
      errMessage = "Exception occurred building the " + eMessageObject.getName() + " Java object from the Element passed in.  Exception: " + e.getMessage();
View Full Code Here

TOP

Related Classes of com.any_erp_vendor.moa.jmsobjects.person.v1_0.BasicPerson

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.