com.funambol.client.source
Class AppSyncSourceManager

java.lang.Object
  extended by com.funambol.client.source.AppSyncSourceManager

public class AppSyncSourceManager
extends java.lang.Object

This class is responsible for handling all the sources at the application level. A source at the application level is a type of data for which a SyncSource exits, but also a sync button on the screen and configuration parameters. This class creates and registers the sources. The list of sources is handled and allows other parts of the application to be completely parametric wrt to this value. For new sources to be added to the application it is necessary to register them in this manager. The only other part of the application that must be changed when new sources are added is the Customization which holds default parameters for each source.


Nested Class Summary
 class AppSyncSourceManager.SortedSourcesEnumeration
           
 
Field Summary
static int ALL_ID
           
static java.lang.String BRIEFCASE_TYPE
           
static long CALENDAR_ADDITS_STORAGE_KEY
           
static long CALENDAR_STORAGE_KEY
           
static java.lang.String CALENDAR_TYPE_ICALENDAR
           
static java.lang.String CALENDAR_TYPE_SIF
           
static int CONFIG_ID
           
static java.lang.String CONFIG_KEY_SYNC_CALENDAR
           
static java.lang.String CONFIG_KEY_SYNC_CONFIG
           
static java.lang.String CONFIG_KEY_SYNC_CONTACT
           
static java.lang.String CONFIG_KEY_SYNC_NOTE
           
static java.lang.String CONFIG_KEY_SYNC_PHOTO
           
static java.lang.String CONFIG_KEY_SYNC_TASK
           
static long CONFIG_STORAGE_KEY
           
static long CONTACT_STORAGE_KEY
           
static java.lang.String CONTACT_TYPE_SIF
           
static java.lang.String CONTACT_TYPE_VCARD
           
static long CONTACTS_ADDITS_STORAGE_KEY
           
static int CONTACTS_ID
           
protected  Customization customization
           
static int EVENTS_ID
           
static int MAILS_ID
           
static long NOTE_ADDITS_STORAGE_KEY
           
static long NOTE_STOREAGE_KEY
           
static java.lang.String NOTE_TYPE_SIF
           
static int NOTES_ID
           
static long PHOTO_STORAGE_KEY
           
static int PICTURES_ID
           
static long TASK_STORAGE_KEY
           
static java.lang.String TASK_TYPE_SIF
           
static long TASKS_ADDITS_STORAGE_KEY
           
static int TASKS_ID
           
 
Constructor Summary
AppSyncSourceManager(Customization customization)
           
 
Method Summary
 java.util.Enumeration getEnabledAndWorkingSources()
           
 java.util.Enumeration getEnabledSources()
           
 java.util.Enumeration getRegisteredSources()
           
 AppSyncSource getSource(int id)
           
protected  int getSourcePosition(int id)
           
 java.util.Enumeration getWorkingSources()
           
 int numberOfEnabledAndWorkingSources()
           
 int numberOfEnabledSources()
           
 int numberOfRegisteredSources()
           
 int numberOfWorkingSources()
           
 void registerSource(AppSyncSource source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTACTS_ID

public static final int CONTACTS_ID
See Also:
Constant Field Values

EVENTS_ID

public static final int EVENTS_ID
See Also:
Constant Field Values

TASKS_ID

public static final int TASKS_ID
See Also:
Constant Field Values

NOTES_ID

public static final int NOTES_ID
See Also:
Constant Field Values

PICTURES_ID

public static final int PICTURES_ID
See Also:
Constant Field Values

MAILS_ID

public static final int MAILS_ID
See Also:
Constant Field Values

CONFIG_ID

public static final int CONFIG_ID
See Also:
Constant Field Values

ALL_ID

public static final int ALL_ID
See Also:
Constant Field Values

CONTACT_STORAGE_KEY

public static final long CONTACT_STORAGE_KEY
See Also:
Constant Field Values

CALENDAR_STORAGE_KEY

public static final long CALENDAR_STORAGE_KEY
See Also:
Constant Field Values

NOTE_STOREAGE_KEY

public static final long NOTE_STOREAGE_KEY
See Also:
Constant Field Values

TASK_STORAGE_KEY

public static final long TASK_STORAGE_KEY
See Also:
Constant Field Values

PHOTO_STORAGE_KEY

public static final long PHOTO_STORAGE_KEY
See Also:
Constant Field Values

CONFIG_STORAGE_KEY

public static final long CONFIG_STORAGE_KEY
See Also:
Constant Field Values

CONTACTS_ADDITS_STORAGE_KEY

public static final long CONTACTS_ADDITS_STORAGE_KEY
See Also:
Constant Field Values

CALENDAR_ADDITS_STORAGE_KEY

public static final long CALENDAR_ADDITS_STORAGE_KEY
See Also:
Constant Field Values

NOTE_ADDITS_STORAGE_KEY

public static final long NOTE_ADDITS_STORAGE_KEY
See Also:
Constant Field Values

TASKS_ADDITS_STORAGE_KEY

public static final long TASKS_ADDITS_STORAGE_KEY
See Also:
Constant Field Values

CONFIG_KEY_SYNC_CONTACT

public static final java.lang.String CONFIG_KEY_SYNC_CONTACT
See Also:
Constant Field Values

CONFIG_KEY_SYNC_CALENDAR

public static final java.lang.String CONFIG_KEY_SYNC_CALENDAR
See Also:
Constant Field Values

CONFIG_KEY_SYNC_TASK

public static final java.lang.String CONFIG_KEY_SYNC_TASK
See Also:
Constant Field Values

CONFIG_KEY_SYNC_NOTE

public static final java.lang.String CONFIG_KEY_SYNC_NOTE
See Also:
Constant Field Values

CONFIG_KEY_SYNC_PHOTO

public static final java.lang.String CONFIG_KEY_SYNC_PHOTO
See Also:
Constant Field Values

CONFIG_KEY_SYNC_CONFIG

public static final java.lang.String CONFIG_KEY_SYNC_CONFIG
See Also:
Constant Field Values

CONTACT_TYPE_VCARD

public static final java.lang.String CONTACT_TYPE_VCARD

CONTACT_TYPE_SIF

public static final java.lang.String CONTACT_TYPE_SIF
See Also:
Constant Field Values

CALENDAR_TYPE_SIF

public static final java.lang.String CALENDAR_TYPE_SIF
See Also:
Constant Field Values

CALENDAR_TYPE_ICALENDAR

public static final java.lang.String CALENDAR_TYPE_ICALENDAR
See Also:
Constant Field Values

NOTE_TYPE_SIF

public static final java.lang.String NOTE_TYPE_SIF
See Also:
Constant Field Values

TASK_TYPE_SIF

public static final java.lang.String TASK_TYPE_SIF
See Also:
Constant Field Values

BRIEFCASE_TYPE

public static final java.lang.String BRIEFCASE_TYPE

customization

protected Customization customization
Constructor Detail

AppSyncSourceManager

public AppSyncSourceManager(Customization customization)
Method Detail

registerSource

public void registerSource(AppSyncSource source)

numberOfRegisteredSources

public int numberOfRegisteredSources()

numberOfEnabledSources

public int numberOfEnabledSources()

numberOfWorkingSources

public int numberOfWorkingSources()

numberOfEnabledAndWorkingSources

public int numberOfEnabledAndWorkingSources()

getSource

public AppSyncSource getSource(int id)

getEnabledSources

public java.util.Enumeration getEnabledSources()

getWorkingSources

public java.util.Enumeration getWorkingSources()

getEnabledAndWorkingSources

public java.util.Enumeration getEnabledAndWorkingSources()

getRegisteredSources

public java.util.Enumeration getRegisteredSources()

getSourcePosition

protected int getSourcePosition(int id)


Copyright © 2001-2009 Funambol.