de.unikassel.android.sdcframework.preferences
Class TransmissionProtocolPreferenceImpl

Package class diagram package TransmissionProtocolPreferenceImpl
java.lang.Object
  extended by de.unikassel.android.sdcframework.preferences.TransmissionProtocolPreferenceImpl
All Implemented Interfaces:
SinglePreference<TransmissionProtocolConfiguration>, TransmissionProtocolPreference

public class TransmissionProtocolPreferenceImpl
extends Object
implements TransmissionProtocolPreference

Implementation of the preferences for a transmission protocol configuration.


Field Summary
private  StringPreference authPasswordPreference
          The preference for the authentication password
private  StringPreference authUserPreference
          The preference for the authentication user name
private  SinglePreference<ConnectionStrategyDescription> transmissionStrategyPreference
          The preference for the transmission strategy
private  StringPreference urlPreference
          The preference for the URL for file transfer
 
Constructor Summary
TransmissionProtocolPreferenceImpl(String prefix)
          Constructor
 
Method Summary
 SinglePreference<String> getAuthenticationPasswordPreference()
          Getter for the preference for the authentication password
 SinglePreference<String> getAuthenticationUserPreference()
          Getter for the preference for the authentication user name
 TransmissionProtocolConfiguration getConfiguration(SharedPreferences sharedPreferences)
          Getter for the current value in the shared preferences
 TransmissionProtocolConfiguration getDefault()
          Getter for the default value
 String getKey()
          Getter for the preference key
 SinglePreference<ConnectionStrategyDescription> getTransmissionStrategyPreference()
          Getter for the preference for the transmission strategy
 SinglePreference<String> getURLPreference()
          Getter for the preference for the transfer URL
 void setDefault(TransmissionProtocolConfiguration 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

urlPreference

private final StringPreference urlPreference
The preference for the URL for file transfer


authUserPreference

private final StringPreference authUserPreference
The preference for the authentication user name


authPasswordPreference

private final StringPreference authPasswordPreference
The preference for the authentication password


transmissionStrategyPreference

private final SinglePreference<ConnectionStrategyDescription> transmissionStrategyPreference
The preference for the transmission strategy

Constructor Detail

TransmissionProtocolPreferenceImpl

public TransmissionProtocolPreferenceImpl(String prefix)
Constructor

Parameters:
prefix - the prefix from the parent entry to use for the key name
Method Detail

getConfiguration

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

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

getDefault

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

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

setDefault

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

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

getURLPreference

public SinglePreference<String> getURLPreference()
Description copied from interface: TransmissionProtocolPreference
Getter for the preference for the transfer URL

Specified by:
getURLPreference in interface TransmissionProtocolPreference
Returns:
the preference for the transfer URL

getAuthenticationUserPreference

public SinglePreference<String> getAuthenticationUserPreference()
Description copied from interface: TransmissionProtocolPreference
Getter for the preference for the authentication user name

Specified by:
getAuthenticationUserPreference in interface TransmissionProtocolPreference
Returns:
the preference for the authentication user name

getAuthenticationPasswordPreference

public SinglePreference<String> getAuthenticationPasswordPreference()
Description copied from interface: TransmissionProtocolPreference
Getter for the preference for the authentication password

Specified by:
getAuthenticationPasswordPreference in interface TransmissionProtocolPreference
Returns:
the preference for the authentication password

getTransmissionStrategyPreference

public SinglePreference<ConnectionStrategyDescription> getTransmissionStrategyPreference()
Description copied from interface: TransmissionProtocolPreference
Getter for the preference for the transmission strategy

Specified by:
getTransmissionStrategyPreference in interface TransmissionProtocolPreference
Returns:
the preference for the transmission strategy

getKey

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

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