Package org.openeai.moa.jmsobjects

Examples of org.openeai.moa.jmsobjects.JmsEnterpriseObject


    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)
      JmsEnterpriseObject baselineJeo = (JmsEnterpriseObject)getAppConfig().getObject(messageObjectName);
      baselineJeo.getXmlEnterpriseObject().getEnterpriseFields().setIgnoreValidation(true);
      baselineJeo.getXmlEnterpriseObject().buildObjectFromXmlString(getBaselineXml());

      // where to get the newdata (the form data)?
      JmsEnterpriseObject newJeo = (JmsEnterpriseObject)getAppConfig().getObject(messageObjectName);

      // use the UPortalFormDataLayout manager to build the new version of the object.
      newJeo.getXmlEnterpriseObject().getEnterpriseFields().setIgnoreValidation(true);
      newJeo.getXmlEnterpriseObject().buildObjectFromInput(getChannelRuntimeData());
       
      newJeo.getXmlEnterpriseObject().setBaseline(baselineJeo.getXmlEnterpriseObject());
     
      LogService.log(LogService.INFO, "[GeneralUpdateHandler] 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.
      newJeo.update((PointToPointProducer)getAppConfig().getObject(producerName));
      LogService.log(LogService.INFO, "[GeneralUpdateHandler] " + messageObjectName + " update is done.");

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


        name.setLastName(lastName);
        lPerson.setName(name);
        LogService.log(LogService.INFO, "set LightweightPerson on EnterpriseUser...");
        eu.setLightweightPerson(lPerson);

        JmsEnterpriseObject jeo = (JmsEnterpriseObject)getAppConfig().getObject(messageObjectName);
        LogService.log(LogService.INFO, "got " + messageObjectName + " from AppConfig, performing Query...");

        // todo - use producer pool
        java.util.List returnedJeos =
          jeo.query(eu,
            (PointToPointProducer)getAppConfig().getObject(producerName));
        LogService.log(LogService.INFO, "got " + returnedJeos.size() + " " + messageObjectName + "'s back.");

        for (int i=0; i<returnedJeos.size(); i++) {
          JmsEnterpriseObject j = (JmsEnterpriseObject)returnedJeos.get(i);
          j.getXmlEnterpriseObject().getEnterpriseFields().setIgnoreValidation(true);
          xml += j.getXmlEnterpriseObject().toXmlString();
        }
        if (returnedJeos.size() == 0) {
          // todo - if there's no EnterpriseUserPassword object returned, just
          // populate one with values from uPortal then, when the password reset
          // is done (update handler) do a create instead of an update.
View Full Code Here

      if (instId != null && instId.length() > 0) {
        lPerson.setInstitutionalId(instId);
        LogService.log(LogService.INFO, "[basicPersonQueryHandler] set instid on lightweight person...");

        JmsEnterpriseObject jeo = (JmsEnterpriseObject)getAppConfig().getObject(messageObjectName);
        LogService.log(LogService.INFO, "[basicPersonQueryHandler] got " + messageObjectName + " from AppConfig, performing Query...");

        // todo - use producer pool
        java.util.List returnedJeos =
          jeo.query(lPerson,
            (PointToPointProducer)getAppConfig().getObject(producerName));
        LogService.log(LogService.INFO, "[basicPersonQueryHandler] got " + returnedJeos.size() + " " + messageObjectName + "'s back.");

        for (int i=0; i<returnedJeos.size(); i++) {
          JmsEnterpriseObject j = (JmsEnterpriseObject)returnedJeos.get(i);
          j.getXmlEnterpriseObject().getEnterpriseFields().setIgnoreValidation(true);
          xml += j.getXmlEnterpriseObject().toXmlString();
        }
        if (returnedJeos.size() == 0) {
          // create the BasicPerson using default values from uPortal (givenName, sn)
          LogService.log(LogService.INFO, "[basicPersonQueryHandler] BasicPerson doesn't exist, creating it.");
          BasicPerson bp = (BasicPerson)getAppConfig().getObject(messageObjectName);
View Full Code Here

TOP

Related Classes of org.openeai.moa.jmsobjects.JmsEnterpriseObject

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.