com.sybase.uep.bobclient.options
Class OptionsRepository

java.lang.Object
  extended by com.sybase.uep.bobclient.options.OptionsRepository

public class OptionsRepository
extends java.lang.Object

Options data repository. Persistent profiles, settings data. And the RimRepository now only should be responsible to load these data. It's the responsibility of Option module to init/modify/save these data.

Author:
linsong

Method Summary
 OptionsDefinition getOptionDefinition(java.lang.String clientName)
           
static OptionsRepository getOptionsRepository()
           
 long getPersistentKey(java.lang.String key, java.lang.String clientName)
          This method will return the persistent key for a specific package
 ClientProfileList loadClientProfileList(boolean force, OptionsDefinition optionsDef)
          Loads the profiles object that was persisted, if any.
 ClientProfileList loadClientProfileList(boolean force, java.lang.String clientName)
          Loads the profiles object that was persisted, if any.
 Settings loadSettings(boolean force, OptionsDefinition optionsDef)
          Loads the settings object that was persisted, if any.
 Settings loadSettings(boolean force, java.lang.String clientName)
          Loads the settings object that was persisted, if any.
 void saveClientProfileList(ClientProfileList profileList, OptionsDefinition optionsDef)
          Persists the profiles object.
 void saveClientProfileList(ClientProfileList profileList, java.lang.String clientName)
          Persists the profiles object.
 void saveSettings(Settings settings, OptionsDefinition optionsDef)
          Persists the settings object.
 void saveSettings(Settings settings, java.lang.String clientName)
          Persists the settings object.
 void setOptionDefinition(OptionsDefinition optionDef)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getOptionsRepository

public static OptionsRepository getOptionsRepository()

setOptionDefinition

public void setOptionDefinition(OptionsDefinition optionDef)

getOptionDefinition

public OptionsDefinition getOptionDefinition(java.lang.String clientName)

loadClientProfileList

public ClientProfileList loadClientProfileList(boolean force,
                                               OptionsDefinition optionsDef)
                                        throws RepositoryException
Loads the profiles object that was persisted, if any.

Throws:
RepositoryException

loadClientProfileList

public ClientProfileList loadClientProfileList(boolean force,
                                               java.lang.String clientName)
                                        throws RepositoryException
Loads the profiles object that was persisted, if any.

Throws:
RepositoryException

loadSettings

public Settings loadSettings(boolean force,
                             OptionsDefinition optionsDef)
                      throws RepositoryException
Loads the settings object that was persisted, if any.

Throws:
RepositoryException

loadSettings

public Settings loadSettings(boolean force,
                             java.lang.String clientName)
                      throws RepositoryException
Loads the settings object that was persisted, if any.

Throws:
RepositoryException

saveClientProfileList

public void saveClientProfileList(ClientProfileList profileList,
                                  OptionsDefinition optionsDef)
                           throws RepositoryException
Persists the profiles object.

Throws:
RepositoryException

saveClientProfileList

public void saveClientProfileList(ClientProfileList profileList,
                                  java.lang.String clientName)
                           throws RepositoryException
Persists the profiles object.

Parameters:
profileList -
client - name
Throws:
RepositoryException

saveSettings

public void saveSettings(Settings settings,
                         OptionsDefinition optionsDef)
                  throws RepositoryException
Persists the settings object.

Throws:
RepositoryException

saveSettings

public void saveSettings(Settings settings,
                         java.lang.String clientName)
                  throws RepositoryException
Persists the settings object.

Throws:
RepositoryException

getPersistentKey

public long getPersistentKey(java.lang.String key,
                             java.lang.String clientName)
This method will return the persistent key for a specific package

Parameters:
key - - The key for the persistent class
clientName - - The name of client application
Returns:
long - The persistent key for this specific client on this RIM device