From 63cba9dc76d70d76ce1d961767b01d8e3f4774da Mon Sep 17 00:00:00 2001 From: richie Date: Fri, 22 Jun 2018 10:24:38 +0800 Subject: [PATCH] =?UTF-8?q?CORE-87=20=E4=BF=AE=E6=94=B9SiteCenter=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/community/BBSAction.java | 4 ++-- .../design/actions/community/BugAction.java | 4 ++-- .../design/actions/community/NeedAction.java | 4 ++-- .../actions/community/QuestionAction.java | 4 ++-- .../design/actions/community/SignAction.java | 4 ++-- .../fr/design/actions/community/UpAction.java | 4 ++-- .../design/actions/community/VideoAction.java | 6 +++--- .../com/fr/design/actions/help/AboutPane.java | 16 +++++++-------- .../fr/design/actions/help/ForumAction.java | 4 ++-- .../design/actions/help/TutorialAction.java | 7 ++----- .../com/fr/design/extra/LoginWebBridge.java | 10 +++++----- .../fr/design/extra/PluginOperateUtils.java | 4 ++-- .../src/com/fr/design/extra/PluginUtils.java | 6 +++--- .../com/fr/design/extra/PluginWebBridge.java | 8 ++++---- .../design/extra/PluginsReaderFromStore.java | 6 +++--- .../com/fr/design/extra/QQLoginWebPane.java | 2 +- .../com/fr/design/extra/WebViewDlgHelper.java | 4 ++-- .../exe/GetPluginCategoriesExecutor.java | 4 ++-- .../extra/exe/GetPluginFromStoreExecutor.java | 4 ++-- .../extra/exe/GetPluginPrefixExecutor.java | 4 ++-- .../extra/exe/SearchOnlineExecutor.java | 4 ++-- .../com/fr/design/extra/ucenter/Client.java | 6 +++--- .../templateinfo/TemplateInfoCollector.java | 6 +++--- .../chart/DownloadOnlineSourcesHelper.java | 6 +++--- .../mainframe/FormWidgetDetailPane.java | 4 ++-- .../design/mainframe/ActiveKeyGenerator.java | 4 ++-- .../mainframe/InformationCollector.java | 6 +++--- .../alphafine/AlphaFineConstants.java | 20 +++++++++---------- .../fr/design/mainframe/bbs/BBSConstants.java | 4 ++-- .../fr/design/mainframe/bbs/BBSDialog.java | 4 ++-- .../design/mainframe/bbs/BBSLoginDialog.java | 12 +++++------ .../design/mainframe/bbs/UserInfoLabel.java | 8 ++++---- .../errorinfo/ErrorInfoUploader.java | 8 ++++---- .../fr/design/report/share/ShareButton.java | 4 ++-- .../start/CollectUserInformationDialog.java | 10 +++++----- .../src/com/fr/start/Designer.java | 4 ++-- .../fr/start/module/PreStartActivator.java | 5 ++--- 37 files changed, 110 insertions(+), 114 deletions(-) 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 01cdcee95..f9c6923af 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 5d5e6893c..7f6548ca4 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 b353dcaa8..68ff2fde0 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 6cf5f479c..d94a6e07c 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 839d2b9d7..eaa1b2ef6 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 acbe2522b..83041d888 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 cedbe6273..4040c514f 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 14bcf98b2..40ee0902e 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 292ad13f3..c0684cb9c 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 35233430b..f51ce77cb 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 30f90d13c..b22c5905a 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 d68d0cd86..6752526d9 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 781a7167a..124ef323f 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 d922ae37f..767a3ea2c 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 add949796..06a2706d5 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 f74219691..1d6b7c7a3 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 f273b6d90..18afa06bb 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 f517d0b65..0a3b76211 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 c5a159a10..884b115da 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 31b4e2d3f..7a7de6b12 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 456b77dd1..a35d10588 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 cceba006d..903286476 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 be286226c..7eb5e7bfd 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 d90fb4d4b..f7caf5d2c 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 1285b7115..f94fe1664 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 959c32b9b..8b6c3ce4c 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 8da7fe012..6250179db 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 18ae54911..09de8e6ed 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 1ecd74b86..bb600b1ce 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 ef4633f5a..dd3366273 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 6c0c8e694..06343282f 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 b4cde5500..e92e77224 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 e470745be..4228f121e 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 40262abbd..298a03518 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 9ed0928ff..a46f9f73b 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 3d4f027a9..925795fff 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 e013a3551..85a9ff2ee 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; }