Nuxeo Enterprise Platform 5.4

org.nuxeo.cm.contact
Class Contacts

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<Contact>
              extended by org.nuxeo.cm.contact.Contacts
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Contact>, Collection<Contact>, List<Contact>, RandomAccess

public class Contacts
extends ArrayList<Contact>

A data structure representative for nxs:contacts complex type. It helps setting/retrieving contacts data.

Author:
Laurent Doguin
See Also:
Serialized Form

Constructor Summary
Contacts()
           
Contacts(List<Map<String,Serializable>> data)
           
 
Method Summary
 void addContact(Contact contact)
           
 String asNameEmailString()
           
 List<Contact> getContacts()
           
 ArrayList<Map<String,Serializable>> getContactsData()
           
static Contacts getContactsForDoc(org.nuxeo.ecm.core.api.DocumentModel doc, String propertyName)
           
 List<String> getEmails()
          This method returns the list of non null emails.
 List<String> getMailboxes()
          This method returns the list of non null mailbox ids
 List<String> getNames()
          This method returns the list of non null names.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

Contacts

public Contacts()

Contacts

public Contacts(List<Map<String,Serializable>> data)
Method Detail

getContactsForDoc

public static Contacts getContactsForDoc(org.nuxeo.ecm.core.api.DocumentModel doc,
                                         String propertyName)
                                  throws org.nuxeo.ecm.core.api.model.PropertyException
Throws:
org.nuxeo.ecm.core.api.model.PropertyException

addContact

public void addContact(Contact contact)

getContacts

public List<Contact> getContacts()

getContactsData

public ArrayList<Map<String,Serializable>> getContactsData()

getEmails

public List<String> getEmails()
This method returns the list of non null emails.

TODO: filter non "valid" emails


getNames

public List<String> getNames()
This method returns the list of non null names.


getMailboxes

public List<String> getMailboxes()
This method returns the list of non null mailbox ids


asNameEmailString

public String asNameEmailString()

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.