|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.client.source.AppSyncSource
public class AppSyncSource
This class represents a sync source in the application. In the application a sync source is a pluggable component that allow users to deal with the synchronization of a given type of data. An AppSyncSource abstracts the following concepts: 1) SyncSource (at SyncML API level) 2) Displayable name 3) Icon (optional) 4) Main configuration screen 5) numerical ID (set by the application and optional) 6) Persistable configuration (stored in AppSyncSourceConfig) 7) Position in the UI 8) UI representation in home and settings screens 9) UI controller An abstract sync source can be in different status, depending on various things: 1) active if it is enabled in the customization and the server supports it 2) enabled if the user enabled it in the settings (or if enabled by default) 3) working if the client was able to set up all the bits and pieces to perform synchronizations
Field Summary | |
---|---|
protected java.lang.Class |
buttonClass
|
protected AppSyncSourceConfig |
config
|
protected boolean |
refreshFromServerSupported
|
protected boolean |
refreshToServerSupported
|
protected java.lang.Class |
settingsClass
|
protected SettingsUISyncSource |
settingsUISource
|
static int |
SYNC_FOLDER_SETTING
|
static int |
SYNC_MODE_SETTING
|
protected UISyncSource |
uiSource
|
protected java.lang.String |
warningOnFirstSync
|
Constructor Summary | |
---|---|
AppSyncSource(java.lang.String name)
|
|
AppSyncSource(java.lang.String name,
SyncSource source)
|
Method Summary | |
---|---|
UISyncSource |
createButtonUISyncSource(Screen screen)
|
SettingsUISyncSource |
createSettingsUISyncSource(Screen screen)
|
ExternalAppManager |
getAppManager()
|
AppSyncSourceConfig |
getConfig()
|
java.lang.String |
getDisabledIconName()
|
java.lang.String |
getDisabledLabel()
|
java.lang.String |
getEnabledLabel()
|
java.lang.String |
getIconName()
|
int |
getId()
|
java.lang.String |
getName()
|
java.lang.Object |
getNativeListener()
|
java.util.Hashtable |
getSettings()
|
java.lang.Class |
getSettingsUIClass()
|
SettingsUISyncSource |
getSettingsUISyncSource()
|
boolean |
getSyncedInSession()
Returns true if this source was synced in this session. |
SyncSource |
getSyncSource()
|
int |
getUiSourceIndex()
|
UISyncSource |
getUISyncSource()
|
UISyncSourceController |
getUISyncSourceController()
|
java.lang.String |
getWarningOnFirstSync()
Returns the message to show at the very first sync for this source. |
boolean |
hasSetting(int setting)
|
boolean |
hasSettings()
|
boolean |
isEnabled()
Deprecated. Use AppSyncSourceConfig directly instead |
boolean |
isRefreshSupported(int direction)
|
boolean |
isVisible()
|
boolean |
isWorking()
|
int |
prepareRefresh(int direction)
|
void |
reapplyConfiguration()
This method is invoked when there is a change in the configuration that impacts the source config. |
void |
setAppManager(ExternalAppManager manager)
|
void |
setButtonUIClass(java.lang.Class buttonClass)
|
void |
setConfig(AppSyncSourceConfig config)
|
void |
setDisabledIconName(java.lang.String name)
|
void |
setDisabledLabel(java.lang.String disabledLabel)
|
void |
setEnabledLabel(java.lang.String enabledLabel)
|
void |
setHasSetting(int setting,
boolean value,
java.lang.Object possibleValues)
|
void |
setIconName(java.lang.String name)
|
void |
setId(int id)
|
void |
setIsRefreshSupported(boolean value)
|
void |
setIsRefreshSupported(int direction,
boolean value)
|
void |
setIsVisible(boolean value)
|
void |
setNativeListener(java.lang.Object nativeListener)
|
void |
setSettingsUIClass(java.lang.Class settingsClass)
|
void |
setSyncedInSession(boolean value)
|
void |
setSyncSource(SyncSource source)
|
void |
setUiSourceIndex(int index)
|
void |
setUISyncSourceController(UISyncSourceController controller)
|
void |
setWarningOnFirstSync(java.lang.String message)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SYNC_MODE_SETTING
public static final int SYNC_FOLDER_SETTING
protected UISyncSource uiSource
protected SettingsUISyncSource settingsUISource
protected boolean refreshFromServerSupported
protected boolean refreshToServerSupported
protected java.lang.String warningOnFirstSync
protected AppSyncSourceConfig config
protected java.lang.Class settingsClass
protected java.lang.Class buttonClass
Constructor Detail |
---|
public AppSyncSource(java.lang.String name, SyncSource source)
public AppSyncSource(java.lang.String name)
Method Detail |
---|
public void setConfig(AppSyncSourceConfig config)
public AppSyncSourceConfig getConfig()
public void setId(int id)
public int getId()
public boolean isEnabled()
public int getUiSourceIndex()
public void setUiSourceIndex(int index)
public void setSyncSource(SyncSource source)
public void setAppManager(ExternalAppManager manager)
public ExternalAppManager getAppManager()
public SyncSource getSyncSource()
public java.lang.String getName()
public java.lang.String getEnabledLabel()
public void setEnabledLabel(java.lang.String enabledLabel)
public java.lang.String getDisabledLabel()
public void setDisabledLabel(java.lang.String disabledLabel)
public boolean isWorking()
public java.lang.String getIconName()
public void setIconName(java.lang.String name)
public void setDisabledIconName(java.lang.String name)
public java.lang.String getDisabledIconName()
public UISyncSource createButtonUISyncSource(Screen screen)
public UISyncSource getUISyncSource()
public void setButtonUIClass(java.lang.Class buttonClass)
public UISyncSourceController getUISyncSourceController()
public void setUISyncSourceController(UISyncSourceController controller)
public java.lang.Class getSettingsUIClass()
public void setSettingsUIClass(java.lang.Class settingsClass)
public SettingsUISyncSource createSettingsUISyncSource(Screen screen)
public SettingsUISyncSource getSettingsUISyncSource()
public boolean hasSettings()
public boolean hasSetting(int setting)
public java.util.Hashtable getSettings()
public void setHasSetting(int setting, boolean value, java.lang.Object possibleValues)
public int prepareRefresh(int direction)
public boolean isRefreshSupported(int direction)
public void setIsRefreshSupported(int direction, boolean value)
public void setIsRefreshSupported(boolean value)
public java.lang.Object getNativeListener()
public void setNativeListener(java.lang.Object nativeListener)
public boolean isVisible()
public void setIsVisible(boolean value)
public java.lang.String getWarningOnFirstSync()
public void setWarningOnFirstSync(java.lang.String message)
public boolean getSyncedInSession()
public void setSyncedInSession(boolean value)
public void reapplyConfiguration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |