Unverified Commit 8526c903 authored by Jeffrey Schiller's avatar Jeffrey Schiller Committed by GitHub

Remove a vestigial property from CloudDB (#1171)

We no longer use the “AccountName” property and it has been removed from
CloudDB.java. However a reference remained in MockCloudDB which causes a
problem when a project with a CloudDB component is upgraded due to an
increment in YOUNG_ANDROID_VERSION.

Change-Id: I8a6234993df32ff087fbcbd79edf447c3e39c9c5
parent ae3f80a1
...@@ -28,7 +28,6 @@ public class MockCloudDB extends MockNonVisibleComponent { ...@@ -28,7 +28,6 @@ public class MockCloudDB extends MockNonVisibleComponent {
public static final String TYPE = "CloudDB"; public static final String TYPE = "CloudDB";
private static final String PROPERTY_NAME_PROJECT_ID = "ProjectID"; private static final String PROPERTY_NAME_PROJECT_ID = "ProjectID";
private static final String PROPERTY_NAME_ACCOUNT_NAME = "AccountName";
private static final String PROPERTY_NAME_TOKEN = "Token"; private static final String PROPERTY_NAME_TOKEN = "Token";
private static final String PROPERTY_NAME_REDIS_SERVER = "RedisServer"; private static final String PROPERTY_NAME_REDIS_SERVER = "RedisServer";
private static final String PROPERTY_NAME_DEFAULT_REDISSERVER = "DefaultRedisServer"; private static final String PROPERTY_NAME_DEFAULT_REDISSERVER = "DefaultRedisServer";
...@@ -48,14 +47,13 @@ public class MockCloudDB extends MockNonVisibleComponent { ...@@ -48,14 +47,13 @@ public class MockCloudDB extends MockNonVisibleComponent {
} }
/** /**
* Initializes the "ProjectID", "AccountName" properties dynamically. * Initializes the "ProjectID" property dynamically.
* *
* @param widget the iconImage for the MockCloudDB * @param widget the iconImage for the MockCloudDB
*/ */
@Override @Override
public final void initComponent(Widget widget) { public final void initComponent(Widget widget) {
super.initComponent(widget); super.initComponent(widget);
String accName = Ode.getInstance().getUser().getUserEmail() + "";
DesignToolbar.DesignProject currentProject = Ode.getInstance().getDesignToolbar().getCurrentProject(); DesignToolbar.DesignProject currentProject = Ode.getInstance().getDesignToolbar().getCurrentProject();
String projectID = ""; String projectID = "";
if (currentProject != null) { if (currentProject != null) {
...@@ -63,7 +61,6 @@ public class MockCloudDB extends MockNonVisibleComponent { ...@@ -63,7 +61,6 @@ public class MockCloudDB extends MockNonVisibleComponent {
} }
changeProperty(PROPERTY_NAME_PROJECT_ID, projectID); changeProperty(PROPERTY_NAME_PROJECT_ID, projectID);
changeProperty(PROPERTY_NAME_ACCOUNT_NAME, accName);
String defaultRedisServer = Ode.getInstance().getSystemConfig().getDefaultCloudDBserver(); String defaultRedisServer = Ode.getInstance().getSystemConfig().getDefaultCloudDBserver();
changeProperty(PROPERTY_NAME_DEFAULT_REDISSERVER, defaultRedisServer); changeProperty(PROPERTY_NAME_DEFAULT_REDISSERVER, defaultRedisServer);
getTokenFromServer(); // Get Token from the server getTokenFromServer(); // Get Token from the server
...@@ -71,8 +68,7 @@ public class MockCloudDB extends MockNonVisibleComponent { ...@@ -71,8 +68,7 @@ public class MockCloudDB extends MockNonVisibleComponent {
@Override @Override
public boolean isPropertyforYail(String propertyName) { public boolean isPropertyforYail(String propertyName) {
if (propertyName.equals(PROPERTY_NAME_ACCOUNT_NAME) || if ((propertyName.equals(PROPERTY_NAME_PROJECT_ID)) ||
(propertyName.equals(PROPERTY_NAME_PROJECT_ID)) ||
(propertyName.equals(PROPERTY_NAME_DEFAULT_REDISSERVER)) || (propertyName.equals(PROPERTY_NAME_DEFAULT_REDISSERVER)) ||
(propertyName.equals(PROPERTY_NAME_TOKEN))) { (propertyName.equals(PROPERTY_NAME_TOKEN))) {
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment