de.unikassel.android.sdcframework.preferences
Class TransmissionPreferenceImpl

Package class diagram package TransmissionPreferenceImpl
java.lang.Object
  extended by de.unikassel.android.sdcframework.preferences.TransmissionPreferenceImpl
All Implemented Interfaces:
SinglePreference<TransmissionConfiguration>, TransmissionPreference

public class TransmissionPreferenceImpl
extends Object
implements TransmissionPreference

Implementation of the preferences for the transmission configuration.


Field Summary
private  SinglePreference<ArchiveTypes> archiveTypePreference
          The preference for the archive type
private  SinglePreference<Boolean> encryptionEnabledPreference
          The preference for the encryption enabled flag
private  IntegerPreference maxSampleTransferCountPreference
          The preference for the maximum count of samples to transfer
private  IntegerPreference minSampleTransferCountPreference
          The preference for the minimum count of samples to transfer
private  LongPreference minTransferFrequencyPreference
          The preference for the minimum transmission frequency in seconds
private static String PREFIX
          The shared key prefix
private  TransmissionProtocolPreference protocolPreference
          The preference for the transmission protocol
 
Constructor Summary
TransmissionPreferenceImpl()
          Constructor
 
Method Summary
 SinglePreference<ArchiveTypes> getArchiveTypePreference()
          Getter for the preference for the archive type
 TransmissionConfiguration getConfiguration(SharedPreferences sharedPreferences)
          Getter for the current value in the shared preferences
 TransmissionConfiguration getDefault()
          Getter for the default value
 SinglePreference<Boolean> getEncryptionEnabledPreference()
          Getter for the archive encryption enabled preference
 String getKey()
          Getter for the preference key
 SinglePreference<Integer> getMaxSampleTransferCountPreference()
          Getter for the preference for the maximum count of samples to transfer
 SinglePreference<Integer> getMinSampleTransferCountPreference()
          Getter for the preference for the minimum count of samples to transfer
 SinglePreference<Long> getMinTransferFrequencyPreference()
          Getter for the preference for the minimum transmission frequency
 TransmissionProtocolPreference getProtocolPreference()
          Getter for the preference for the transmission protocol parameters
 void setDefault(TransmissionConfiguration 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

PREFIX

private static final String PREFIX
The shared key prefix

See Also:
Constant Field Values

minSampleTransferCountPreference

private final IntegerPreference minSampleTransferCountPreference
The preference for the minimum count of samples to transfer


maxSampleTransferCountPreference

private final IntegerPreference maxSampleTransferCountPreference
The preference for the maximum count of samples to transfer


minTransferFrequencyPreference

private final LongPreference minTransferFrequencyPreference
The preference for the minimum transmission frequency in seconds


protocolPreference

private final TransmissionProtocolPreference protocolPreference
The preference for the transmission protocol


archiveTypePreference

private final SinglePreference<ArchiveTypes> archiveTypePreference
The preference for the archive type


encryptionEnabledPreference

private final SinglePreference<Boolean> encryptionEnabledPreference
The preference for the encryption enabled flag

Constructor Detail

TransmissionPreferenceImpl

public TransmissionPreferenceImpl()
Constructor

Method Detail

getKey

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

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

getConfiguration

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

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

getDefault

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

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

setDefault

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

Specified by:
setDefault in interface SinglePreference<TransmissionConfiguration>
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<TransmissionConfiguration>
Parameters:
key - the key to test for
Returns:
true if this key is supported, false otherwise

getMinSampleTransferCountPreference

public SinglePreference<Integer> getMinSampleTransferCountPreference()
Description copied from interface: TransmissionPreference
Getter for the preference for the minimum count of samples to transfer

Specified by:
getMinSampleTransferCountPreference in interface TransmissionPreference
Returns:
the preference for the minimum count of samples to transfer

getMaxSampleTransferCountPreference

public SinglePreference<Integer> getMaxSampleTransferCountPreference()
Description copied from interface: TransmissionPreference
Getter for the preference for the maximum count of samples to transfer

Specified by:
getMaxSampleTransferCountPreference in interface TransmissionPreference
Returns:
the preference for the maximum count of samples to transfer

getMinTransferFrequencyPreference

public SinglePreference<Long> getMinTransferFrequencyPreference()
Description copied from interface: TransmissionPreference
Getter for the preference for the minimum transmission frequency

Specified by:
getMinTransferFrequencyPreference in interface TransmissionPreference
Returns:
the preference for the minimum transmission frequency

getProtocolPreference

public TransmissionProtocolPreference getProtocolPreference()
Description copied from interface: TransmissionPreference
Getter for the preference for the transmission protocol parameters

Specified by:
getProtocolPreference in interface TransmissionPreference
Returns:
the preference for the transmission protocol parameters

getArchiveTypePreference

public SinglePreference<ArchiveTypes> getArchiveTypePreference()
Description copied from interface: TransmissionPreference
Getter for the preference for the archive type

Specified by:
getArchiveTypePreference in interface TransmissionPreference
Returns:
the preference for the archive type

getEncryptionEnabledPreference

public SinglePreference<Boolean> getEncryptionEnabledPreference()
Description copied from interface: TransmissionPreference
Getter for the archive encryption enabled preference

Specified by:
getEncryptionEnabledPreference in interface TransmissionPreference
Returns:
the archive encryption enabled preference