de.unikassel.android.sdcframework.preferences
Class ServicePreferencesImpl

Package class diagram package ServicePreferencesImpl
java.lang.Object
  extended by de.unikassel.android.sdcframework.preferences.ServicePreferencesImpl
All Implemented Interfaces:
ServicePreferences, SinglePreference<ServiceConfiguration>

public class ServicePreferencesImpl
extends Object
implements ServicePreferences

Implementation of the service preferences.


Field Summary
private  LongPreference broadcastFrequencyPreference
          The preference for the broadcast interval in milliseconds
private  BooleanPreference dbFullDeletionIsPriorityBasedPreference
          The database full deletion priority recognition flag preference
private  IntegerPreference dbFullDeletionRecordCountPreference
          The database full deletion record count preference
private  SinglePreference<DBFullStrategyDescription> dbFullStrategyPreference
          The database full strategy preference
private  LongPreference dbFullWaitTimePreference
          The database full wait time preference
private  LongPreference dbSizeLimitPreference
          The database size limit preference
private static String LOG_TRANSFER_KEY
          The key for the log transfer service.
private  TransmissionProtocolPreference logTransferPreference
          The preference for the log transfer settings
static long MIN_DB_SIZE
          The absolute minimum for DB size ( can not be underrun by configuration )
private  BooleanPreference persistentStorageEnabledPreference
          The persistent storage enabled preference
private  BooleanPreference sampleBroadcastsEnabledPreference
          The sample broadcasts enabled preference
private  BooleanPreference sampleLocationFixEnabledPreference
          The sample location fix enabled preference
private  BooleanPreference samplingEnabledPreference
          The sampling enabled preference
private  BooleanPreference transmissionEnabledPreference
          The persistent storage enabled preference
private  TransmissionPreference transmissionPreference
          The preference for the transmission settings
private  SinglePreference<WeeklySchedule> weeklySchedulePreference
          The preference for the wekly time schedule.
 
Constructor Summary
ServicePreferencesImpl()
          Constructor
 
Method Summary
 LongPreference getBroadcastFrequencyPreference()
          Getter for the broadcasts frequency preference
 ServiceConfiguration getConfiguration(SharedPreferences sharedPreferences)
          Getter for the current value in the shared preferences
 SinglePreference<Boolean> getDbFullDeletionIsPriorityBasedPreference()
          Getter for the preference for priority based deletion
 SinglePreference<Integer> getDbFullDeletionRecordCountPreference()
          Getter the record count preference of the deletion strategy
 SinglePreference<DBFullStrategyDescription> getDbFullStrategyPreference()
          Getter for the preference for the database full strategy description
 SinglePreference<Long> getDbFullWaitTimePreference()
          Getter for the preference for the wait strategy time
 SinglePreference<Long> getDBMaxSizePreference()
          Getter for the database size limit preference
 ServiceConfiguration getDefault()
          Getter for the default value
 String getKey()
          Getter for the preference key
 TransmissionProtocolPreference getLogTransferPreference()
          Getter for preference with the log transfer settings
 SinglePreference<Boolean> getPersistentStorageEnabledPreference()
          Getter for the persistentStorageEnabledPreference
 SinglePreference<Boolean> getSampleBroadcastsEnabledPreference()
          Getter for the sample broadcasts enabled preference
 SinglePreference<Boolean> getSampleLocationFixEnabledPreference()
          Getter for the sample location fix enabled preference
 SinglePreference<Boolean> getSamplingEnabledPreference()
          Getter for the sampling enabled preference
 SinglePreference<Boolean> getTransmissionEnabledPreference()
          Getter for the sample transmission enabled preference
 TransmissionPreference getTransmissionPreference()
          Getter for preference with the transmission settings
 SinglePreference<WeeklySchedule> getWeeklySchedulePreference()
          Getter for the preference the weekly schedule.
 void setDefault(ServiceConfiguration defaultValue)
          Setter for the default value
 boolean testForKey(String key)
          Method to test for a preferences key support
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_TRANSFER_KEY

private static final String LOG_TRANSFER_KEY
The key for the log transfer service.

See Also:
Constant Field Values

MIN_DB_SIZE

public static final long MIN_DB_SIZE
The absolute minimum for DB size ( can not be underrun by configuration )

See Also:
Constant Field Values

sampleBroadcastsEnabledPreference

private final BooleanPreference sampleBroadcastsEnabledPreference
The sample broadcasts enabled preference


broadcastFrequencyPreference

private final LongPreference broadcastFrequencyPreference
The preference for the broadcast interval in milliseconds


samplingEnabledPreference

private final BooleanPreference samplingEnabledPreference
The sampling enabled preference


sampleLocationFixEnabledPreference

private final BooleanPreference sampleLocationFixEnabledPreference
The sample location fix enabled preference


persistentStorageEnabledPreference

private final BooleanPreference persistentStorageEnabledPreference
The persistent storage enabled preference


transmissionEnabledPreference

private final BooleanPreference transmissionEnabledPreference
The persistent storage enabled preference


dbSizeLimitPreference

private final LongPreference dbSizeLimitPreference
The database size limit preference


dbFullDeletionIsPriorityBasedPreference

private final BooleanPreference dbFullDeletionIsPriorityBasedPreference
The database full deletion priority recognition flag preference


dbFullDeletionRecordCountPreference

private final IntegerPreference dbFullDeletionRecordCountPreference
The database full deletion record count preference


dbFullWaitTimePreference

private final LongPreference dbFullWaitTimePreference
The database full wait time preference


dbFullStrategyPreference

private final SinglePreference<DBFullStrategyDescription> dbFullStrategyPreference
The database full strategy preference


transmissionPreference

private final TransmissionPreference transmissionPreference
The preference for the transmission settings


logTransferPreference

private final TransmissionProtocolPreference logTransferPreference
The preference for the log transfer settings


weeklySchedulePreference

private final SinglePreference<WeeklySchedule> weeklySchedulePreference
The preference for the wekly time schedule.

Constructor Detail

ServicePreferencesImpl

public ServicePreferencesImpl()
Constructor

Method Detail

getSampleBroadcastsEnabledPreference

public SinglePreference<Boolean> getSampleBroadcastsEnabledPreference()
Description copied from interface: ServicePreferences
Getter for the sample broadcasts enabled preference

Specified by:
getSampleBroadcastsEnabledPreference in interface ServicePreferences
Returns:
the sample broadcasts enabled preference

getBroadcastFrequencyPreference

public LongPreference getBroadcastFrequencyPreference()
Description copied from interface: ServicePreferences
Getter for the broadcasts frequency preference

Specified by:
getBroadcastFrequencyPreference in interface ServicePreferences
Returns:
the broadcasts frequency preference

getSamplingEnabledPreference

public SinglePreference<Boolean> getSamplingEnabledPreference()
Description copied from interface: ServicePreferences
Getter for the sampling enabled preference

Specified by:
getSamplingEnabledPreference in interface ServicePreferences
Returns:
the sampling enabled preference

getSampleLocationFixEnabledPreference

public SinglePreference<Boolean> getSampleLocationFixEnabledPreference()
Description copied from interface: ServicePreferences
Getter for the sample location fix enabled preference

Specified by:
getSampleLocationFixEnabledPreference in interface ServicePreferences
Returns:
the sample location fix enabled preference

getPersistentStorageEnabledPreference

public final SinglePreference<Boolean> getPersistentStorageEnabledPreference()
Getter for the persistentStorageEnabledPreference

Specified by:
getPersistentStorageEnabledPreference in interface ServicePreferences
Returns:
the persistentStorageEnabledPreference

getTransmissionEnabledPreference

public SinglePreference<Boolean> getTransmissionEnabledPreference()
Description copied from interface: ServicePreferences
Getter for the sample transmission enabled preference

Specified by:
getTransmissionEnabledPreference in interface ServicePreferences
Returns:
the sample transmission enabled preference

getDBMaxSizePreference

public SinglePreference<Long> getDBMaxSizePreference()
Description copied from interface: ServicePreferences
Getter for the database size limit preference

Specified by:
getDBMaxSizePreference in interface ServicePreferences
Returns:
the the database size limit preference

getDbFullDeletionIsPriorityBasedPreference

public final SinglePreference<Boolean> getDbFullDeletionIsPriorityBasedPreference()
Description copied from interface: ServicePreferences
Getter for the preference for priority based deletion

Specified by:
getDbFullDeletionIsPriorityBasedPreference in interface ServicePreferences
Returns:
the preference for priority based deletion

getDbFullDeletionRecordCountPreference

public final SinglePreference<Integer> getDbFullDeletionRecordCountPreference()
Description copied from interface: ServicePreferences
Getter the record count preference of the deletion strategy

Specified by:
getDbFullDeletionRecordCountPreference in interface ServicePreferences
Returns:
the record count preference of deletion strategy

getDbFullWaitTimePreference

public final SinglePreference<Long> getDbFullWaitTimePreference()
Description copied from interface: ServicePreferences
Getter for the preference for the wait strategy time

Specified by:
getDbFullWaitTimePreference in interface ServicePreferences
Returns:
the preference for the wait strategy time

getDbFullStrategyPreference

public final SinglePreference<DBFullStrategyDescription> getDbFullStrategyPreference()
Description copied from interface: ServicePreferences
Getter for the preference for the database full strategy description

Specified by:
getDbFullStrategyPreference in interface ServicePreferences
Returns:
the the preference for the database full strategy description

getTransmissionPreference

public TransmissionPreference getTransmissionPreference()
Description copied from interface: ServicePreferences
Getter for preference with the transmission settings

Specified by:
getTransmissionPreference in interface ServicePreferences
Returns:
the preference with the transmission settings

getLogTransferPreference

public TransmissionProtocolPreference getLogTransferPreference()
Description copied from interface: ServicePreferences
Getter for preference with the log transfer settings

Specified by:
getLogTransferPreference in interface ServicePreferences
Returns:
the preference with the log transfer settings

getWeeklySchedulePreference

public SinglePreference<WeeklySchedule> getWeeklySchedulePreference()
Description copied from interface: ServicePreferences
Getter for the preference the weekly schedule.

Specified by:
getWeeklySchedulePreference in interface ServicePreferences
Returns:
the preference with the weekly schedule

getKey

public String getKey()
Description copied from interface: SinglePreference
Getter for the preference key

Specified by:
getKey in interface SinglePreference<ServiceConfiguration>
Returns:
the preference key

getConfiguration

public ServiceConfiguration getConfiguration(SharedPreferences sharedPreferences)
Description copied from interface: SinglePreference
Getter for the current value in the shared preferences

Specified by:
getConfiguration in interface SinglePreference<ServiceConfiguration>
Parameters:
sharedPreferences - the shared application preferences
Returns:
the current value

getDefault

public ServiceConfiguration getDefault()
Description copied from interface: SinglePreference
Getter for the default value

Specified by:
getDefault in interface SinglePreference<ServiceConfiguration>
Returns:
the default value

setDefault

public void setDefault(ServiceConfiguration defaultValue)
Description copied from interface: SinglePreference
Setter for the default value

Specified by:
setDefault in interface SinglePreference<ServiceConfiguration>
Parameters:
defaultValue - the default value to set

testForKey

public boolean testForKey(String key)
Description copied from interface: SinglePreference
Method to test for a preferences key support

Specified by:
testForKey in interface SinglePreference<ServiceConfiguration>
Parameters:
key - the key to test for
Returns:
true if this key is supported, false otherwise