Package org.apache.ws.scout.registry.infomodel

Examples of org.apache.ws.scout.registry.infomodel.UserImpl


    {
      List<Contact> contactList = contacts.getContact();
      if (contactList!=null) {
        boolean isFirst=true;
        for (Contact contact : contactList) {
          User user = new UserImpl(null);
          String pname = contact.getPersonName();
          user.setPersonName(new PersonNameImpl(pname));
          if (isFirst) {
            isFirst=false;
            org.setPrimaryContact(user);
          } else {
            org.addUser(user);
View Full Code Here


     */
    Contacts contacts = entity.getContacts();
    List<Contact> contactList = contacts.getContact();
    boolean isFirst=true;
    for (Contact contact : contactList) {
      User user = new UserImpl(null);
      String pname = contact.getPersonName();
      user.setType(contact.getUseType());
      user.setPersonName(new PersonNameImpl(pname));

      List<Email> emailList = contact.getEmail();
      ArrayList<EmailAddress> tempEmails = new ArrayList<EmailAddress>();
      for (Email email : emailList) {
        tempEmails.add(new EmailAddressImpl(email.getValue(), null));
      }
      user.setEmailAddresses(tempEmails);

      List<Address> addressList = contact.getAddress();
      ArrayList<PostalAddress> tempAddresses = new ArrayList<PostalAddress>();
      for (Address address : addressList) {
        ArrayList<AddressLine> addressLineList = new ArrayList<AddressLine>(address.getAddressLine());
        AddressLine[] alines = new AddressLine[addressLineList.size()];
        addressLineList.toArray(alines);

        PostalAddress pa = getPostalAddress(alines);
        tempAddresses.add(pa);
      }
      user.setPostalAddresses(tempAddresses);

      List<Phone> phoneList = contact.getPhone();
      ArrayList<TelephoneNumber> tempPhones = new ArrayList<TelephoneNumber>();
      for (Phone phone : phoneList) {
        TelephoneNumberImpl tni = new TelephoneNumberImpl();
        tni.setType(phone.getUseType());
        tni.setNumber(phone.getValue());
        tempPhones.add(tni);
      }
      user.setTelephoneNumbers(tempPhones);
      if (isFirst) {
        isFirst=false;
        org.setPrimaryContact(user);
      } else {
        org.addUser(user);
View Full Code Here

    {
      List<Contact> contactList = contacts.getContact();
      if (contactList!=null) {
        boolean isFirst=true;
        for (Contact contact : contactList) {
          User user = new UserImpl(null);
          List<PersonName> pname = contact.getPersonName();
          if (pname != null && pname.size() > 0) {
            String name = pname.get(0).getValue();
            user.setPersonName(new PersonNameImpl(name));           
          }
          if (isFirst) {
            isFirst=false;
            org.setPrimaryContact(user);
          } else {
View Full Code Here

    Contacts contacts = entity.getContacts();
    if (contacts != null) {
      List<Contact> contactList = contacts.getContact();
      boolean isFirst=true;
      for (Contact contact : contactList) {
        User user = new UserImpl(null);
        List<PersonName> pnames = (List<PersonName>) contact.getPersonName();
        String pname = null;
        if (pnames != null && pnames.size() > 0) {
          PersonName personname = pnames.get(0);
          pname = personname.getValue();
        }
        user.setType(contact.getUseType());
        user.setPersonName(new PersonNameImpl(pname));
 
        List<Email> emailList = contact.getEmail();
        ArrayList<EmailAddress> tempEmails = new ArrayList<EmailAddress>();
        for (Email email : emailList) {
          tempEmails.add(new EmailAddressImpl(email.getValue(), null));
        }
        user.setEmailAddresses(tempEmails);
 
        List<Address> addressList = contact.getAddress();
        ArrayList<PostalAddress> tempAddresses = new ArrayList<PostalAddress>();
        for (Address address : addressList) {
          ArrayList<AddressLine> addressLineList = new ArrayList<AddressLine>(address.getAddressLine());
          AddressLine[] alines = new AddressLine[addressLineList.size()];
          addressLineList.toArray(alines);
 
          PostalAddress pa = getPostalAddress(alines);
          tempAddresses.add(pa);
        }
        user.setPostalAddresses(tempAddresses);
 
        List<Phone> phoneList = contact.getPhone();
        ArrayList<TelephoneNumber> tempPhones = new ArrayList<TelephoneNumber>();
        for (Phone phone : phoneList) {
          TelephoneNumberImpl tni = new TelephoneNumberImpl();
          tni.setType(phone.getUseType());
          tni.setNumber(phone.getValue());
          tempPhones.add(tni);
        }
        user.setTelephoneNumbers(tempPhones);
        if (isFirst) {
          isFirst=false;
          org.setPrimaryContact(user);
        } else {
          org.addUser(user);
View Full Code Here

        }
        else if (LifeCycleManager.TELEPHONE_NUMBER.equals(interfaceName)) {
            return new TelephoneNumberImpl();
        }
        else if (LifeCycleManager.USER.equals(interfaceName)) {
            return new UserImpl(this);
        }
        else if (LifeCycleManager.VERSIONABLE.equals(interfaceName)) {
            throw new UnsupportedCapabilityException();
        }
        else {
View Full Code Here

        }
        else if (LifeCycleManager.TELEPHONE_NUMBER.equals(interfaceName)) {
            return new TelephoneNumberImpl();
        }
        else if (LifeCycleManager.USER.equals(interfaceName)) {
            return new UserImpl(this);
        }
        else if (LifeCycleManager.VERSIONABLE.equals(interfaceName)) {
            throw new UnsupportedCapabilityException();
        }
        else {
View Full Code Here

      Contact[] carr = contacts != null ? contacts.getContactArray() : null;

      for (int i = 0; carr != null && i < carr.length; i++)
      {
         Contact contact = (Contact)carr[i];
         User user = new UserImpl(null);
         String pname = contact.getPersonName();
         user.setPersonName(new PersonNameImpl(pname));
         if (i == 0)
         {
            org.setPrimaryContact(user);
         }
         else
View Full Code Here

      Contacts contacts = entity.getContacts();
      Contact[] carr = contacts != null ? contacts.getContactArray():null;
      for (int i = 0; carr != null && i < carr.length; i++)
      {
         Contact contact = carr[i];
         User user = new UserImpl(null);
         String pname = contact.getPersonName();
         user.setType(contact.getUseType());
         user.setPersonName(new PersonNameImpl(pname));
        

         Email[] emails = (Email[]) contact.getEmailArray();
         ArrayList<EmailAddress> tempEmails = new ArrayList<EmailAddress>();
         for (int x = 0; x < emails.length; x++) {
           tempEmails.add(new EmailAddressImpl(emails[x].getStringValue(), null));
         }
         user.setEmailAddresses(tempEmails);
        
         Address[] addresses = (Address[]) contact.getAddressArray();
         ArrayList<PostalAddress> tempAddresses = new ArrayList<PostalAddress>();
         for (int x = 0; x < addresses.length; x++) {
           AddressLine[] alines = addresses[x].getAddressLineArray();
           PostalAddress pa = getPostalAddress(alines);
           tempAddresses.add(pa);
         }
         user.setPostalAddresses(tempAddresses);
         Phone[] phones = contact.getPhoneArray();
         ArrayList<TelephoneNumber> tempPhones = new ArrayList<TelephoneNumber>();
         for (int x = 0; x < phones.length; x++) {
           TelephoneNumberImpl tni = new TelephoneNumberImpl();
           tni.setType(phones[x].getUseType());
           tni.setNumber(phones[x].getStringValue());
           tempPhones.add(tni);
         }
         user.setTelephoneNumbers(tempPhones);
        
         if (i == 0)
         {
            org.setPrimaryContact(user);
         }
View Full Code Here

        }
        else if (LifeCycleManager.TELEPHONE_NUMBER.equals(interfaceName)) {
            return new TelephoneNumberImpl();
        }
        else if (LifeCycleManager.USER.equals(interfaceName)) {
            return new UserImpl(this);
        }
        else if (LifeCycleManager.VERSIONABLE.equals(interfaceName)) {
            throw new UnsupportedCapabilityException();
        }
        else {
View Full Code Here

    {
      List<Contact> contactList = contacts.getContact();
      if (contactList!=null) {
        boolean isFirst=true;
        for (Contact contact : contactList) {
          User user = new UserImpl(null);
          String pname = contact.getPersonName();
          user.setPersonName(new PersonNameImpl(pname));
          if (isFirst) {
            isFirst=false;
            org.setPrimaryContact(user);
          } else {
            org.addUser(user);
View Full Code Here

TOP

Related Classes of org.apache.ws.scout.registry.infomodel.UserImpl

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.