Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.User


      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

    public void addUsers(Collection collection) throws JAXRException
    {
        // do this by hand to ensure all members are actually instances of User
        for (Iterator iterator = collection.iterator(); iterator.hasNext();)
        {
            User user = (User) iterator.next();
            addUser(user);
        }
    }
View Full Code Here

   }

   private void checkUser(Organization org) throws JAXRException
   {
      // Display primary contact information
      User pc = org.getPrimaryContact();
      if (pc != null)
      {
         PersonName pcName = pc.getPersonName();
         log.debug(" Contact name: " + pcName.getFullName());
         assertEquals("Anil S", pcName.getFullName());
         Collection phNums = pc.getTelephoneNumbers(pc.getType());
         for (Iterator phIter = phNums.iterator(); phIter.hasNext();)
         {
            TelephoneNumber num = (TelephoneNumber)phIter.next();
            log.debug("  Phone number: " + num.getNumber());
         }
         Collection eAddrs = pc.getEmailAddresses();
         for (Iterator eaIter = eAddrs.iterator(); eaIter.hasNext();)
         {
            log.debug("  Email Address: " + (EmailAddress)eaIter.next());
         }
      }
View Full Code Here

      serviceBinding.setAccessURI("http://testjboss.org");

      // Add the serviceBinding to the service
      service.addServiceBinding(serviceBinding);

      User user = blm.createUser();
      org.setPrimaryContact(user);
      PersonName personName = blm.createPersonName("Anil S");
      TelephoneNumber telephoneNumber = blm.createTelephoneNumber();
      telephoneNumber.setNumber("111-111-7777");
      telephoneNumber.setType(null);
      PostalAddress address = blm.createPostalAddress("111", "My Drive", "BuckHead", "GA", "USA", "1111-111", "");
      Collection postalAddresses = new ArrayList();
      postalAddresses.add(address);
      Collection emailAddresses = new ArrayList();
      EmailAddress emailAddress = blm.createEmailAddress("anil@apache.org");
      emailAddresses.add(emailAddress);

      Collection numbers = new ArrayList();
      numbers.add(telephoneNumber);
      user.setPersonName(personName);
      user.setPostalAddresses(postalAddresses);
      user.setEmailAddresses(emailAddresses);
      user.setTelephoneNumbers(numbers);

      ClassificationScheme cScheme = getClassificationScheme("ntis-gov:naics", "");
      Key cKey = blm.createKey("uuid:C0B9FE13-324F-413D-5A5B-2004DB8E5CC2");
      cScheme.setKey(cKey);
      Classification classification = blm.createClassification(cScheme, "Computer Systems Design and Related Services", "5415");
View Full Code Here

    public void testCreateObjectTelephoneNumber() throws JAXRException {
        assertEquals(TelephoneNumberImpl.class, manager.createObject(LifeCycleManager.TELEPHONE_NUMBER).getClass());
    }

    public void testCreateObjectUser() throws JAXRException {
        User user = (User) manager.createObject(LifeCycleManager.USER);
        assertEquals(UserImpl.class, user.getClass());
        assertSame(manager, user.getLifeCycleManager());
    }
View Full Code Here

    private static void printUser(Organization org)
    throws JAXRException
    {
        // Display primary contact information
        User pc = org.getPrimaryContact();
        if (pc != null)
        {
            PersonName pcName = pc.getPersonName();
            System.out.println(" Contact name: " + pcName.getFullName());
            Collection phNums = pc.getTelephoneNumbers(pc.getType());
            for (Iterator phIter = phNums.iterator(); phIter.hasNext();)
            {
                TelephoneNumber num = (TelephoneNumber) phIter.next();
                System.out.println("  Phone number: " + num.getNumber());
            }
            Collection eAddrs = pc.getEmailAddresses();
            for (Iterator eaIter = eAddrs.iterator(); eaIter.hasNext();)
            {
                System.out.println("  Email Address: " + (EmailAddress) eaIter.next());
            }
        }
View Full Code Here

    private static void printUser(Organization org)
    throws JAXRException
    {
        // Display primary contact information
        User pc = org.getPrimaryContact();
        if (pc != null)
        {
            PersonName pcName = pc.getPersonName();
            System.out.println(" Contact name: " + pcName.getFullName());
            Collection phNums = pc.getTelephoneNumbers(pc.getType());
            for (Iterator phIter = phNums.iterator(); phIter.hasNext();)
            {
                TelephoneNumber num = (TelephoneNumber) phIter.next();
                System.out.println("  Phone number: " + num.getNumber());
            }
            Collection eAddrs = pc.getEmailAddresses();
            for (Iterator eaIter = eAddrs.iterator(); eaIter.hasNext();)
            {
                System.out.println("  Email Address: " + (EmailAddress) eaIter.next());
            }
        }
View Full Code Here

   }

   private void checkUser(Organization org) throws JAXRException
   {
      // Display primary contact information
      User pc = org.getPrimaryContact();
      if (pc != null)
      {
         PersonName pcName = pc.getPersonName();
         log.debug(" Contact name: " + pcName.getFullName());
         assertEquals("Anil S", pcName.getFullName());
         Collection phNums = pc.getTelephoneNumbers(pc.getType());
         for (Iterator phIter = phNums.iterator(); phIter.hasNext();)
         {
            TelephoneNumber num = (TelephoneNumber)phIter.next();
            log.debug("  Phone number: " + num.getNumber());
         }
         Collection eAddrs = pc.getEmailAddresses();
         for (Iterator eaIter = eAddrs.iterator(); eaIter.hasNext();)
         {
            log.debug("  Email Address: " + (EmailAddress)eaIter.next());
         }
      }
View Full Code Here

      serviceBinding.setAccessURI("http://testjboss.org");

      // Add the serviceBinding to the service
      service.addServiceBinding(serviceBinding);

      User user = blm.createUser();
      org.setPrimaryContact(user);
      PersonName personName = blm.createPersonName("Anil S");
      TelephoneNumber telephoneNumber = blm.createTelephoneNumber();
      telephoneNumber.setNumber("111-111-7777");
      telephoneNumber.setType(null);
      PostalAddress address = blm.createPostalAddress("111", "My Drive", "BuckHead", "GA", "USA", "1111-111", "");
      Collection postalAddresses = new ArrayList();
      postalAddresses.add(address);
      Collection emailAddresses = new ArrayList();
      EmailAddress emailAddress = blm.createEmailAddress("anil@apache.org");
      emailAddresses.add(emailAddress);

      Collection numbers = new ArrayList();
      numbers.add(telephoneNumber);
      user.setPersonName(personName);
      user.setPostalAddresses(postalAddresses);
      user.setEmailAddresses(emailAddresses);
      user.setTelephoneNumbers(numbers);

      ClassificationScheme cScheme = getClassificationScheme("ntis-gov:naics", "");
      Key cKey = blm.createKey("uuid:C0B9FE13-324F-413D-5A5B-2004DB8E5CC2");
      cScheme.setKey(cKey);
      Classification classification = blm.createClassification(cScheme, "Computer Systems Design and Related Services", "5415");
View Full Code Here

TOP

Related Classes of javax.xml.registry.infomodel.User

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.