Export/import everything

pull/172/head
M66B 5 years ago
parent ebce569035
commit 8933a3a370

@ -188,15 +188,18 @@ public class EntityAccount extends EntityOrder implements Serializable {
json.put("insecure", insecure);
json.put("port", port);
json.put("auth_type", auth_type);
json.put("provider", provider);
json.put("user", user);
json.put("password", password);
json.put("realm", realm);
json.put("fingerprint", fingerprint);
json.put("name", name);
json.put("color", color);
json.put("synchronize", synchronize);
json.put("ondemand", ondemand);
json.put("poll_exempted", poll_exempted);
json.put("primary", primary);
json.put("notify", notify);
json.put("browse", browse);
@ -211,6 +214,7 @@ public class EntityAccount extends EntityOrder implements Serializable {
json.put("poll_interval", poll_interval);
json.put("partial_fetch", partial_fetch);
json.put("ignore_size", ignore_size);
json.put("use_date", use_date);
// not prefix
// not created
// not tbd
@ -239,10 +243,14 @@ public class EntityAccount extends EntityOrder implements Serializable {
account.insecure = (json.has("insecure") && json.getBoolean("insecure"));
account.port = json.getInt("port");
account.auth_type = json.getInt("auth_type");
if (json.has("provider"))
account.provider = json.getString("provider");
account.user = json.getString("user");
account.password = json.getString("password");
if (json.has("realm"))
account.realm = json.getString("realm");
if (json.has("fingerprint"))
account.fingerprint = json.getString("fingerprint");
if (json.has("name") && !json.isNull("name"))
account.name = json.getString("name");
@ -252,6 +260,8 @@ public class EntityAccount extends EntityOrder implements Serializable {
account.synchronize = json.getBoolean("synchronize");
if (json.has("ondemand"))
account.ondemand = json.getBoolean("ondemand");
if (json.has("poll_exempted"))
account.poll_exempted = json.getBoolean("poll_exempted");
account.primary = json.getBoolean("primary");
if (json.has("notify"))
account.notify = json.getBoolean("notify");
@ -272,6 +282,7 @@ public class EntityAccount extends EntityOrder implements Serializable {
account.partial_fetch = json.optBoolean("partial_fetch", true);
account.ignore_size = json.optBoolean("ignore_size", false);
account.use_date = json.optBoolean("use_date", false);
return account;
}

@ -170,9 +170,11 @@ public class EntityIdentity {
json.put("insecure", insecure);
json.put("port", port);
json.put("auth_type", auth_type);
json.put("provider", provider);
json.put("user", user);
json.put("password", password);
json.put("realm", realm);
json.put("fingerprint", fingerprint);
json.put("use_ip", use_ip);
json.put("synchronize", synchronize);
@ -184,7 +186,7 @@ public class EntityIdentity {
json.put("bcc", bcc);
// not plain_only
json.put("encrypt", encrypt);
// not encrypt
// not store_sent
// not sent_folder
// not sign_key
@ -212,10 +214,14 @@ public class EntityIdentity {
identity.insecure = (json.has("insecure") && json.getBoolean("insecure"));
identity.port = json.getInt("port");
identity.auth_type = json.getInt("auth_type");
if (json.has("provider"))
identity.provider = json.getString("provider");
identity.user = json.getString("user");
identity.password = json.getString("password");
if (json.has("realm") && !json.isNull("realm"))
identity.realm = json.getString("realm");
if (json.has("fingerprint"))
identity.fingerprint = json.getString("fingerprint");
if (json.has("use_ip"))
identity.use_ip = json.getBoolean("use_ip");
@ -231,9 +237,6 @@ public class EntityIdentity {
if (json.has("bcc") && !json.isNull("bcc"))
identity.bcc = json.getString("bcc");
if (json.has("encrypt"))
identity.encrypt = json.getBoolean("encrypt");
return identity;
}

Loading…
Cancel
Save