|
|
Contact List Importer 1.0 Java Library
Introduction
Importing contacts from various services is not easy. The ContactListImporter provides an interface for retrieving contacts from various services. Two working implementations of that interface are provided for the following services.
- Hotmail / Windows Live
- Gmail
- Yahoo
- Hyves (dutch social network site)
Please Donate
If you are using this project I have saved you either
- Time and hard work
- Money on licenses for other import software
So be kind a please donate. Any amount will do. I am a student so i can really use the money.
Sample Code
Importing contacts from these services very easy with the ContactListImporter library. The following code imports all contacts and prints them to System.out:
import com.xdatasystem.contactlistimporter.*;
// automatically guess the correct implementaion based on the email address
ContactListImporter importer=ContactListImporterFactory.guess("someuser@hotmail.com", "password");
List<Contact> contacts=importer.getContactList();
for(Contact c : contacts) {
System.out.println("name: "+c.getName()+", email: "+c.getEmail());
}Other ways to instantiate a ContactListImpoter using the factory can be done as follows:
// creates an hotmail contact importer
importer=ContactListImporterFactory.hotmail("someuser@hotmail.com", "password");
// creates an gmail contact importer
importer=ContactListImporterFactory.gmail("someuser@gmail.com", "password");Dependencies
This library has the following depenencies:
- The apache HttpComponents HttpClient 4.0 library: http://hc.apache.org/
- Log4j
- JSON library (needed for gmail importer) http://json.org/java
- a CVS library for parsing comma-separated-formats
This library can be used to support a -invite-your-friends- function for your site.
This library builds upon the knowledge gathered by the creator of the following ruby contactsimporter library:
Author
This program was created by Tjerk Wolterink and donated to the open source community. Cristian Ventura added the Yahoo importer implementation. You are free to add more importers, or to fix bugs.. just give me a mail.
