Package org.apache.harmony.security.x501

Examples of org.apache.harmony.security.x501.Name


        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);
          bp.setInstitutionalId(instId);
          Name name = bp.newName();
          name.setFirstName(firstName);
          name.setLastName(lastName);
          bp.setName(name);
          bp.create((PointToPointProducer)getAppConfig().getObject(producerName));
          LogService.log(LogService.INFO, "[basicPersonQueryHandler] BasicPerson was created.");
          xml += bp.getXmlEnterpriseObject().toXmlString();
        }
View Full Code Here



      // 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++) {
View Full Code Here

   * the BasicPerson object.
   **/
  protected void populateBasicPerson(BasicPerson bPerson) throws org.openeai.moa.EnterpriseObjectException {
    try {
      String instId = instIdTextField.getText();
      Name aName = bPerson.newName();
      aName.setLastName(bp_lastNameTextField.getText());
      aName.setFirstName(bp_firstNameTextField.getText());
      aName.setMiddleName(bp_middleNameTextField.getText());
     
      bPerson.setInstitutionalId(instId);
      bPerson.setName(aName);
      bPerson.setGender((String)bp_genderComboBox.getSelectedItem());
     
View Full Code Here

    protected void populateEmergencyContact(EmergencyContact ec) throws org.openeai.moa.EnterpriseObjectException {
      try {
        ec.setOwnerId(instIdTextField.getText());
        ec.setPriority((String)ec_priority.getSelectedItem());
        ec.setRelationship((String)ec_relation.getSelectedItem());
        Name name = ec.newName();
        name.setFirstName(ec_firstName.getText());
        name.setLastName(ec_lastName.getText());
        ec.setName(name);
       
        Address a = ec.newAddress();
        // get the effective date and verify it's format, then populate the
        // address' effective date information with it.
View Full Code Here

      logger.info("Retrieving Person record for InstitutionalId: " + instId);
      ResultSet rs = stmt.executeQuery();
      logger.info("Retreived Person record for InstitutionalId: " + instId);

      BasicPerson bPerson = (BasicPerson)getAppConfig().getObject("BasicPerson.v1_0");
      Name aName = bPerson.newName();
      boolean foundPerson = false;
      while (rs.next()) {
        foundPerson = true;
        bPerson.setInstitutionalId(rs.getString(1));
        aName.setFirstName(rs.getString(2));
        aName.setMiddleName(rs.getString(3));
        aName.setLastName(rs.getString(4));
        bPerson.setName(aName);
        bPerson.setGender(rs.getString(5));
        bPerson.setEthnicity(rs.getString(6));
        com.any_erp_vendor.moa.objects.resources.v1_0.Date bDate = bPerson.newBirthDate();
        java.sql.Date dbDate = rs.getDate(7);
View Full Code Here

    try {
      InstitutionalIdentity instIdent = (InstitutionalIdentity)getAppConfig()
        .getObject("InstitutionalIdentity");
      UnknownPerson uPerson = (UnknownPerson)getAppConfig()
        .getObject("UnknownPerson");  
      Name aName = (Name)getAppConfig().getObject("Name");
    }
    catch (EnterpriseConfigurationObjectException eoce) {
      // An error occurred retrieving a required object from AppConfig. Log it
      // and throw an exception.
      String errMsg = "An error occurred retrieving a required object from " +
View Full Code Here

        errMsg);
      throw new I2sRepositoryException(errMsg);
    }

    // Get a configured Name object out of AppConfig.
    Name name = new Name();
    try {
      name = (Name)getAppConfig().getObject("Name");
    }
    catch (EnterpriseConfigurationObjectException eoce) {
      // An error occurred retrieving a Name object from AppConfig. Log it and
      // throw an exception.
      String errMsg = "An error occurred retrieving a Name object from " +
        "AppConfig. The exception is: " + eoce.getMessage();
      logger.fatal("[RdbmsI2sRepository.retrieveInstitutionalIdBySsn] " +
        errMsg);
      throw new I2sRepositoryException(errMsg);
    }
   
    // Initialize a query string to retrieve the InstitutionalIdentity.
    String getString1 = "SELECT INST_ID, FIRST_NAME, MIDDLE_NAME, LAST_NAME, " +
      "SSN, BIRTH_DATE, GENDER FROM T_INST_IDENT WHERE SSN = ? AND " +
      "TERMINATED_DATE IS NULL";
     
    try {
      PreparedStatement getStmt1 = conn.prepareStatement(getString1);
      getStmt1.clearParameters();
      getStmt1.setString(1, ssn);
      ResultSet r1 = getStmt1.executeQuery();
      if (r1.next()) {
        // The InstitutionalIdentity exists. Log a message and build the
        // InstitutionalIdentity object.
        logger.debug("[RdbmsI2sRepository.retrieveInstitutionalIdentityBySsn] "
          + "Found an InstitutionalIdentity in the database for SSN: " + ssn +
          ".");
        // Set the values of the Name object.
        try {
          name.setFirstName(r1.getString(2));
          name.setMiddleName(r1.getString(3));
          name.setLastName(r1.getString(4));
        }
        catch (EnterpriseFieldException efe) {
          // An error occurred setting field values for the Name. Log it,
          // close the statement, and throw an exception.
          String errMsg = "An error occurred seeting field values for the " +
View Full Code Here

        int[] oid = (int[]) in.get(key);
        if (oid == null) {
            throw new RuntimeException("");//FIXME message & type //$NON-NLS-1$
        }

        AttributeType attr = (AttributeType) pool.get(oid);
        if (attr == null || (!attr.type.checkTag(in.tag))) {
            in.content = (byte[]) super.getDecodedObject(in);
        } else {
            in.content = attr.type.decode(in);
        }
View Full Code Here

        int[] oid = (int[]) in.get(key);
        if (oid == null) {
            throw new RuntimeException("");//FIXME message & type //$NON-NLS-1$
        }

        AttributeType attr = (AttributeType) pool.get(oid);
        if (attr == null || (!attr.type.checkTag(in.tag))) {
            in.content = (byte[]) super.getDecodedObject(in);
        } else {
            in.content = attr.type.decode(in);
        }
View Full Code Here

        while (true) {

            if (pos == length) {

                //empty Attribute Value
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        "", false))); //$NON-NLS-1$
                list.add(0, atav);

                return list;
            }

            switch (chars[pos]) {
            case '"':
                attValue = quotedAV();
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        attValue, hasQE)));
                break;
            case '#':
                attValue = hexAV();

                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        attValue, encoded)));
                break;
            case '+':
            case ',':
            case ';': // compatibility with RFC 1779: semicolon can separate RDNs
                //empty attribute value
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        "", false))); //$NON-NLS-1$
                break;
            default:
                attValue = escapedAV();
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        attValue, hasQE)));
            }

            if (pos >= length) {
                list.add(0, atav);
View Full Code Here

TOP

Related Classes of org.apache.harmony.security.x501.Name

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.