|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a plugin that manages user contact databases.
Field Summary | |
static int |
CONTACT_EXPORT
|
static int |
CONTACT_IMPORT
|
static int |
DATABASE_EXPORT
|
static int |
DATABASE_IMPORT
|
Method Summary | |
JwmaContactsImpl |
createContacts()
Creates a new contact databse instance. |
java.lang.String |
exportContact(JwmaContact contact,
java.lang.String TYPE)
Exports a contact in the given type. |
void |
exportDatabase(java.io.OutputStream out,
JwmaContacts db,
java.lang.String TYPE)
Exports the given contact database in the given type. |
java.lang.String[] |
getSupportedTypes(int IMEX_TYPE)
Returns a list of types for the given import/export method. |
JwmaContact |
importContact(java.io.InputStream in,
java.lang.String TYPE)
Imports a contact of the given type. |
JwmaContact[] |
importDatabase(java.io.InputStream in,
java.lang.String Type)
Imports a database of contacts of the given type. |
boolean |
isPersistent(java.lang.String cuid)
Tests if a given contact database exists on the store. |
boolean |
isSupportedContactImportType(java.lang.String type)
Tests if the given contact type can be imported. |
JwmaContactsImpl |
loadContacts(java.lang.String cuid)
Loads the given contacts database from the persistent store and returns them as a JwmaContactsImpl instance. |
void |
saveContacts(JwmaContactsImpl contacts)
Saves the given contacts database to the persistent store. |
Methods inherited from interface dtw.webmail.plugin.JwmaPlugin |
activate, deactivate |
Field Detail |
public static final int CONTACT_EXPORT
public static final int CONTACT_IMPORT
public static final int DATABASE_EXPORT
public static final int DATABASE_IMPORT
Method Detail |
public JwmaContactsImpl loadContacts(java.lang.String cuid) throws JwmaException
If contacts database with the given identity does not exist on the store, the method returns null.
cuid
- a String representing a unique
identifier for a contact database.
JwmaException
- if an I/O error occurs.JwmaContactsImpl
,
JwmaPreferencesImpl.getContactDatabaseID()
public void saveContacts(JwmaContactsImpl contacts) throws JwmaException
If the contacts database does not exist on the store,
the method should create it, otherwise update
the existing version.
The unique identity is retrieved using the getUID()
method of the given JwmaContactsImpl instance.
contacts
- the JwmaContactsImpl instance to
saved.
JwmaException
- if an I/O error occurs.JwmaContactsImpl
,
JwmaContacts.getUID()
public boolean isPersistent(java.lang.String cuid) throws JwmaException
cuid
- a String representing a unique
identifier for a contact database.
JwmaException
- if an I/O error occurs.JwmaContactsImpl
,
JwmaPreferencesImpl.getContactDatabaseID()
public JwmaContactsImpl createContacts()
JwmaContactsImpl
public java.lang.String exportContact(JwmaContact contact, java.lang.String TYPE) throws JwmaException
contact
- the JwmaContact to be exported.TYPE
- the type of the export.
JwmaException
getSupportedTypes(int IMEX_TYPE)
,
CONTACT_EXPORT
public JwmaContact importContact(java.io.InputStream in, java.lang.String TYPE) throws JwmaException
in
- source for importing the contact in the given type.TYPE
- the type of the import source.
JwmaException
getSupportedTypes(int IMEX_TYPE)
,
CONTACT_IMPORT
public void exportDatabase(java.io.OutputStream out, JwmaContacts db, java.lang.String TYPE) throws JwmaException
db
- the JwmaContacts database to be exported.TYPE
- the type of the export.
JwmaException
getSupportedTypes(int IMEX_TYPE)
,
DATABASE_EXPORT
public JwmaContact[] importDatabase(java.io.InputStream in, java.lang.String Type) throws JwmaException
in
- source for importing the contacts in the given type.
JwmaException
getSupportedTypes(int IMEX_TYPE)
,
DATABASE_IMPORT
public java.lang.String[] getSupportedTypes(int IMEX_TYPE)
public boolean isSupportedContactImportType(java.lang.String type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |