Package org.any_openeai_enterprise.moa.objects.resources.v1_0

Examples of org.any_openeai_enterprise.moa.objects.resources.v1_0.LightweightPerson


    String instId = Integer.toString(getChannelStaticData().getPerson().getID());
    LogService.log(LogService.INFO, "[basicPersonQueryHandler] instId is " + instId);
    LogService.log(LogService.INFO, "[basicPersonQueryHandler] firstName is " + firstName);
    LogService.log(LogService.INFO, "[basicPersonQueryHandler] lastName is " + lastName);
    try {
      LightweightPerson lPerson =
          (LightweightPerson)getAppConfig().getObject(queryObjectName);
      lPerson.getEnterpriseFields().setIgnoreValidation(true);
      LogService.log(LogService.INFO, "[basicPersonQueryHandler] got LightweightPerson...");

      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...");
View Full Code Here


  }
 
    // Make sure all objects needed are configured and available for use.
  // LightweightPerson, BasicPersion, EnterpriseUserPassword
     try {
      LightweightPerson lPerson =
            (LightweightPerson)getAppConfig().getObject("LightweightPerson");
        BasicPerson aeo = (BasicPerson)getAppConfig().getObject("BasicPerson");
        EnterpriseUserPassword newEntUserPassword = (EnterpriseUserPassword)getAppConfig()
          .getObject("EnterpriseUserPassword");
    }
View Full Code Here

    }
  }

  private BasicPerson getBasicPerson(String instId) throws EnterpriseConfigurationObjectException, EnterpriseFieldException, EnterpriseObjectQueryException {
       
    LightweightPerson lPerson =
          (LightweightPerson)getAppConfig().getObject("LightweightPerson");
        logger.info("[PasswordSyncCommand.getBasicPerson] Got LightweightPerson...");
 
        lPerson.setInstitutionalId(instId);
        logger.info("[PasswordSyncCommand.getBasicPerson] Set instid on lightweight person...");
       
        BasicPerson aeo = (BasicPerson)getAppConfig().getObject("BasicPerson");
        logger.info("[PasswordSyncCommand.getBasicPerson] Got BasicPerson from AppConfig, performing Query...");
 
View Full Code Here

        m_line);
     
      // Get a greeting and a greetee object from AppConfig to use in
      // processing this line.
      Greeting greeting = null;
      Greetee greetee = null;
      try {
        greeting = (Greeting)getAppConfig().getObject("Greeting");
        greetee = (Greetee)getAppConfig().getObject("Greetee");
      }
      catch (EnterpriseConfigurationObjectException ecoe) {
        // An error occurred retrieving an object from AppConfig. Log it,
        // increment the error count, and return.
        String errMsg = "An error occurred retrieving an object from " +
          "AppConfig. The exception is: " + ecoe.getMessage();
        logger.fatal("[ProcessInputLine.run] An error occurred processing " +
          "line number " + m_lineNumber + ": " + errMsg);
        incrementErrorCount();
        return;
      }

      // Set the full name of the greetee.
      try { greetee.setFullName(m_line.trim()); }
      catch (EnterpriseFieldException efe) {
        // An error occurred setting the value of the full name for the
        // greetee. Log it, increment the error count, and return.
        String errMsg = "An error occurred setting the value of the full name "
          + "of the greetee. The exception is: " + efe.getMessage();
        logger.fatal("[ProcessInputLine.run] An error occurred processing " +
          "line number " + m_lineNumber + ": " + errMsg);
        incrementErrorCount();
        return
      }

      // Generate the greeting.
      List results = null;
      try {
        logger.info("[ProcessInputLine.run] Sending a Greeting.Generate-" +
          "Request for: " + greetee.getFullName());
        results = greeting.generate(greetee, m_p2p);
      }    
      catch (EnterpriseObjectGenerateException eoge) {
        if (eoge.getMessage().toLowerCase().indexOf("time") != -1) {
          // The error was a timeout error. Log it.
          String errMsg = "Timed out waiting for reply.";
          logger.fatal("[ProcessInputLine.run] " + errMsg);
        }
        else {
          // An error occurred generating the greeting. Log it.
          String errMsg = "An error occurred generating the greeting. The " +
            "exception is: " + eoge.getMessage();
          logger.fatal("[ProcessInputLine.run] " + errMsg);
          eoge.printStackTrace();
        }
        // Increment the error count and return.
        incrementErrorCount();
        return;
      }

      // Display the greeting that was generated by EGS.
      for (int i=0; i < results.size(); i++) {
        greeting = (Greeting)results.get(i);
        logger.info("[ProcessInputLine.run] Greeting returned for '" +
          greetee.getFullName() + "' is: " + greeting.getText());
      }
     
      logger.debug("[ProcessInputLine.run] Completed processing line " +
        m_lineNumber + ": " + m_line);
View Full Code Here

    }
    catch (EnterpriseConfigurationObjectException eoce) {
      logger.fatal("[GreetingRequestCommand] Error retrieving a Greeting " +
        "object from AppConfig: The exception is: " + eoce.getMessage());
   
    Greetee greetee = new Greetee();
    try {
      greetee = (Greetee)getAppConfig().getObjectByType(greetee.getClass()
        .getName());
    }
    catch (EnterpriseConfigurationObjectException eoce) {
      logger.fatal("[GreetingRequestCommand] Error retrieving a Greeting " +
        "object from AppConfig: The exception is: " + eoce.getMessage());
    }

    // Handle a Generate-Request.
    if (msgAction.equalsIgnoreCase("Generate")) {
      logger.info("[GreetingRequestCommand] Handling an " +
        "org.any-openeai-enterprise.CoreApplication.Greeting.Generate-Request" +
        " message.");
      Element eGreetee = inDoc.getRootElement().getChild("DataArea")
        .getChild("Greetee");

      // Verify that Greetee element is not null; if it is, reply with an error.
      if (eGreetee == null) {     
        String errType = "application";
        String errCode = "OpenEAI-1015";
        String errDesc = "Invalid generate element found in the Generate-" +
          "Request message. This command expects a Greetee.";
        logger.fatal("[GreetingRequestCommand] " + errDesc);
        logger.fatal("Message sent in is: \n" + getMessageBody(inDoc));
        ArrayList errors = new ArrayList();
        errors.add(buildError(errType, errCode, errDesc));
        String replyContents =
          buildReplyDocumentWithErrors(eControlArea, localResponseDoc, errors);
        return getMessage(msg, replyContents);
      }
     
      // Now build a Greetee object from the Greetee element in the message.
      try {
        greetee.buildObjectFromInput(eGreetee);
      }
      catch (EnterpriseLayoutException ele) {
        // There was an error building the Greetee object from a Greetee
        // element.
        String errType = "application";
        String errCode = "EnterpriseGreetingService-1001";
        String errDesc = "An error occurred building Greetee object from the " +
          "Greetee element in the Generate-Request message. The exception " +
          "is: " + ele.getMessage();
        logger.fatal("[GreeteeRequestCommand] " + errDesc);
        logger.fatal("Message sent in is: \n" + getMessageBody(inDoc));
        ArrayList errors = new ArrayList();
        errors.add(buildError(errType, errCode, errDesc));
        String replyContents =
        buildReplyDocumentWithErrors(eControlArea, localResponseDoc, errors);
        return getMessage(msg, replyContents);
      }

      // Generate the greeting.
      try {
        if (greetee.getFullName() != null && greetee.getFullName() != "") {
          // There is a greetee with a name to greet. Prepare the greeting text.
          greeting.setText("Hello, " + greetee.getFullName() + "!");
        }
        else {
          // There is no greetee with a name to greet. Use the default greeting
          // text.
          greeting.setText(getDefaultGreetingText());
        }
      }
      catch (EnterpriseFieldException efe) {
        // An error occurred setting the value of the greeting text. Log it and
        // reply with an error.
        String errType = "application";
        String errCode = "EnterpriseGreetingService-1002";
        String errDesc = "An error occurred setting the value of the " +
          "greeting text. The exception is: " + efe.getMessage();
        logger.fatal("[GreetingRequestCommand " + errDesc);
        ArrayList errors = new ArrayList();
        errors.add(buildError(errType, errCode, errDesc));
        String replyContents =
        buildReplyDocumentWithErrors(eControlArea, localResponseDoc, errors);
        return getMessage(msg, replyContents);
      }

      // Set the TestId.
      greeting.setTestId(greetee.getTestId());

      // Get pub/sub producer to use in this transaction.
      PubSubProducer pub = null;
      try {
        pub = (PubSubProducer)m_pubSubProducerPool.getProducer();
View Full Code Here

    I2sRepositoryException {
    // If a social security number is provided, retrieve the
    // InstitutionalIdentity using that identifier.
    InstitutionalIdentity instIdent = new InstitutionalIdentity();
    if (uPerson.getSocialSecurityNumber() != null) {
      Identifier id = new Identifier();
      try {
        id.setType("SocialSecurityNumber");
        id.setValue(uPerson.getSocialSecurityNumber());
      }
      catch (EnterpriseFieldException efe) {
        // An error occurred setting field values on the identifier object.
        // Log it and throw an exception.
        String errMsg = "An error occurred setting field values on the " +
View Full Code Here

    // Verify that the baseline matches the current state of the
    // InstitutionalIdentity.

    // --- Retrieve the current state of the InstitutionalIdentity.
    Identifier id = new Identifier();
    try {
      id.setType("InstitutionalId");
      id.setValue(baselineInstIdent.getInstitutionalId());
    }
    catch (EnterpriseFieldException efe) {
      // An error occurred setting the values of the identifier to use to
      // retrieve the current state of the InstitutionalIdentity. Log it
      // and throw an exception.
View Full Code Here

      // Verify that the baseline matches the current state of the
      // InstitutionalIdentity. Otherwise reply with a baseline stale error.

      // --- Retrieve the current state of the InstitutionalIdentity.
      Identifier id = new Identifier();
      try {
        id.setType("InstitutionalId");
        id.setValue(baselineInstIdent.getInstitutionalId());
      }
      catch (EnterpriseFieldException efe) {
        // An error occurred setting the values of the identifier to use to
        // retrieve the current state of the InstitutionalIdentity. Log it
        // and throw an exception.
View Full Code Here

  protected void bp_queryButton_mouseClicked(MouseEvent e) {
    clearBasicPersonFields();
    String messageObjectName = BASIC_PERSON;
    org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
    try {
      LightweightPerson lPerson =
        (LightweightPerson)APP_CONFIG.getObject(LIGHTWEIGHT_PERSON);
      org.openeai.OpenEaiObject.logger.info("got LightweightPerson...");
     
      lPerson.setInstitutionalId(instIdTextField.getText());
      org.openeai.OpenEaiObject.logger.info("set instid on lightweight person...");
     
      org.any_openeai_enterprise.moa.objects.resources.v1_0.Name aName = lPerson.newName();
      if (bp_lastNameTextField.getText() != null && bp_lastNameTextField.getText().length() > 0) {
        aName.setLastName(bp_lastNameTextField.getText());
        lPerson.setName(aName);
      }
     
      if (bp_firstNameTextField.getText() != null && bp_firstNameTextField.getText().length() > 0) {
        aName.setFirstName(bp_firstNameTextField.getText());
        lPerson.setName(aName);
      }
     
      if (bp_middleNameTextField.getText() != null && bp_middleNameTextField.getText().length() > 0) {
        aName.setMiddleName(bp_middleNameTextField.getText());
        lPerson.setName(aName);
      }
     
      ActionableEnterpriseObject jeo = (ActionableEnterpriseObject)APP_CONFIG.getObject(messageObjectName);
      org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig, performing Query...");
     
View Full Code Here

     
      // first, get the name associated to the person who's emergency contacts we're looking for
      String messageObjectName = BASIC_PERSON;
      org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
      try {
        LightweightPerson lPerson =
          (LightweightPerson)APP_CONFIG.getObject(LIGHTWEIGHT_PERSON);
        org.openeai.OpenEaiObject.logger.info("got LightweightPerson...");
       
        lPerson.setInstitutionalId(instIdTextField.getText());
        org.openeai.OpenEaiObject.logger.info("set instid on lightweight person...");
       
        ActionableEnterpriseObject bpJeo = (ActionableEnterpriseObject)APP_CONFIG.getObject(messageObjectName);
        org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig, performing Query...");
       
View Full Code Here

TOP

Related Classes of org.any_openeai_enterprise.moa.objects.resources.v1_0.LightweightPerson

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.