de.unikassel.android.sdcframework.preferences.facade
Interface ApplicationPreferenceManager

Package class diagram package ApplicationPreferenceManager
All Superinterfaces:
ConfigurationChangeEventSource, ObserverRegistration<ConfigurationChangeEvent<? extends Configuration>>
All Known Implementing Classes:
ApplicationPreferenceManagerImpl

public interface ApplicationPreferenceManager
extends ConfigurationChangeEventSource

Interface for the application preference manager.

See Also:
ApplicationPreferenceManagerImpl

Method Summary
 SensorDeviceConfiguration getDeviceConfiguration(SensorDeviceIdentifier deviceIdentifier, Context applicationContext)
          Access to device configurations created from current device preferences
 LogLevelConfiguration getLogLevelConfiguration(Context applicationContext)
          Access to log level configuration created from current log level preferences
 SinglePreference<LogLevelConfiguration> getLogLevelPreference()
          Getter for log level preferences
 SensorDevicePreferences getPreferencesForDevice(SensorDeviceIdentifier deviceIdentifier)
          Getter for specific device preferences
 ServiceConfiguration getServiceConfiguration(Context applicationContext)
          Access to service configuration created from current service preferences
 ServicePreferences getServicePreferences()
          Getter for the service preferences
 SharedPreferences getSharedPreferences(Context applicationContext)
          Does return the shared preferences for the application context
 TimeProviderConfiguration getTimeProviderConfiguration(Context applicationContext)
          Access to the time provider configuration created from current time provider preferences
 TimeProviderPreference getTimeProviderPreference()
          Getter for time provider preferences
 String getUUIDConfiguration(Context applicationContext)
          Access to the UUID configuration created from the current UUID preferences
 UUIDPreference getUUIDPreference()
          Getter for UUID preferences
 void onDestroy()
          Internal destroy method to clean up references
 void resetToDefaults(Context applicationContext)
          Does reset the local stored changes for all preferences.
 void startListening(Context applicationContext)
          Does start the listening for application preferences changes
 void stopListening(Context applicationContext)
          Does stop the listening for application preferences changes
 void updateLogLevelConfiguration(Context applicationContext, LogLevel logLevel)
          Method to update the store log level preference
 void updatePreferenceState(Context applicationContext, SinglePreference<Boolean> preference, boolean state)
          Method to change the state for a given boolean preference
 void updateUUIDConfiguration(Context applicationContext, String sUuid)
          Method to update the stored device UUID.
 
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.ObserverRegistration
registerEventObserver, removeAllObservers, unregisterEventObserver
 

Method Detail

getSharedPreferences

SharedPreferences getSharedPreferences(Context applicationContext)
Does return the shared preferences for the application context

Parameters:
applicationContext - the application context
Returns:
the applications shared preferences

startListening

void startListening(Context applicationContext)
Does start the listening for application preferences changes

Parameters:
applicationContext - the application context

stopListening

void stopListening(Context applicationContext)
Does stop the listening for application preferences changes

Parameters:
applicationContext - the application context

getLogLevelPreference

SinglePreference<LogLevelConfiguration> getLogLevelPreference()
Getter for log level preferences

Returns:
the log level preference

updateLogLevelConfiguration

void updateLogLevelConfiguration(Context applicationContext,
                                 LogLevel logLevel)
Method to update the store log level preference

Parameters:
applicationContext - the application context
logLevel - the logLevel to update to

getUUIDPreference

UUIDPreference getUUIDPreference()
Getter for UUID preferences

Returns:
the UUID preference

getTimeProviderPreference

TimeProviderPreference getTimeProviderPreference()
Getter for time provider preferences

Returns:
the time provider preference

getPreferencesForDevice

SensorDevicePreferences getPreferencesForDevice(SensorDeviceIdentifier deviceIdentifier)
Getter for specific device preferences

Parameters:
deviceIdentifier - the device identifier
Returns:
the preferences for the device with the given identifier

getServicePreferences

ServicePreferences getServicePreferences()
Getter for the service preferences

Returns:
the service preferences

getLogLevelConfiguration

LogLevelConfiguration getLogLevelConfiguration(Context applicationContext)
Access to log level configuration created from current log level preferences

Parameters:
applicationContext - the application context
Returns:
the current log level configuration

getTimeProviderConfiguration

TimeProviderConfiguration getTimeProviderConfiguration(Context applicationContext)
Access to the time provider configuration created from current time provider preferences

Parameters:
applicationContext - the application context
Returns:
the current time provider configuration

getDeviceConfiguration

SensorDeviceConfiguration getDeviceConfiguration(SensorDeviceIdentifier deviceIdentifier,
                                                 Context applicationContext)
Access to device configurations created from current device preferences

Parameters:
deviceIdentifier - the device identifier
applicationContext - the application context
Returns:
the current device configuration

getServiceConfiguration

ServiceConfiguration getServiceConfiguration(Context applicationContext)
Access to service configuration created from current service preferences

Parameters:
applicationContext - the application context
Returns:
the current service configuration

getUUIDConfiguration

String getUUIDConfiguration(Context applicationContext)
Access to the UUID configuration created from the current UUID preferences

Parameters:
applicationContext - the application context
Returns:
the current UUID configuration

updateUUIDConfiguration

void updateUUIDConfiguration(Context applicationContext,
                             String sUuid)
Method to update the stored device UUID.

Parameters:
applicationContext - the application context
sUuid - the new UUID to store in preferences

onDestroy

void onDestroy()
Internal destroy method to clean up references


resetToDefaults

void resetToDefaults(Context applicationContext)
Does reset the local stored changes for all preferences.

Parameters:
applicationContext - the application context

updatePreferenceState

void updatePreferenceState(Context applicationContext,
                           SinglePreference<Boolean> preference,
                           boolean state)
Method to change the state for a given boolean preference

Parameters:
applicationContext - the application context
preference - the preference to change
state - the state to set