diff --git a/designer-base/src/com/fr/design/actions/community/BBSAction.java b/designer-base/src/com/fr/design/actions/community/BBSAction.java index 01cdcee959..f9c6923af9 100644 --- a/designer-base/src/com/fr/design/actions/community/BBSAction.java +++ b/designer-base/src/com/fr/design/actions/community/BBSAction.java @@ -5,7 +5,7 @@ import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; import com.fr.general.Inter; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; @@ -36,7 +36,7 @@ public class BBSAction extends UpdateAction @Override public void actionPerformed(ActionEvent arg0) { - String url = SiteCenter.getInstance().acquireUrlByKind("bbs"); + String url = CloudCenter.getInstance().acquireUrlByKind("bbs"); if (StringUtils.isEmpty(url)) { FRContext.getLogger().info("The URL is empty!"); return; diff --git a/designer-base/src/com/fr/design/actions/community/BugAction.java b/designer-base/src/com/fr/design/actions/community/BugAction.java index 5d5e6893c4..7f6548ca4a 100644 --- a/designer-base/src/com/fr/design/actions/community/BugAction.java +++ b/designer-base/src/com/fr/design/actions/community/BugAction.java @@ -4,8 +4,8 @@ import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; +import com.fr.general.CloudCenter; import com.fr.general.Inter; -import com.fr.general.SiteCenter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; @@ -30,7 +30,7 @@ public class BugAction extends UpdateAction @Override public void actionPerformed(ActionEvent arg0) { - String url = SiteCenter.getInstance().acquireUrlByKind("bbs.bugs"); + String url = CloudCenter.getInstance().acquireUrlByKind("bbs.bugs"); if (StringUtils.isEmpty(url)) { FRContext.getLogger().info("The URL is empty!"); return; diff --git a/designer-base/src/com/fr/design/actions/community/NeedAction.java b/designer-base/src/com/fr/design/actions/community/NeedAction.java index b353dcaa82..68ff2fde00 100644 --- a/designer-base/src/com/fr/design/actions/community/NeedAction.java +++ b/designer-base/src/com/fr/design/actions/community/NeedAction.java @@ -4,8 +4,8 @@ import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; +import com.fr.general.CloudCenter; import com.fr.general.Inter; -import com.fr.general.SiteCenter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; @@ -31,7 +31,7 @@ public class NeedAction extends UpdateAction @Override public void actionPerformed(ActionEvent arg0) { - String url = SiteCenter.getInstance().acquireUrlByKind("bbs.needs"); + String url = CloudCenter.getInstance().acquireUrlByKind("bbs.needs"); if (StringUtils.isEmpty(url)) { FRContext.getLogger().info("The URL is empty!"); return; diff --git a/designer-base/src/com/fr/design/actions/community/QuestionAction.java b/designer-base/src/com/fr/design/actions/community/QuestionAction.java index 6cf5f479ce..d94a6e07c2 100644 --- a/designer-base/src/com/fr/design/actions/community/QuestionAction.java +++ b/designer-base/src/com/fr/design/actions/community/QuestionAction.java @@ -4,8 +4,8 @@ import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; +import com.fr.general.CloudCenter; import com.fr.general.Inter; -import com.fr.general.SiteCenter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; @@ -30,7 +30,7 @@ public class QuestionAction extends UpdateAction @Override public void actionPerformed(ActionEvent arg0) { - String url = SiteCenter.getInstance().acquireUrlByKind("bbs.questions"); + String url = CloudCenter.getInstance().acquireUrlByKind("bbs.questions"); if (StringUtils.isEmpty(url)) { FRContext.getLogger().info("The URL is empty!"); return; diff --git a/designer-base/src/com/fr/design/actions/community/SignAction.java b/designer-base/src/com/fr/design/actions/community/SignAction.java index 839d2b9d78..eaa1b2ef66 100644 --- a/designer-base/src/com/fr/design/actions/community/SignAction.java +++ b/designer-base/src/com/fr/design/actions/community/SignAction.java @@ -5,7 +5,7 @@ import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; import com.fr.general.Inter; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; @@ -31,7 +31,7 @@ public class SignAction extends UpdateAction @Override public void actionPerformed(ActionEvent arg0) { - String url = SiteCenter.getInstance().acquireUrlByKind("bbs.aut"); + String url = CloudCenter.getInstance().acquireUrlByKind("bbs.aut"); if (StringUtils.isEmpty(url)) { FRContext.getLogger().info("The URL is empty!"); return; diff --git a/designer-base/src/com/fr/design/actions/community/UpAction.java b/designer-base/src/com/fr/design/actions/community/UpAction.java index acbe2522b1..83041d888b 100644 --- a/designer-base/src/com/fr/design/actions/community/UpAction.java +++ b/designer-base/src/com/fr/design/actions/community/UpAction.java @@ -5,7 +5,7 @@ import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; import com.fr.general.Inter; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; @@ -31,7 +31,7 @@ public class UpAction extends UpdateAction @Override public void actionPerformed(ActionEvent arg0) { - String url = SiteCenter.getInstance().acquireUrlByKind("bbs.update"); + String url = CloudCenter.getInstance().acquireUrlByKind("bbs.update"); if (StringUtils.isEmpty(url)) { FRContext.getLogger().info("The URL is empty!"); return; diff --git a/designer-base/src/com/fr/design/actions/community/VideoAction.java b/designer-base/src/com/fr/design/actions/community/VideoAction.java index cedbe6273a..4040c514f0 100644 --- a/designer-base/src/com/fr/design/actions/community/VideoAction.java +++ b/designer-base/src/com/fr/design/actions/community/VideoAction.java @@ -5,7 +5,7 @@ import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; import com.fr.general.Inter; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; @@ -34,9 +34,9 @@ public class VideoAction extends UpdateAction { String url; if (FRContext.getLocale().equals(Locale.US)) { - url = SiteCenter.getInstance().acquireUrlByKind("bbs.video.en"); + url = CloudCenter.getInstance().acquireUrlByKind("bbs.video.en"); } else { - url = SiteCenter.getInstance().acquireUrlByKind("bbs.video"); + url = CloudCenter.getInstance().acquireUrlByKind("bbs.video"); } if (StringUtils.isEmpty(url)) { FRContext.getLogger().info("The URL is empty!"); diff --git a/designer-base/src/com/fr/design/actions/help/AboutPane.java b/designer-base/src/com/fr/design/actions/help/AboutPane.java index 14bcf98b28..40ee0902e8 100644 --- a/designer-base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer-base/src/com/fr/design/actions/help/AboutPane.java @@ -9,9 +9,9 @@ import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.CloudCenter; import com.fr.general.GeneralUtils; import com.fr.general.Inter; -import com.fr.general.SiteCenter; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.stable.bridge.StableFactory; @@ -33,7 +33,7 @@ public class AboutPane extends JPanel { private static final int DEFAULT_GAP = 12; private static final String COPYRIGHT_LABEL = "\u00A9 "; private static final String BUILD_PREFIX = " "; - private static final String COMPANY_TELEPHONE = SiteCenter.getInstance().acquireUrlByKind("company_telephone"); + private static final String COMPANY_TELEPHONE = CloudCenter.getInstance().acquireUrlByKind("company_telephone"); public AboutPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -71,11 +71,11 @@ public class AboutPane extends JPanel { addPhoneAndQQPane(contentPane); // 官网 - JPanel urlActionPane = getURLActionPane(Inter.getLocText("FR-Designer_Official_Website"), SiteCenter.getInstance().acquireUrlByKind("website." + FRContext.getLocale(), ProductConstants.WEBSITE_URL)); + JPanel urlActionPane = getURLActionPane(Inter.getLocText("FR-Designer_Official_Website"), CloudCenter.getInstance().acquireUrlByKind("website." + FRContext.getLocale(), ProductConstants.WEBSITE_URL)); // 支持邮箱 - String defaultEmail = SiteCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL); - JPanel emailPane = getEmailActionPane(Inter.getLocText("FR-Designer_Support_Email"),SiteCenter.getInstance().acquireUrlByKind("support.email." + FRContext.getLocale(), defaultEmail)); + String defaultEmail = CloudCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL); + JPanel emailPane = getEmailActionPane(Inter.getLocText("FR-Designer_Support_Email"), CloudCenter.getInstance().acquireUrlByKind("support.email." + FRContext.getLocale(), defaultEmail)); contentPane.add(urlActionPane); contentPane.add(emailPane); @@ -90,13 +90,13 @@ public class AboutPane extends JPanel { if (FRContext.getLocale().equals(Locale.US)) { return; } - boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + SiteCenter.getInstance().acquireUrlByKind("service.phone." + FRContext.getLocale(), COMPANY_TELEPHONE)); + boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + CloudCenter.getInstance().acquireUrlByKind("service.phone." + FRContext.getLocale(), COMPANY_TELEPHONE)); contentPane.add(boxCenterAlignmentPane); // 繁体版不显示QQ if (FRContext.getLocale().equals(Locale.TAIWAN)) { return; } - boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ: " + SiteCenter.getInstance().acquireUrlByKind("help.qq")); + boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ: " + CloudCenter.getInstance().acquireUrlByKind("help.qq")); contentPane.add(boxCenterAlignmentPane); } @@ -133,7 +133,7 @@ public class AboutPane extends JPanel { private String getCopyRight() { return append(Inter.getLocText("FR-Designer_About_CopyRight"), COPYRIGHT_LABEL, - ProductConstants.HISTORY, StringUtils.BLANK, SiteCenter.getInstance().acquireUrlByKind("company.name", ProductConstants.COMPANY_NAME)); + ProductConstants.HISTORY, StringUtils.BLANK, CloudCenter.getInstance().acquireUrlByKind("company.name", ProductConstants.COMPANY_NAME)); } private String getBuildTitle() { diff --git a/designer-base/src/com/fr/design/actions/help/ForumAction.java b/designer-base/src/com/fr/design/actions/help/ForumAction.java index 292ad13f3b..c0684cb9cf 100644 --- a/designer-base/src/com/fr/design/actions/help/ForumAction.java +++ b/designer-base/src/com/fr/design/actions/help/ForumAction.java @@ -9,7 +9,7 @@ import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; import com.fr.general.Inter; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; @@ -40,7 +40,7 @@ public class ForumAction extends UpdateAction { * @param e 事件 */ public void actionPerformed(ActionEvent e) { - String url = SiteCenter.getInstance().acquireUrlByKind("bbs"); + String url = CloudCenter.getInstance().acquireUrlByKind("bbs"); if (StringUtils.isEmpty(url)) { FRContext.getLogger().info("The URL is empty!"); return; diff --git a/designer-base/src/com/fr/design/actions/help/TutorialAction.java b/designer-base/src/com/fr/design/actions/help/TutorialAction.java index 35233430b1..f51ce77cb5 100644 --- a/designer-base/src/com/fr/design/actions/help/TutorialAction.java +++ b/designer-base/src/com/fr/design/actions/help/TutorialAction.java @@ -6,7 +6,6 @@ import java.awt.event.KeyEvent; import java.io.File; import java.io.IOException; import java.net.URI; -import java.util.Locale; import javax.swing.KeyStroke; @@ -15,12 +14,10 @@ import com.fr.base.FRContext; import com.fr.base.Utils; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; -import com.fr.general.ComparatorUtils; +import com.fr.general.CloudCenter; import com.fr.general.Inter; -import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.stable.OperatingSystem; -import com.fr.stable.ProductConstants; import com.fr.stable.StableUtils; public class TutorialAction extends UpdateAction { @@ -59,7 +56,7 @@ public class TutorialAction extends UpdateAction { * @param evt 事件 */ public void actionPerformed(ActionEvent evt) { - String helpURL = SiteCenter.getInstance().acquireUrlByKind("help." + FRContext.getLocale()); + String helpURL = CloudCenter.getInstance().acquireUrlByKind("help." + FRContext.getLocale()); if (helpURL != null) { HttpClient client = new HttpClient(helpURL); diff --git a/designer-base/src/com/fr/design/extra/LoginWebBridge.java b/designer-base/src/com/fr/design/extra/LoginWebBridge.java index 30f90d13c1..b22c5905a4 100644 --- a/designer-base/src/com/fr/design/extra/LoginWebBridge.java +++ b/designer-base/src/com/fr/design/extra/LoginWebBridge.java @@ -8,8 +8,8 @@ import com.fr.design.extra.exe.PluginLoginExecutor; import com.fr.design.extra.ucenter.Client; import com.fr.design.extra.ucenter.XMLHelper; import com.fr.design.gui.ilable.UILabel; +import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; -import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONObject; import com.fr.stable.EncodeConstants; @@ -134,7 +134,7 @@ public class LoginWebBridge { * @return */ private boolean testConnection() { - HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.test")); + HttpClient client = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("bbs.test")); return client.isServerAlive(); } @@ -159,7 +159,7 @@ public class LoginWebBridge { */ public void registerHref() { try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("bbs.register"))); + Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("bbs.register"))); } catch (Exception e) { FRContext.getLogger().info(e.getMessage()); } @@ -170,7 +170,7 @@ public class LoginWebBridge { */ public void forgetHref() { try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("bbs.reset"))); + Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("bbs.reset"))); } catch (Exception e) { FRContext.getLogger().info(e.getMessage()); } @@ -300,7 +300,7 @@ public class LoginWebBridge { //账号没有QQ授权 closeQQWindow(); try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("QQ_binding"))); + Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("QQ_binding"))); } catch (Exception ignored) { // ignored } diff --git a/designer-base/src/com/fr/design/extra/PluginOperateUtils.java b/designer-base/src/com/fr/design/extra/PluginOperateUtils.java index d68d0cd861..6752526d92 100644 --- a/designer-base/src/com/fr/design/extra/PluginOperateUtils.java +++ b/designer-base/src/com/fr/design/extra/PluginOperateUtils.java @@ -11,7 +11,7 @@ import com.fr.design.extra.exe.callback.UpdateFromDiskCallback; import com.fr.design.extra.exe.callback.UpdateOnlineCallback; import com.fr.design.gui.ilable.UILabel; import com.fr.general.Inter; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONObject; @@ -108,7 +108,7 @@ public class PluginOperateUtils { } public static String getRecommendPlugins() { - String plistUrl = SiteCenter.getInstance().acquireUrlByKind("shop.plugin.feature"); + String plistUrl = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.feature"); JSONArray resultArray = JSONArray.create(); try { HttpClient httpClient = new HttpClient(plistUrl); diff --git a/designer-base/src/com/fr/design/extra/PluginUtils.java b/designer-base/src/com/fr/design/extra/PluginUtils.java index 781a7167a5..124ef323fb 100644 --- a/designer-base/src/com/fr/design/extra/PluginUtils.java +++ b/designer-base/src/com/fr/design/extra/PluginUtils.java @@ -1,8 +1,8 @@ package com.fr.design.extra; import com.fr.base.TemplateUtils; +import com.fr.general.CloudCenter; import com.fr.general.Inter; -import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONObject; @@ -46,7 +46,7 @@ public class PluginUtils { public static JSONObject getLatestPluginInfo(String pluginID) throws Exception { String result = ""; - String plistUrl = SiteCenter.getInstance().acquireUrlByKind("plugin.searchAPI"); + String plistUrl = CloudCenter.getInstance().acquireUrlByKind("plugin.searchAPI"); if (StringUtils.isNotEmpty(plistUrl)) { StringBuilder url = new StringBuilder(plistUrl); if (StringUtils.isNotBlank(pluginID)) { @@ -109,7 +109,7 @@ public class PluginUtils { private static String getDownloadPath(String id) throws Exception { HashMap map = new HashMap(); map.put("id", id); - HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("shop.plugin.scripts_10")); + HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.plugin.scripts_10")); httpClient.asGet(); String resText = httpClient.getResponseText(); JSONObject resultJSONObject = new JSONObject(resText); diff --git a/designer-base/src/com/fr/design/extra/PluginWebBridge.java b/designer-base/src/com/fr/design/extra/PluginWebBridge.java index d922ae37fb..767a3ea2cf 100644 --- a/designer-base/src/com/fr/design/extra/PluginWebBridge.java +++ b/designer-base/src/com/fr/design/extra/PluginWebBridge.java @@ -15,7 +15,7 @@ import com.fr.design.extra.exe.callback.JSCallback; import com.fr.design.gui.ilable.UILabel; import com.fr.design.utils.concurrent.ThreadFactoryBuilder; import com.fr.general.Inter; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.json.JSONException; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; @@ -437,7 +437,7 @@ public class PluginWebBridge { */ public void getPriviteMessage() { try { - String loginUrl = SiteCenter.getInstance().acquireUrlByKind("bbs.default"); + String loginUrl = CloudCenter.getInstance().acquireUrlByKind("bbs.default"); Desktop.getDesktop().browse(new URI(loginUrl)); } catch (Exception exp) { FineLoggerFactory.getLogger().info(exp.getMessage()); @@ -500,7 +500,7 @@ public class PluginWebBridge { */ public void registerHref() { try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("bbs.register"))); + Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("bbs.register"))); } catch (Exception e) { FineLoggerFactory.getLogger().info(e.getMessage()); } @@ -514,7 +514,7 @@ public class PluginWebBridge { */ public void forgetHref() { try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("bbs.reset"))); + Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("bbs.reset"))); } catch (Exception e) { FineLoggerFactory.getLogger().info(e.getMessage()); } diff --git a/designer-base/src/com/fr/design/extra/PluginsReaderFromStore.java b/designer-base/src/com/fr/design/extra/PluginsReaderFromStore.java index add9497967..06a2706d51 100644 --- a/designer-base/src/com/fr/design/extra/PluginsReaderFromStore.java +++ b/designer-base/src/com/fr/design/extra/PluginsReaderFromStore.java @@ -1,8 +1,8 @@ package com.fr.design.extra; +import com.fr.general.CloudCenter; import com.fr.general.GeneralUtils; import com.fr.general.Inter; -import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONException; @@ -32,7 +32,7 @@ public class PluginsReaderFromStore { public static List readPlugins() throws Exception { String resText; try { - HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("plugin.store")); + HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("plugin.store")); resText = httpClient.getResponseText(); String charSet = EncodeConstants.ENCODING_UTF_8; resText = URLDecoder.decode(URLDecoder.decode(resText, charSet), charSet); @@ -49,7 +49,7 @@ public class PluginsReaderFromStore { */ public static List readPluginsForUpdate() throws Exception { String resText = null; - String url = SiteCenter.getInstance().acquireUrlByKind("plugin.update"); + String url = CloudCenter.getInstance().acquireUrlByKind("plugin.update"); if (StringUtils.isNotEmpty(url)) { HashMap para = new HashMap(); para.put("plugins", PluginUtils.transPluginsToString(PluginManager.getContexts())); diff --git a/designer-base/src/com/fr/design/extra/QQLoginWebPane.java b/designer-base/src/com/fr/design/extra/QQLoginWebPane.java index f742196914..1d6b7c7a31 100644 --- a/designer-base/src/com/fr/design/extra/QQLoginWebPane.java +++ b/designer-base/src/com/fr/design/extra/QQLoginWebPane.java @@ -102,7 +102,7 @@ public class QQLoginWebPane extends JFXPanel { public void changed(ObservableValue observable, final String oldValue, String newValue) { disableLink(webEngine); // webView好像默认以手机版显示网页,浏览器里过滤掉这个跳转 - if (ComparatorUtils.equals(newValue, url) || ComparatorUtils.equals(newValue, SiteCenter.getInstance().acquireUrlByKind("bbs.mobile"))) { + if (ComparatorUtils.equals(newValue, url) || ComparatorUtils.equals(newValue, CloudCenter.getInstance().acquireUrlByKind("bbs.mobile"))) { return; } LoginWebBridge.getHelper().openUrlAtLocalWebBrowser(webEngine, newValue); diff --git a/designer-base/src/com/fr/design/extra/WebViewDlgHelper.java b/designer-base/src/com/fr/design/extra/WebViewDlgHelper.java index f273b6d90a..18afa06bbc 100644 --- a/designer-base/src/com/fr/design/extra/WebViewDlgHelper.java +++ b/designer-base/src/com/fr/design/extra/WebViewDlgHelper.java @@ -10,7 +10,7 @@ import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; @@ -296,7 +296,7 @@ public class WebViewDlgHelper { new SwingWorker() { @Override protected Void doInBackground() throws Exception { - HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("shop.plugin.cv_10") + "&version=" + PluginStoreConstants.getInstance().getProps("VERSION")); + HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.plugin.cv_10") + "&version=" + PluginStoreConstants.getInstance().getProps("VERSION")); httpClient.asGet(); if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { String text = httpClient.getResponseText(); diff --git a/designer-base/src/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java b/designer-base/src/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java index f517d0b65a..0a3b76211d 100644 --- a/designer-base/src/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java +++ b/designer-base/src/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java @@ -2,7 +2,7 @@ package com.fr.design.extra.exe; import com.fr.design.extra.PluginConstants; import com.fr.design.extra.Process; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; /** @@ -27,7 +27,7 @@ public class GetPluginCategoriesExecutor implements Executor { @Override public void run(Process process) { - String url = SiteCenter.getInstance().acquireUrlByKind("shop.plugin.category"); + String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.category"); if (url != null) { HttpClient httpClient = new HttpClient(url); result = httpClient.getResponseText(); diff --git a/designer-base/src/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java b/designer-base/src/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java index c5a159a10f..884b115da0 100644 --- a/designer-base/src/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java +++ b/designer-base/src/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java @@ -4,7 +4,7 @@ import com.fr.design.extra.PluginConstants; import com.fr.design.extra.PluginOperateUtils; import com.fr.design.extra.PluginUtils; import com.fr.design.extra.Process; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONObject; @@ -52,7 +52,7 @@ public class GetPluginFromStoreExecutor implements Executor { @Override public void run(Process process) { - String plistUrl = SiteCenter.getInstance().acquireUrlByKind("shop.plugin.plist") + "?"; + String plistUrl = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.plist") + "?"; boolean getRecommend = StringUtils.isEmpty(category) && StringUtils.isEmpty(seller) && StringUtils.isEmpty(fee) && StringUtils.isEmpty(scope); if (getRecommend) { result = PluginOperateUtils.getRecommendPlugins(); diff --git a/designer-base/src/com/fr/design/extra/exe/GetPluginPrefixExecutor.java b/designer-base/src/com/fr/design/extra/exe/GetPluginPrefixExecutor.java index 31b4e2d3f4..7a7de6b12c 100644 --- a/designer-base/src/com/fr/design/extra/exe/GetPluginPrefixExecutor.java +++ b/designer-base/src/com/fr/design/extra/exe/GetPluginPrefixExecutor.java @@ -1,7 +1,7 @@ package com.fr.design.extra.exe; import com.fr.design.extra.Process; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.stable.StringUtils; /** @@ -26,7 +26,7 @@ public class GetPluginPrefixExecutor implements Executor { @Override public void run(Process process) { - result = SiteCenter.getInstance().acquireUrlByKind("plugin.url.prefix"); + result = CloudCenter.getInstance().acquireUrlByKind("plugin.url.prefix"); } } }; diff --git a/designer-base/src/com/fr/design/extra/exe/SearchOnlineExecutor.java b/designer-base/src/com/fr/design/extra/exe/SearchOnlineExecutor.java index 456b77dd15..a35d10588e 100644 --- a/designer-base/src/com/fr/design/extra/exe/SearchOnlineExecutor.java +++ b/designer-base/src/com/fr/design/extra/exe/SearchOnlineExecutor.java @@ -3,7 +3,7 @@ package com.fr.design.extra.exe; import com.fr.design.extra.PluginOperateUtils; import com.fr.design.extra.PluginUtils; import com.fr.design.extra.Process; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONObject; @@ -42,7 +42,7 @@ public class SearchOnlineExecutor implements Executor { result = PluginOperateUtils.getRecommendPlugins(); return; } - HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("shop.plugin.store") + "&keyword=" + keyword); + HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.plugin.store") + "&keyword=" + keyword); httpClient.asGet(); String responseText = httpClient.getResponseText(); JSONObject jsonObject = new JSONObject(responseText); diff --git a/designer-base/src/com/fr/design/extra/ucenter/Client.java b/designer-base/src/com/fr/design/extra/ucenter/Client.java index cceba006d2..903286476e 100644 --- a/designer-base/src/com/fr/design/extra/ucenter/Client.java +++ b/designer-base/src/com/fr/design/extra/ucenter/Client.java @@ -1,7 +1,7 @@ package com.fr.design.extra.ucenter; import com.fr.base.FRContext; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import java.io.BufferedReader; import java.io.IOException; @@ -92,8 +92,8 @@ public class Client extends AbstractClient { sep = "&"; } String postData = ucApiRequestdata(module, action, str.toString(), ""); - UC_API = SiteCenter.getInstance().acquireUrlByKind("bbs.ucapi"); - UC_IP = SiteCenter.getInstance().acquireUrlByKind("bbs.ip"); + UC_API = CloudCenter.getInstance().acquireUrlByKind("bbs.ucapi"); + UC_IP = CloudCenter.getInstance().acquireUrlByKind("bbs.ip"); return ucFopen2(UC_API + "/index.php", 500000, postData, "", true, UC_IP, 20, true); } diff --git a/designer-base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java b/designer-base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java index be286226cb..7eb5e7bfd3 100644 --- a/designer-base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java +++ b/designer-base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java @@ -10,7 +10,7 @@ import com.fr.design.mainframe.SiteCenterToken; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralUtils; import com.fr.general.IOUtils; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; @@ -305,8 +305,8 @@ public class TemplateInfoCollector implements Serializable, */ public void sendTemplateInfo() { addDayCount(); - String consumingUrl = SiteCenter.getInstance().acquireUrlByKind("tempinfo.consuming") + "/single"; - String processUrl = SiteCenter.getInstance().acquireUrlByKind("tempinfo.process") + "/single"; + String consumingUrl = CloudCenter.getInstance().acquireUrlByKind("tempinfo.consuming") + "/single"; + String processUrl = CloudCenter.getInstance().acquireUrlByKind("tempinfo.process") + "/single"; ArrayList> completeTemplatesInfo = getCompleteTemplatesInfo(); for (HashMap templateInfo : completeTemplatesInfo) { String jsonConsumingMap = templateInfo.get(JSON_CONSUMING_MAP); diff --git a/designer-chart/src/com/fr/van/chart/DownloadOnlineSourcesHelper.java b/designer-chart/src/com/fr/van/chart/DownloadOnlineSourcesHelper.java index d90fb4d4bd..f7caf5d2cf 100644 --- a/designer-chart/src/com/fr/van/chart/DownloadOnlineSourcesHelper.java +++ b/designer-chart/src/com/fr/van/chart/DownloadOnlineSourcesHelper.java @@ -7,7 +7,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.IOUtils; import com.fr.general.Inter; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; import com.fr.plugin.chart.DownloadSourcesEvent; import com.fr.stable.StableUtils; @@ -68,7 +68,7 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent { //本地有这个资源,不下载 return; } - httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(siteKind)); + httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind(siteKind)); if (httpClient.getResponseCode() != HttpURLConnection.HTTP_OK) { //服务器连不上,不下载 return; @@ -116,7 +116,7 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent { for (int i = 0; i < list.size(); i++) { SiteInfo siteInfo = list.get(i); - httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(siteInfo.siteKind)); + httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind(siteInfo.siteKind)); if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { InputStream reader = httpClient.getResponseStream(); String temp = StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE); diff --git a/designer-form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer-form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 1285b7115c..f94fe16649 100644 --- a/designer-form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer-form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -11,7 +11,7 @@ import com.fr.form.share.ShareLoader; import com.fr.form.ui.SharableWidgetBindInfo; import com.fr.log.FineLoggerFactory; import com.fr.general.Inter; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.share.ShareConstants; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; @@ -298,7 +298,7 @@ public class FormWidgetDetailPane extends FormDockView{ downloadButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - String url = SiteCenter.getInstance().acquireUrlByKind("reuse.url"); + String url = CloudCenter.getInstance().acquireUrlByKind("reuse.url"); if (StringUtils.isEmpty(url)) { FRContext.getLogger().info("The URL is empty!"); return; diff --git a/designer-realize/src/com/fr/design/mainframe/ActiveKeyGenerator.java b/designer-realize/src/com/fr/design/mainframe/ActiveKeyGenerator.java index 959c32b9bc..8b6c3ce4ce 100644 --- a/designer-realize/src/com/fr/design/mainframe/ActiveKeyGenerator.java +++ b/designer-realize/src/com/fr/design/mainframe/ActiveKeyGenerator.java @@ -1,7 +1,7 @@ package com.fr.design.mainframe; import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; @@ -102,7 +102,7 @@ public class ActiveKeyGenerator { para.put("uuid", envManager.getUUID()); para.put("key", key); para.put("username", MarketConfig.getInstance().getBbsUsername()); - HttpClient hc = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("verify.code"), para); + HttpClient hc = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("verify.code"), para); if (timeout != -1) { hc.setTimeout(timeout); } diff --git a/designer-realize/src/com/fr/design/mainframe/InformationCollector.java b/designer-realize/src/com/fr/design/mainframe/InformationCollector.java index 8da7fe0128..6250179db2 100644 --- a/designer-realize/src/com/fr/design/mainframe/InformationCollector.java +++ b/designer-realize/src/com/fr/design/mainframe/InformationCollector.java @@ -13,12 +13,12 @@ import com.fr.data.core.db.dml.Table; import com.fr.design.DesignerEnvManager; import com.fr.design.mainframe.errorinfo.ErrorInfoUploader; import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; +import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; import com.fr.general.DateUtils; import com.fr.general.DesUtils; import com.fr.general.GeneralUtils; import com.fr.general.IOUtils; -import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONException; @@ -187,7 +187,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { return; } byte[] content = getJSONContentAsByte(); - HttpClient hc = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("user.info")); + HttpClient hc = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("user.info")); hc.setContent(content); if (!hc.isServerAlive()) { return; @@ -230,7 +230,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { DBUtils.closeConnection(conn); } - HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("functions.info")); + HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("functions.info")); httpClient.setContent(content); httpClient.setTimeout(5000); diff --git a/designer-realize/src/com/fr/design/mainframe/alphafine/AlphaFineConstants.java b/designer-realize/src/com/fr/design/mainframe/alphafine/AlphaFineConstants.java index 18ae549110..09de8e6ed8 100644 --- a/designer-realize/src/com/fr/design/mainframe/alphafine/AlphaFineConstants.java +++ b/designer-realize/src/com/fr/design/mainframe/alphafine/AlphaFineConstants.java @@ -1,6 +1,6 @@ package com.fr.design.mainframe.alphafine; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import java.awt.*; @@ -68,24 +68,24 @@ public class AlphaFineConstants { public static final String IMAGE_URL = "/com/fr/design/mainframe/alphafine/images/"; - public static final String PLUGIN_SEARCH_URL = SiteCenter.getInstance().acquireUrlByKind("plugin.searchAPI"); + public static final String PLUGIN_SEARCH_URL = CloudCenter.getInstance().acquireUrlByKind("plugin.searchAPI"); - public static final String PLUGIN_URL = SiteCenter.getInstance().acquireUrlByKind("af.pluginInfo"); + public static final String PLUGIN_URL = CloudCenter.getInstance().acquireUrlByKind("af.pluginInfo"); - public static final String REUSE_URL = SiteCenter.getInstance().acquireUrlByKind("af.reuseInfo"); + public static final String REUSE_URL = CloudCenter.getInstance().acquireUrlByKind("af.reuseInfo"); - public static final String DOCUMENT_DOC_URL = SiteCenter.getInstance().acquireUrlByKind("af.doc_view"); + public static final String DOCUMENT_DOC_URL = CloudCenter.getInstance().acquireUrlByKind("af.doc_view"); - public static final String DOCUMENT_SEARCH_URL = SiteCenter.getInstance().acquireUrlByKind("af.doc_search"); + public static final String DOCUMENT_SEARCH_URL = CloudCenter.getInstance().acquireUrlByKind("af.doc_search"); - public static final String DOCUMENT_INFORMATION_URL = SiteCenter.getInstance().acquireUrlByKind("af.doc_info"); + public static final String DOCUMENT_INFORMATION_URL = CloudCenter.getInstance().acquireUrlByKind("af.doc_info"); - public static final String PLUGIN_IMAGE_URL = SiteCenter.getInstance().acquireUrlByKind("af.plugin_image"); + public static final String PLUGIN_IMAGE_URL = CloudCenter.getInstance().acquireUrlByKind("af.plugin_image"); - public static final String CLOUD_SERVER_URL = SiteCenter.getInstance().acquireUrlByKind("af.record"); + public static final String CLOUD_SERVER_URL = CloudCenter.getInstance().acquireUrlByKind("af.record"); - public static final String SEARCH_API = SiteCenter.getInstance().acquireUrlByKind("af.cloud_search"); + public static final String SEARCH_API = CloudCenter.getInstance().acquireUrlByKind("af.cloud_search"); diff --git a/designer-realize/src/com/fr/design/mainframe/bbs/BBSConstants.java b/designer-realize/src/com/fr/design/mainframe/bbs/BBSConstants.java index 1ecd74b86f..bb600b1cef 100644 --- a/designer-realize/src/com/fr/design/mainframe/bbs/BBSConstants.java +++ b/designer-realize/src/com/fr/design/mainframe/bbs/BBSConstants.java @@ -4,7 +4,7 @@ package com.fr.design.mainframe.bbs; import com.fr.general.IOUtils; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import com.fr.stable.StringUtils; import java.util.Properties; @@ -42,7 +42,7 @@ public class BBSConstants { //加载所有用户的信息, 用户名, 论坛连接 private static String[] loadAllGuestsInfoOnline(String key, String defaultValue) { String[] allGuests = new String[0]; - String guest = SiteCenter.getInstance().acquireUrlByKind(key, defaultValue); + String guest = CloudCenter.getInstance().acquireUrlByKind(key, defaultValue); if (StringUtils.isNotEmpty(guest)) { allGuests = guest.split("\\|"); } diff --git a/designer-realize/src/com/fr/design/mainframe/bbs/BBSDialog.java b/designer-realize/src/com/fr/design/mainframe/bbs/BBSDialog.java index ef4633f5ab..dd3366273d 100644 --- a/designer-realize/src/com/fr/design/mainframe/bbs/BBSDialog.java +++ b/designer-realize/src/com/fr/design/mainframe/bbs/BBSDialog.java @@ -6,7 +6,7 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; -import com.fr.general.SiteCenter; +import com.fr.general.CloudCenter; import javafx.application.Platform; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; @@ -96,7 +96,7 @@ public class BBSDialog extends UIDialog { public void changed(ObservableValue observable, final String oldValue, String newValue) { disableLink(eng); // webView好像默认以手机版显示网页,浏览器里过滤掉这个跳转 - if (ComparatorUtils.equals(newValue, url) || ComparatorUtils.equals(newValue, SiteCenter.getInstance().acquireUrlByKind("bbs.mobile"))) { + if (ComparatorUtils.equals(newValue, url) || ComparatorUtils.equals(newValue, CloudCenter.getInstance().acquireUrlByKind("bbs.mobile"))) { return; } PluginWebBridge.getHelper().openUrlAtLocalWebBrowser(eng, newValue); diff --git a/designer-realize/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java b/designer-realize/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java index 6c0c8e6941..06343282f2 100644 --- a/designer-realize/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java +++ b/designer-realize/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java @@ -105,8 +105,8 @@ public class BBSLoginDialog extends UIDialog { nameField = new UITextField(); passField = new UIPassWordField(); loginButton = new UIButton(Inter.getLocText("FR-Designer-BBSLogin_Login")); - passwordReset = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("bbs.reset")); - registerLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("bbs.register")); + passwordReset = getURLActionLabel(CloudCenter.getInstance().acquireUrlByKind("bbs.reset")); + registerLabel = getURLActionLabel(CloudCenter.getInstance().acquireUrlByKind("bbs.register")); loginButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { @@ -163,7 +163,7 @@ public class BBSLoginDialog extends UIDialog { } private boolean testConnection() { - HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.test")); + HttpClient client = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("bbs.test")); return client.isServerAlive(); } @@ -283,8 +283,8 @@ public class BBSLoginDialog extends UIDialog { } catch (UnsupportedEncodingException e) { FineLoggerFactory.getLogger().error(e.getMessage()); } - String url = SiteCenter.getInstance().acquireUrlByKind("bbs.login") + "&username=" + username + "&password=" + password; - String loginSuccessFlag = SiteCenter.getInstance().acquireUrlByKind("bbs"); + String url = CloudCenter.getInstance().acquireUrlByKind("bbs.login") + "&username=" + username + "&password=" + password; + String loginSuccessFlag = CloudCenter.getInstance().acquireUrlByKind("bbs"); HttpClient client = new HttpClient(url); client.setTimeout(TIME_OUT); if (client.getResponseCodeNoException() == HttpURLConnection.HTTP_OK) { @@ -303,7 +303,7 @@ public class BBSLoginDialog extends UIDialog { private BoxCenterAligmentPane getURLActionLabel(final String url) { ActionLabel actionLabel = new ActionLabel(url); - if (ComparatorUtils.equals(url, SiteCenter.getInstance().acquireUrlByKind("bbs.reset"))) { + if (ComparatorUtils.equals(url, CloudCenter.getInstance().acquireUrlByKind("bbs.reset"))) { actionLabel.setText(Inter.getLocText("FR-Designer-BBSLogin_Forgot-Password")); } else { actionLabel.setText(Inter.getLocText("FR-Designer-BBSLogin_Register-Account")); diff --git a/designer-realize/src/com/fr/design/mainframe/bbs/UserInfoLabel.java b/designer-realize/src/com/fr/design/mainframe/bbs/UserInfoLabel.java index b4cde55008..e92e772241 100644 --- a/designer-realize/src/com/fr/design/mainframe/bbs/UserInfoLabel.java +++ b/designer-realize/src/com/fr/design/mainframe/bbs/UserInfoLabel.java @@ -18,10 +18,10 @@ import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.concurrent.ThreadFactoryBuilder; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; import com.fr.general.DateUtils; import com.fr.general.Inter; -import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.stable.EncodeConstants; import com.fr.stable.OperatingSystem; @@ -93,7 +93,7 @@ public class UserInfoLabel extends UILabel { public void mousePressed(MouseEvent e) { if (StringUtils.isNotEmpty(userName)) { try { - String loginUrl = SiteCenter.getInstance().acquireUrlByKind("bbs.default"); + String loginUrl = CloudCenter.getInstance().acquireUrlByKind("bbs.default"); Desktop.getDesktop().browse(new URI(loginUrl)); } catch (Exception exp) { FRContext.getLogger().info(exp.getMessage()); @@ -151,7 +151,7 @@ public class UserInfoLabel extends UILabel { } catch (InterruptedException e) { FRContext.getLogger().error(e.getMessage()); } - HttpClient hc = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.popup")); + HttpClient hc = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("bbs.popup")); if (!hc.isServerAlive()) { return; } @@ -164,7 +164,7 @@ public class UserInfoLabel extends UILabel { Constructor constructor = clazz.getConstructor(Frame.class); Object instance = constructor.newInstance(DesignerContext.getDesignerFrame()); Method showWindow = clazz.getMethod("showWindow", String.class); - showWindow.invoke(instance, SiteCenter.getInstance().acquireUrlByKind("bbs.popup")); + showWindow.invoke(instance, CloudCenter.getInstance().acquireUrlByKind("bbs.popup")); DesignerEnvManager.getEnvManager().setLastShowBBSNewsTime(DateUtils.DATEFORMAT2.format(new Date())); } catch (Throwable ignored) { // ignored diff --git a/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java b/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java index e470745be4..4228f121e8 100644 --- a/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java +++ b/designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java @@ -2,10 +2,10 @@ package com.fr.design.mainframe.errorinfo; import com.fr.base.FRContext; import com.fr.design.mainframe.SiteCenterToken; +import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; -import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONException; import com.fr.json.JSONObject; @@ -89,7 +89,7 @@ public class ErrorInfoUploader { private void downloadSolution(File localCacheZip) { try { - String downloadURL = SiteCenter.getInstance().acquireUrlByKind("solution.download", "http://cloud.fanruan.com/api/solution"); + String downloadURL = CloudCenter.getInstance().acquireUrlByKind("solution.download", "http://cloud.fanruan.com/api/solution"); downloadURL = String.format("%s?token=%s", downloadURL, SiteCenterToken.generateToken()); HttpClient hc = new HttpClient(downloadURL); hc.asGet(); @@ -110,7 +110,7 @@ public class ErrorInfoUploader { private boolean needUpdate(File localCacheZip) { if (localCacheZip.exists()) { // 判断本地文件大小. - String checkURL = SiteCenter.getInstance().acquireUrlByKind("solution.check", "http://cloud.fanruan.com/api/solution/cache/check"); + String checkURL = CloudCenter.getInstance().acquireUrlByKind("solution.check", "http://cloud.fanruan.com/api/solution/cache/check"); checkURL = String.format("%s?token=%s", checkURL, SiteCenterToken.generateToken()); HttpClient client = new HttpClient(checkURL); client.asGet(); @@ -156,7 +156,7 @@ public class ErrorInfoUploader { continue; } - String url = SiteCenter.getInstance().acquireUrlByKind("design.error"); + String url = CloudCenter.getInstance().acquireUrlByKind("design.error"); if (sendErroInfo(url, content)) { file.delete(); } diff --git a/designer-realize/src/com/fr/design/report/share/ShareButton.java b/designer-realize/src/com/fr/design/report/share/ShareButton.java index 40262abbd9..298a03518f 100644 --- a/designer-realize/src/com/fr/design/report/share/ShareButton.java +++ b/designer-realize/src/com/fr/design/report/share/ShareButton.java @@ -17,9 +17,9 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.file.FILE; +import com.fr.general.CloudCenter; import com.fr.general.Inter; import com.fr.general.NameObject; -import com.fr.general.SiteCenter; import com.fr.io.exporter.ImageExporter; import com.fr.main.TemplateWorkBook; import com.fr.main.workbook.ResultWorkBook; @@ -66,7 +66,7 @@ public class ShareButton extends UIButton{ //打开论坛, url可在bbs.properties中配置 private void openBBS(){ try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("bbs.share"))); + Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("bbs.share"))); } catch (Exception e1) { FRContext.getLogger().error(e1.getMessage()); } diff --git a/designer-realize/src/com/fr/start/CollectUserInformationDialog.java b/designer-realize/src/com/fr/start/CollectUserInformationDialog.java index 9ed0928ffb..a46f9f73b6 100644 --- a/designer-realize/src/com/fr/start/CollectUserInformationDialog.java +++ b/designer-realize/src/com/fr/start/CollectUserInformationDialog.java @@ -12,9 +12,9 @@ import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.ActiveKeyGenerator; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; -import com.fr.general.SiteCenter; import com.fr.stable.OperatingSystem; import javax.swing.BorderFactory; @@ -40,10 +40,10 @@ public class CollectUserInformationDialog extends UIDialog { private static final int ONLINE_VERIFY_TIMEOUT = 30 * 1000; - private static final String CN_LOGIN_HTML = SiteCenter.getInstance().acquireUrlByKind("frlogin.cn"); - private static final String EN_LOGIN_HTML = SiteCenter.getInstance().acquireUrlByKind("frlogin.en"); - private static final String TW_LOGIN_HTML = SiteCenter.getInstance().acquireUrlByKind("frlogin.tw"); - private static final String JP_LOGIN_HTML = SiteCenter.getInstance().acquireUrlByKind("frlogin.jp"); + private static final String CN_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.cn"); + private static final String EN_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.en"); + private static final String TW_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.tw"); + private static final String JP_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.jp"); private UITextField keyTextField; diff --git a/designer-realize/src/com/fr/start/Designer.java b/designer-realize/src/com/fr/start/Designer.java index d80024ea40..a2ef7df4fb 100644 --- a/designer-realize/src/com/fr/start/Designer.java +++ b/designer-realize/src/com/fr/start/Designer.java @@ -41,9 +41,9 @@ import com.fr.design.module.DesignerModule; import com.fr.design.utils.concurrent.ThreadFactoryBuilder; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.WidgetInfoConfig; +import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; -import com.fr.general.SiteCenter; import com.fr.module.Module; import com.fr.module.ModuleContext; import com.fr.stable.BuildContext; @@ -119,7 +119,7 @@ public class Designer extends BaseDesigner { service.submit(new Runnable() { @Override public void run() { - SiteCenter.getInstance(); + CloudCenter.getInstance(); Cursor cursor = UIConstants.CELL_DEFAULT_CURSOR; } }); diff --git a/designer-realize/src/com/fr/start/module/PreStartActivator.java b/designer-realize/src/com/fr/start/module/PreStartActivator.java index e013a35519..85a9ff2ee2 100644 --- a/designer-realize/src/com/fr/start/module/PreStartActivator.java +++ b/designer-realize/src/com/fr/start/module/PreStartActivator.java @@ -4,10 +4,9 @@ import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.RestartHelper; import com.fr.design.utils.DesignUtils; +import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; -import com.fr.general.SiteCenter; import com.fr.module.Activator; -import com.fr.stable.BuildContext; import com.fr.stable.ProductConstants; import java.io.File; @@ -25,7 +24,7 @@ public class PreStartActivator extends Activator { public void start() { RestartHelper.deleteRecordFilesWhenStart(); - SiteCenter.getInstance(); + CloudCenter.getInstance(); if (checkMultiStart()) { return; }