|
@@ -17,6 +17,7 @@ import bubble.model.cloud.BubbleNetworkState; |
|
|
import bubble.model.cloud.BubbleNode; |
|
|
import bubble.model.cloud.BubbleNode; |
|
|
import bubble.model.device.DeviceSecurityLevel; |
|
|
import bubble.model.device.DeviceSecurityLevel; |
|
|
import bubble.server.listener.BubbleFirstTimeListener; |
|
|
import bubble.server.listener.BubbleFirstTimeListener; |
|
|
|
|
|
import bubble.service.backup.RestoreService; |
|
|
import bubble.service.boot.ActivationService; |
|
|
import bubble.service.boot.ActivationService; |
|
|
import bubble.service.boot.StandardSelfNodeService; |
|
|
import bubble.service.boot.StandardSelfNodeService; |
|
|
import bubble.service.notify.LocalNotificationStrategy; |
|
|
import bubble.service.notify.LocalNotificationStrategy; |
|
@@ -91,7 +92,7 @@ public class BubbleConfiguration extends PgRestServerConfiguration |
|
|
public static final String TAG_REQUIRE_SEND_METRICS = "requireSendMetrics"; |
|
|
public static final String TAG_REQUIRE_SEND_METRICS = "requireSendMetrics"; |
|
|
public static final String TAG_SUPPORT = "support"; |
|
|
public static final String TAG_SUPPORT = "support"; |
|
|
public static final String TAG_SECURITY_LEVELS = "securityLevels"; |
|
|
public static final String TAG_SECURITY_LEVELS = "securityLevels"; |
|
|
public static final String TAG_RESTORE_MODE = "isInRestoringStatus"; |
|
|
|
|
|
|
|
|
public static final String TAG_RESTORE_MODE = "isWaitingRestoring"; |
|
|
|
|
|
|
|
|
public static final String DEFAULT_LOCAL_STORAGE_DIR = HOME_DIR + "/.bubble_local_storage"; |
|
|
public static final String DEFAULT_LOCAL_STORAGE_DIR = HOME_DIR + "/.bubble_local_storage"; |
|
|
|
|
|
|
|
@@ -283,11 +284,12 @@ public class BubbleConfiguration extends PgRestServerConfiguration |
|
|
public Map<String, Object> getPublicSystemConfigs () { |
|
|
public Map<String, Object> getPublicSystemConfigs () { |
|
|
synchronized (publicSystemConfigs) { |
|
|
synchronized (publicSystemConfigs) { |
|
|
if (publicSystemConfigs.get() == null) { |
|
|
if (publicSystemConfigs.get() == null) { |
|
|
final BubbleNode thisNode = getThisNode(); |
|
|
|
|
|
final BubbleNetwork thisNetwork = getThisNetwork(); |
|
|
final BubbleNetwork thisNetwork = getThisNetwork(); |
|
|
final AccountDAO accountDAO = getBean(AccountDAO.class); |
|
|
final AccountDAO accountDAO = getBean(AccountDAO.class); |
|
|
final CloudServiceDAO cloudDAO = getBean(CloudServiceDAO.class); |
|
|
final CloudServiceDAO cloudDAO = getBean(CloudServiceDAO.class); |
|
|
final ActivationService activationService = getBean(ActivationService.class); |
|
|
final ActivationService activationService = getBean(ActivationService.class); |
|
|
|
|
|
final RestoreService restoreService = getBean(RestoreService.class); |
|
|
|
|
|
|
|
|
publicSystemConfigs.set(MapBuilder.build(new Object[][]{ |
|
|
publicSystemConfigs.set(MapBuilder.build(new Object[][]{ |
|
|
{TAG_ALLOW_REGISTRATION, thisNetwork == null ? null : thisNetwork.getBooleanTag(TAG_ALLOW_REGISTRATION, false)}, |
|
|
{TAG_ALLOW_REGISTRATION, thisNetwork == null ? null : thisNetwork.getBooleanTag(TAG_ALLOW_REGISTRATION, false)}, |
|
|
{TAG_NETWORK_UUID, thisNetwork == null ? null : thisNetwork.getUuid()}, |
|
|
{TAG_NETWORK_UUID, thisNetwork == null ? null : thisNetwork.getUuid()}, |
|
@@ -303,7 +305,8 @@ public class BubbleConfiguration extends PgRestServerConfiguration |
|
|
{TAG_LAUNCH_LOCK, isSageLauncher() || thisNetwork == null ? null : thisNetwork.launchLock()}, |
|
|
{TAG_LAUNCH_LOCK, isSageLauncher() || thisNetwork == null ? null : thisNetwork.launchLock()}, |
|
|
{TAG_RESTORE_MODE, thisNetwork == null |
|
|
{TAG_RESTORE_MODE, thisNetwork == null |
|
|
? false |
|
|
? false |
|
|
: thisNetwork.getState().equals(BubbleNetworkState.restoring)}, |
|
|
|
|
|
|
|
|
: thisNetwork.getState().equals(BubbleNetworkState.restoring) |
|
|
|
|
|
&& !restoreService.getRestoreKeys().exists(thisNetwork.getUuid())}, |
|
|
{TAG_SSL_PORT, getDefaultSslPort()}, |
|
|
{TAG_SSL_PORT, getDefaultSslPort()}, |
|
|
{TAG_SUPPORT, getSupport()}, |
|
|
{TAG_SUPPORT, getSupport()}, |
|
|
{TAG_SECURITY_LEVELS, DeviceSecurityLevel.values()} |
|
|
{TAG_SECURITY_LEVELS, DeviceSecurityLevel.values()} |
|
|