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 java.lang.String CALENDAR_TYPE_ICALENDAR
           
static java.lang.String CALENDAR_TYPE_SIF
           
static java.lang.String CALENDAR_TYPE_VCALENDAR
           
static int CONFIG_ID
           
protected static java.lang.String CONFIG_TYPE
           
static java.lang.String CONTACT_TYPE_SIF
           
static java.lang.String CONTACT_TYPE_VCARD
           
static int CONTACTS_ID
           
protected  Customization customization
           
static int EVENTS_ID
           
static int FILES_ID
           
static int MAILS_ID
           
protected static java.lang.String NOTE_TYPE
           
static java.lang.String NOTE_TYPE_SIF
           
static int NOTES_ID
           
protected static java.lang.String PHOTO_TYPE
           
static int PICTURES_ID
           
static java.lang.String TASK_TYPE_SIF
           
static java.lang.String TASK_TYPE_VCALENDAR
           
static int TASKS_ID
           
protected static java.lang.String VIDEO_TYPE
           
static int VIDEOS_ID
           
 
Constructor Summary
AppSyncSourceManager(Customization customization)
           
 
Method Summary
 java.util.Enumeration getEnabledAndWorkingSources()
           
 java.util.Enumeration getEnabledSources()
           
 java.util.Enumeration getRegisteredSources()
           
 AppSyncSource getSource(int id)
           
 AppSyncSource getSource(SyncSource source)
           
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

VIDEOS_ID

public static final int VIDEOS_ID
See Also:
Constant Field Values

FILES_ID

public static final int FILES_ID
See Also:
Constant Field Values

ALL_ID

public static final int ALL_ID
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

CALENDAR_TYPE_VCALENDAR

public static final java.lang.String CALENDAR_TYPE_VCALENDAR
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

TASK_TYPE_VCALENDAR

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

BRIEFCASE_TYPE

public static final java.lang.String BRIEFCASE_TYPE

NOTE_TYPE

protected static final java.lang.String NOTE_TYPE
See Also:
Constant Field Values

PHOTO_TYPE

protected static final java.lang.String PHOTO_TYPE

VIDEO_TYPE

protected static final java.lang.String VIDEO_TYPE

CONFIG_TYPE

protected static final java.lang.String CONFIG_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)

getSource

public AppSyncSource getSource(SyncSource source)

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.