diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/Transport.java b/k9mail-library/src/main/java/com/fsck/k9/mail/Transport.java index 068e8ee86..a549de0d4 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/Transport.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/Transport.java @@ -5,6 +5,7 @@ import android.content.Context; import com.fsck.k9.mail.ssl.DefaultTrustedSocketFactory; import com.fsck.k9.mail.store.StoreConfig; +import com.fsck.k9.mail.ServerSettings.Type; import com.fsck.k9.mail.transport.SmtpTransport; import com.fsck.k9.mail.transport.WebDavTransport; @@ -63,9 +64,9 @@ public abstract class Transport { * @see WebDavTransport#createUri(ServerSettings) */ public static String createTransportUri(ServerSettings server) { - if (SmtpTransport.TRANSPORT_TYPE.equals(server.type)) { + if (Type.SMTP == server.type) { return SmtpTransport.createUri(server); - } else if (WebDavTransport.TRANSPORT_TYPE.equals(server.type)) { + } else if (Type.WebDAV == server.type) { return WebDavTransport.createUri(server); } else { throw new IllegalArgumentException("Not a valid transport URI"); diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/store/RemoteStore.java b/k9mail-library/src/main/java/com/fsck/k9/mail/store/RemoteStore.java index 0c7562dd3..d2850f2ba 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/store/RemoteStore.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/store/RemoteStore.java @@ -5,6 +5,7 @@ import android.net.ConnectivityManager; import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.ServerSettings; +import com.fsck.k9.mail.ServerSettings.Type; import com.fsck.k9.mail.Store; import com.fsck.k9.mail.ssl.DefaultTrustedSocketFactory; import com.fsck.k9.mail.ssl.TrustedSocketFactory; @@ -121,11 +122,11 @@ public abstract class RemoteStore extends Store { * @see com.fsck.k9.mail.store.webdav.WebDavStore#createUri(com.fsck.k9.mail.ServerSettings) */ public static String createStoreUri(ServerSettings server) { - if (ImapStore.STORE_TYPE.equals(server.type)) { + if (Type.IMAP == server.type) { return ImapStore.createUri(server); - } else if (Pop3Store.STORE_TYPE.equals(server.type)) { + } else if (Type.POP3 == server.type) { return Pop3Store.createUri(server); - } else if (WebDavStore.STORE_TYPE.equals(server.type)) { + } else if (Type.WebDAV == server.type) { return WebDavStore.createUri(server); } else { throw new IllegalArgumentException("Not a valid store URI"); diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/store/imap/ImapStore.java b/k9mail-library/src/main/java/com/fsck/k9/mail/store/imap/ImapStore.java index f0509a950..006ef7ee0 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/store/imap/ImapStore.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/store/imap/ImapStore.java @@ -77,7 +77,6 @@ import static com.fsck.k9.mail.K9MailLib.PUSH_WAKE_LOCK_TIMEOUT; * */ public class ImapStore extends RemoteStore { - public static final ServerSettings.Type STORE_TYPE = ServerSettings.Type.IMAP; private static final int IDLE_READ_TIMEOUT_INCREMENT = 5 * 60 * 1000; private static final int IDLE_FAILURE_COUNT_LIMIT = 10; @@ -284,7 +283,7 @@ public class ImapStore extends RemoteStore { protected ImapStoreSettings(String host, int port, ConnectionSecurity connectionSecurity, AuthType authenticationType, String username, String password, String clientCertificateAlias, boolean autodetectNamespace, String pathPrefix) { - super(STORE_TYPE, host, port, connectionSecurity, authenticationType, username, + super(Type.IMAP, host, port, connectionSecurity, authenticationType, username, password, clientCertificateAlias); this.autoDetectNamespace = autodetectNamespace; this.pathPrefix = pathPrefix; diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Store.java b/k9mail-library/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Store.java index abf8f5621..37a5718f9 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Store.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/store/pop3/Pop3Store.java @@ -38,7 +38,6 @@ import static com.fsck.k9.mail.K9MailLib.LOG_TAG; import static com.fsck.k9.mail.CertificateValidationException.Reason.MissingCapability; public class Pop3Store extends RemoteStore { - public static final ServerSettings.Type STORE_TYPE = ServerSettings.Type.POP3; private static final String STLS_COMMAND = "STLS"; private static final String USER_COMMAND = "USER"; @@ -140,7 +139,7 @@ public class Pop3Store extends RemoteStore { } } - return new ServerSettings(STORE_TYPE, host, port, connectionSecurity, authType, username, + return new ServerSettings(ServerSettings.Type.POP3, host, port, connectionSecurity, authType, username, password, clientCertificateAlias); } diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/store/webdav/WebDavStore.java b/k9mail-library/src/main/java/com/fsck/k9/mail/store/webdav/WebDavStore.java index 1ab551168..4048d5553 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/store/webdav/WebDavStore.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/store/webdav/WebDavStore.java @@ -58,7 +58,6 @@ import static com.fsck.k9.mail.K9MailLib.LOG_TAG; * */ public class WebDavStore extends RemoteStore { - public static final ServerSettings.Type STORE_TYPE = ServerSettings.Type.WebDAV; // Authentication types private static final short AUTH_TYPE_NONE = 0; @@ -248,7 +247,7 @@ public class WebDavStore extends RemoteStore { protected WebDavStoreSettings(String host, int port, ConnectionSecurity connectionSecurity, AuthType authenticationType, String username, String password, String clientCertificateAlias, String alias, String path, String authPath, String mailboxPath) { - super(STORE_TYPE, host, port, connectionSecurity, authenticationType, username, + super(Type.WebDAV, host, port, connectionSecurity, authenticationType, username, password, clientCertificateAlias); this.alias = alias; this.path = path; diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/transport/SmtpTransport.java b/k9mail-library/src/main/java/com/fsck/k9/mail/transport/SmtpTransport.java index 7c44e5817..27600198b 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/transport/SmtpTransport.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/transport/SmtpTransport.java @@ -32,8 +32,6 @@ import static com.fsck.k9.mail.CertificateValidationException.Reason.MissingCapa public class SmtpTransport extends Transport { private TrustedSocketFactory mTrustedSocketFactory; - public static final ServerSettings.Type TRANSPORT_TYPE = ServerSettings.Type.SMTP; - /** * Decodes a SmtpTransport URI. * @@ -115,7 +113,7 @@ public class SmtpTransport extends Transport { } } - return new ServerSettings(TRANSPORT_TYPE, host, port, connectionSecurity, + return new ServerSettings(ServerSettings.Type.SMTP, host, port, connectionSecurity, authType, username, password, clientCertificateAlias); } diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/transport/WebDavTransport.java b/k9mail-library/src/main/java/com/fsck/k9/mail/transport/WebDavTransport.java index 7578757ba..61ac6f102 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/transport/WebDavTransport.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/transport/WebDavTransport.java @@ -16,7 +16,6 @@ import java.util.Collections; import static com.fsck.k9.mail.K9MailLib.LOG_TAG; public class WebDavTransport extends Transport { - public static final ServerSettings.Type TRANSPORT_TYPE = WebDavStore.STORE_TYPE; /** * Decodes a WebDavTransport URI. diff --git a/k9mail/src/main/java/com/fsck/k9/account/AccountCreator.java b/k9mail/src/main/java/com/fsck/k9/account/AccountCreator.java index b8e5f0aad..4b19e8759 100644 --- a/k9mail/src/main/java/com/fsck/k9/account/AccountCreator.java +++ b/k9mail/src/main/java/com/fsck/k9/account/AccountCreator.java @@ -13,19 +13,16 @@ import java.util.Map; */ public class AccountCreator { - private static Map defaults; + private static Map defaults = new HashMap(); + + static { + defaults.put(Type.IMAP, DeletePolicy.ON_DELETE); + defaults.put(Type.POP3, DeletePolicy.NEVER); + defaults.put(Type.WebDAV, DeletePolicy.ON_DELETE); + } public static DeletePolicy calculateDefaultDeletePolicy(Type type) { - return getDefaults().get(type); + return defaults.get(type); } - private static synchronized Map getDefaults() { - if (null == defaults) { - defaults = new HashMap(); - defaults.put(Type.IMAP, DeletePolicy.ON_DELETE); - defaults.put(Type.POP3, DeletePolicy.NEVER); - defaults.put(Type.WebDAV, DeletePolicy.ON_DELETE); - } - return defaults; - } } diff --git a/k9mail/src/main/java/com/fsck/k9/activity/Accounts.java b/k9mail/src/main/java/com/fsck/k9/activity/Accounts.java index f60311eea..ed7d8cae9 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/Accounts.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/Accounts.java @@ -81,7 +81,6 @@ import com.fsck.k9.mail.Transport; import com.fsck.k9.mail.internet.MimeUtility; import com.fsck.k9.mail.store.RemoteStore; import com.fsck.k9.mailstore.StorageManager; -import com.fsck.k9.mail.store.webdav.WebDavStore; import com.fsck.k9.preferences.SettingsExporter; import com.fsck.k9.preferences.SettingsImportExportException; import com.fsck.k9.preferences.SettingsImporter; @@ -779,7 +778,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { * Also don't ask when the AuthType is EXTERNAL. */ boolean configureOutgoingServer = AuthType.EXTERNAL != outgoing.authenticationType - && !WebDavStore.STORE_TYPE.equals(outgoing.type) + && !(ServerSettings.Type.WebDAV == outgoing.type) && outgoing.username != null && !outgoing.username.isEmpty() && (outgoing.password == null || outgoing.password diff --git a/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java b/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java index fa14c469a..48f069c94 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java @@ -27,7 +27,6 @@ import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.EditText; import com.fsck.k9.Account; -import com.fsck.k9.Account.DeletePolicy; import com.fsck.k9.EmailAddressValidator; import com.fsck.k9.K9; import com.fsck.k9.Preferences; @@ -40,9 +39,7 @@ import com.fsck.k9.mail.AuthType; import com.fsck.k9.mail.ConnectionSecurity; import com.fsck.k9.mail.ServerSettings; import com.fsck.k9.mail.Transport; -import com.fsck.k9.mail.store.imap.ImapStore; import com.fsck.k9.mail.store.RemoteStore; -import com.fsck.k9.mail.transport.SmtpTransport; import com.fsck.k9.account.AccountCreator; import com.fsck.k9.view.ClientCertificateSpinner; import com.fsck.k9.view.ClientCertificateSpinner.OnClientCertificateChangedListener; @@ -410,9 +407,9 @@ public class AccountSetupBasics extends K9Activity // set default uris // NOTE: they will be changed again in AccountSetupAccountType! - ServerSettings storeServer = new ServerSettings(ImapStore.STORE_TYPE, "mail." + domain, -1, + ServerSettings storeServer = new ServerSettings(ServerSettings.Type.IMAP, "mail." + domain, -1, ConnectionSecurity.SSL_TLS_REQUIRED, authenticationType, user, password, clientCertificateAlias); - ServerSettings transportServer = new ServerSettings(SmtpTransport.TRANSPORT_TYPE, "mail." + domain, -1, + ServerSettings transportServer = new ServerSettings(ServerSettings.Type.SMTP, "mail." + domain, -1, ConnectionSecurity.SSL_TLS_REQUIRED, authenticationType, user, password, clientCertificateAlias); String storeUri = RemoteStore.createStoreUri(storeServer); String transportUri = Transport.createTransportUri(transportServer); diff --git a/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java b/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java index 6830c65ca..ec84f663d 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupIncoming.java @@ -24,15 +24,12 @@ import com.fsck.k9.helper.Utility; import com.fsck.k9.mail.AuthType; import com.fsck.k9.mail.ConnectionSecurity; import com.fsck.k9.mail.ServerSettings; +import com.fsck.k9.mail.ServerSettings.Type; import com.fsck.k9.mail.Store; import com.fsck.k9.mail.Transport; -import com.fsck.k9.mail.store.imap.ImapStore; -import com.fsck.k9.mail.store.pop3.Pop3Store; import com.fsck.k9.mail.store.RemoteStore; -import com.fsck.k9.mail.store.webdav.WebDavStore; import com.fsck.k9.mail.store.imap.ImapStore.ImapStoreSettings; import com.fsck.k9.mail.store.webdav.WebDavStore.WebDavStoreSettings; -import com.fsck.k9.mail.transport.SmtpTransport; import com.fsck.k9.account.AccountCreator; import com.fsck.k9.service.MailService; import com.fsck.k9.view.ClientCertificateSpinner; @@ -56,7 +53,7 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener private static final String WEBDAV_PORT = "80"; private static final String WEBDAV_SSL_PORT = "443"; - private ServerSettings.Type mStoreType; + private Type mStoreType; private EditText mUsernameView; private EditText mPasswordView; private ClientCertificateSpinner mClientCertificateSpinner; @@ -190,7 +187,7 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener } mStoreType = settings.type; - if (Pop3Store.STORE_TYPE.equals(settings.type)) { + if (Type.POP3 == settings.type) { serverLabelView.setText(R.string.account_setup_incoming_pop_server_label); mDefaultPort = POP3_PORT; mDefaultSslPort = POP3_SSL_PORT; @@ -202,7 +199,7 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener findViewById(R.id.compression_section).setVisibility(View.GONE); findViewById(R.id.compression_label).setVisibility(View.GONE); mSubscribedFoldersOnly.setVisibility(View.GONE); - } else if (ImapStore.STORE_TYPE.equals(settings.type)) { + } else if (Type.IMAP == settings.type) { serverLabelView.setText(R.string.account_setup_incoming_imap_server_label); mDefaultPort = IMAP_PORT; mDefaultSslPort = IMAP_SSL_PORT; @@ -222,7 +219,7 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener if (!Intent.ACTION_EDIT.equals(getIntent().getAction())) { findViewById(R.id.imap_folder_setup_section).setVisibility(View.GONE); } - } else if (WebDavStore.STORE_TYPE.equals(settings.type)) { + } else if (Type.WebDAV == settings.type) { serverLabelView.setText(R.string.account_setup_incoming_webdav_server_label); mDefaultPort = WEBDAV_PORT; mDefaultSslPort = WEBDAV_SSL_PORT; @@ -550,7 +547,7 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener } URI oldUri = new URI(mAccount.getTransportUri()); - ServerSettings transportServer = new ServerSettings(SmtpTransport.TRANSPORT_TYPE, oldUri.getHost(), oldUri.getPort(), + ServerSettings transportServer = new ServerSettings(Type.SMTP, oldUri.getHost(), oldUri.getPort(), ConnectionSecurity.SSL_TLS_REQUIRED, authType, username, password, clientCertificateAlias); String transportUri = Transport.createTransportUri(transportServer); mAccount.setTransportUri(transportUri); @@ -586,13 +583,13 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener int port = Integer.parseInt(mPortView.getText().toString()); Map extra = null; - if (ImapStore.STORE_TYPE.equals(mStoreType)) { + if (Type.IMAP == mStoreType) { extra = new HashMap(); extra.put(ImapStoreSettings.AUTODETECT_NAMESPACE_KEY, Boolean.toString(mImapAutoDetectNamespaceView.isChecked())); extra.put(ImapStoreSettings.PATH_PREFIX_KEY, mImapPathPrefixView.getText().toString()); - } else if (WebDavStore.STORE_TYPE.equals(mStoreType)) { + } else if (Type.WebDAV == mStoreType) { extra = new HashMap(); extra.put(WebDavStoreSettings.PATH_KEY, mWebdavPathPrefixView.getText().toString()); diff --git a/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java b/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java index 949d4f90a..6a511ee86 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupOutgoing.java @@ -20,10 +20,10 @@ import com.fsck.k9.activity.K9Activity; import com.fsck.k9.activity.setup.AccountSetupCheckSettings.CheckDirection; import com.fsck.k9.helper.Utility; import com.fsck.k9.mail.AuthType; +import com.fsck.k9.mail.ServerSettings.Type; import com.fsck.k9.mail.ConnectionSecurity; import com.fsck.k9.mail.ServerSettings; import com.fsck.k9.mail.Transport; -import com.fsck.k9.mail.transport.SmtpTransport; import com.fsck.k9.view.ClientCertificateSpinner; import com.fsck.k9.view.ClientCertificateSpinner.OnClientCertificateChangedListener; @@ -485,8 +485,7 @@ public class AccountSetupOutgoing extends K9Activity implements OnClickListener, String newHost = mServerView.getText().toString(); int newPort = Integer.parseInt(mPortView.getText().toString()); - ServerSettings.Type type = SmtpTransport.TRANSPORT_TYPE; - ServerSettings server = new ServerSettings(type, newHost, newPort, securityType, authType, username, password, clientCertificateAlias); + ServerSettings server = new ServerSettings(Type.SMTP, newHost, newPort, securityType, authType, username, password, clientCertificateAlias); uri = Transport.createTransportUri(server); mAccount.deleteCertificate(newHost, newPort, CheckDirection.OUTGOING); mAccount.setTransportUri(uri); diff --git a/k9mail/src/main/java/com/fsck/k9/preferences/SettingsImporter.java b/k9mail/src/main/java/com/fsck/k9/preferences/SettingsImporter.java index 065e559b3..8de46a85a 100644 --- a/k9mail/src/main/java/com/fsck/k9/preferences/SettingsImporter.java +++ b/k9mail/src/main/java/com/fsck/k9/preferences/SettingsImporter.java @@ -28,7 +28,6 @@ import com.fsck.k9.mail.ServerSettings; import com.fsck.k9.mail.Transport; import com.fsck.k9.mail.filter.Base64; import com.fsck.k9.mail.store.RemoteStore; -import com.fsck.k9.mail.store.webdav.WebDavStore; import com.fsck.k9.preferences.Settings.InvalidSettingValueException; public class SettingsImporter { @@ -384,7 +383,7 @@ public class SettingsImporter { boolean createAccountDisabled = AuthType.EXTERNAL != incoming.authenticationType && (incoming.password == null || incoming.password.isEmpty()); - if (account.outgoing == null && !WebDavStore.STORE_TYPE.name().equals(account.incoming.type)) { + if (account.outgoing == null && !ServerSettings.Type.WebDAV.name().equals(account.incoming.type)) { // All account types except WebDAV need to provide outgoing server settings throw new InvalidSettingValueException(); } @@ -403,7 +402,7 @@ public class SettingsImporter { * password required if the AuthType is EXTERNAL. */ boolean outgoingPasswordNeeded = AuthType.EXTERNAL != outgoing.authenticationType && - !WebDavStore.STORE_TYPE.equals(outgoing.type) && + !(ServerSettings.Type.WebDAV == outgoing.type) && outgoing.username != null && !outgoing.username.isEmpty() && (outgoing.password == null || outgoing.password.isEmpty()); diff --git a/tests-on-jvm/src/test/java/com/fsck/k9/mail/store/imap/ImapStoreUriTest.java b/tests-on-jvm/src/test/java/com/fsck/k9/mail/store/imap/ImapStoreUriTest.java index f3f58a430..38d9572e2 100644 --- a/tests-on-jvm/src/test/java/com/fsck/k9/mail/store/imap/ImapStoreUriTest.java +++ b/tests-on-jvm/src/test/java/com/fsck/k9/mail/store/imap/ImapStoreUriTest.java @@ -91,7 +91,7 @@ public class ImapStoreUriTest { extra.put("autoDetectNamespace", "false"); extra.put("pathPrefix", "customPathPrefix"); - ServerSettings settings = new ServerSettings(ImapStore.STORE_TYPE, "server", 143, + ServerSettings settings = new ServerSettings(ServerSettings.Type.IMAP, "server", 143, ConnectionSecurity.NONE, AuthType.PLAIN, "user", "pass", null, extra); String uri = RemoteStore.createStoreUri(settings); @@ -105,7 +105,7 @@ public class ImapStoreUriTest { extra.put("autoDetectNamespace", "false"); extra.put("pathPrefix", ""); - ServerSettings settings = new ServerSettings(ImapStore.STORE_TYPE, "server", 143, + ServerSettings settings = new ServerSettings(ServerSettings.Type.IMAP, "server", 143, ConnectionSecurity.NONE, AuthType.PLAIN, "user", "pass", null, extra); String uri = RemoteStore.createStoreUri(settings); @@ -115,7 +115,7 @@ public class ImapStoreUriTest { @Test public void testCreateStoreUriImapNoExtra() { - ServerSettings settings = new ServerSettings(ImapStore.STORE_TYPE, "server", 143, + ServerSettings settings = new ServerSettings(ServerSettings.Type.IMAP, "server", 143, ConnectionSecurity.NONE, AuthType.PLAIN, "user", "pass", null); String uri = RemoteStore.createStoreUri(settings); @@ -128,7 +128,7 @@ public class ImapStoreUriTest { Map extra = new HashMap(); extra.put("autoDetectNamespace", "true"); - ServerSettings settings = new ServerSettings(ImapStore.STORE_TYPE, "server", 143, + ServerSettings settings = new ServerSettings(ServerSettings.Type.IMAP, "server", 143, ConnectionSecurity.NONE, AuthType.PLAIN, "user", "pass", null, extra); String uri = RemoteStore.createStoreUri(settings); @@ -138,7 +138,7 @@ public class ImapStoreUriTest { @Test public void testCreateDecodeStoreUriWithSpecialCharactersInUsernameAndPassword() { - ServerSettings settings = new ServerSettings(ImapStore.STORE_TYPE, "server", 143, + ServerSettings settings = new ServerSettings(ServerSettings.Type.IMAP, "server", 143, ConnectionSecurity.NONE, AuthType.PLAIN, "user@doma:n", "p@ssw:rd%", null, null); String uri = RemoteStore.createStoreUri(settings);