diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java
index 11bc0fb34c..d62f44a4bc 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java
@@ -58,11 +58,11 @@ public class AlphaFineConfigManager implements XMLable {
/**
* 分词搜索
*/
- private boolean isNeedSegmentationCheckbox = true;
+ private boolean needSegmentationCheckbox = true;
/**
* 智能客服
*/
- private boolean isNeedIntelligentCustomerService = true;
+ private boolean needIntelligentCustomerService = true;
/**
* 快捷键
*/
@@ -102,8 +102,8 @@ public class AlphaFineConfigManager implements XMLable {
this.setContainAction(reader.getAttrAsBoolean("isContainAction", true));
this.setContainTemplate(reader.getAttrAsBoolean("isContainTemplate", true));
this.setContainFileContent(reader.getAttrAsBoolean("isContainFileContent", false));
- this.setNeedSegmentationCheckbox(reader.getAttrAsBoolean("isNeedSegmentationCheckbox", true));
- this.setNeedIntelligentCustomerService(reader.getAttrAsBoolean("isNeedIntelligentCustomerService", true));
+ this.setNeedSegmentationCheckbox(reader.getAttrAsBoolean("needSegmentationCheckbox", true));
+ this.setNeedIntelligentCustomerService(reader.getAttrAsBoolean("needIntelligentCustomerService", true));
this.setShortcuts(reader.getAttrAsString("shortcuts", getDefaultShortCuts()));
this.setNeedRemind(reader.getAttrAsBoolean("isNeedRemind", true));
this.setOperateCount(reader.getAttrAsInt("operateCount", 0));
@@ -126,8 +126,8 @@ public class AlphaFineConfigManager implements XMLable {
.attr("isContainFileContent", this.isContainFileContent())
.attr("isNeedRemind", this.isNeedRemind())
.attr("operateCount", this.getOperateCount())
- .attr("isNeedSegmentationCheckbox", this.isNeedSegmentationCheckbox())
- .attr("isNeedIntelligentCustomerService", this.isNeedIntelligentCustomerService());
+ .attr("needSegmentationCheckbox", this.isNeedSegmentationCheckbox())
+ .attr("needIntelligentCustomerService", this.isNeedIntelligentCustomerService());
writer.end();
}
@@ -240,20 +240,21 @@ public class AlphaFineConfigManager implements XMLable {
}
public boolean isNeedSegmentationCheckbox() {
- return isNeedSegmentationCheckbox;
+ return needSegmentationCheckbox;
}
public void setNeedSegmentationCheckbox(boolean needSegmentationCheckbox) {
- isNeedSegmentationCheckbox = needSegmentationCheckbox;
+ this.needSegmentationCheckbox = needSegmentationCheckbox;
}
public boolean isNeedIntelligentCustomerService() {
- return isNeedIntelligentCustomerService;
+ return needIntelligentCustomerService;
}
public void setNeedIntelligentCustomerService(boolean needIntelligentCustomerService) {
- isNeedIntelligentCustomerService = needIntelligentCustomerService;
+ this.needIntelligentCustomerService = needIntelligentCustomerService;
}
+
public int getOperateCount() {
return operateCount;
}
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java
index 1520a7e1dd..6f93631bc0 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java
@@ -55,7 +55,7 @@ public class AlphaFineConfigPane extends BasicPane {
private static final double COLUMN_GAP = 180;
private static final double ROW_GAP = 25;
private KeyStroke shortCutKeyStore = null;
- private UICheckBox isEnabledCheckbox, isSearchOnlineCheckbox, isNeedSegmentationCheckbox, isNeedIntelligentCustomerService, isContainRecommendCheckbox, isContainActionCheckbox, isContainDocumentCheckbox, isContainTemplateCheckbox, isContainPluginCheckbox, isContainFileContentCheckbox;
+ private UICheckBox isEnabledCheckbox, isSearchOnlineCheckbox, needSegmentationCheckbox, needIntelligentCustomerService, isContainRecommendCheckbox, isContainActionCheckbox, isContainDocumentCheckbox, isContainTemplateCheckbox, isContainPluginCheckbox, isContainFileContentCheckbox;
private UITextField shortcutsField;
public AlphaFineConfigPane() {
@@ -77,14 +77,14 @@ public class AlphaFineConfigPane extends BasicPane {
Component[][] components = new Component[][]{
new Component[]{isContainRecommendCheckbox, isContainActionCheckbox, isContainDocumentCheckbox},
new Component[]{isContainTemplateCheckbox, isContainPluginCheckbox, isContainFileContentCheckbox},
- new Component[]{isNeedIntelligentCustomerService, null, null}
+ new Component[]{needIntelligentCustomerService, null, null}
};
return components;
}
private Component[][] initOnlineComponents() {
Component[][] components = new Component[][]{
- new Component[]{isSearchOnlineCheckbox, isNeedSegmentationCheckbox, null}
+ new Component[]{isSearchOnlineCheckbox, needSegmentationCheckbox, null}
};
return components;
}
@@ -101,7 +101,7 @@ public class AlphaFineConfigPane extends BasicPane {
isContainDocumentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help"));
isContainTemplateCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Templates"));
isContainFileContentCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Templates_Content"));
- isNeedIntelligentCustomerService = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Intelligent_Customer_Service"));
+ needIntelligentCustomerService = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Intelligent_Customer_Service"));
JPanel searchConfigPane = TableLayoutHelper.createTableLayoutPane(initSearchRangeComponents(), rowSize, columnSize);
northPane.add(searchConfigPane);
contentPane.add(northPane);
@@ -148,7 +148,7 @@ public class AlphaFineConfigPane extends BasicPane {
private void createOnlinePane(JPanel contentPane) {
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Search_Type"));
isSearchOnlineCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Enable_Internet_Search"));
- isNeedSegmentationCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Enable_Segmentation"));
+ needSegmentationCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_AlphaFine_Enable_Segmentation"));
isSearchOnlineCheckbox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -156,16 +156,16 @@ public class AlphaFineConfigPane extends BasicPane {
isContainRecommendCheckbox.setEnabled(false);
isContainPluginCheckbox.setEnabled(false);
isContainDocumentCheckbox.setEnabled(false);
- isNeedIntelligentCustomerService.setEnabled(false);
+ needIntelligentCustomerService.setEnabled(false);
isContainRecommendCheckbox.setSelected(false);
isContainPluginCheckbox.setSelected(false);
isContainDocumentCheckbox.setSelected(false);
- isNeedIntelligentCustomerService.setSelected(false);
+ needIntelligentCustomerService.setSelected(false);
} else {
isContainRecommendCheckbox.setEnabled(true);
isContainPluginCheckbox.setEnabled(true);
isContainDocumentCheckbox.setEnabled(true);
- isNeedIntelligentCustomerService.setEnabled(true);
+ needIntelligentCustomerService.setEnabled(true);
}
}
});
@@ -203,9 +203,9 @@ public class AlphaFineConfigPane extends BasicPane {
this.isContainRecommendCheckbox.setEnabled(alphaFineConfigManager.isSearchOnLine());
this.shortcutsField.setText(getDisplayShortCut(alphaFineConfigManager.getShortcuts()));
- this.isNeedSegmentationCheckbox.setSelected(alphaFineConfigManager.isNeedSegmentationCheckbox());
- this.isNeedIntelligentCustomerService.setSelected(alphaFineConfigManager.isNeedIntelligentCustomerService() && alphaFineConfigManager.isSearchOnLine());
- this.isNeedIntelligentCustomerService.setEnabled(alphaFineConfigManager.isSearchOnLine());
+ this.needSegmentationCheckbox.setSelected(alphaFineConfigManager.isNeedSegmentationCheckbox());
+ this.needIntelligentCustomerService.setSelected(alphaFineConfigManager.isNeedIntelligentCustomerService() && alphaFineConfigManager.isSearchOnLine());
+ this.needIntelligentCustomerService.setEnabled(alphaFineConfigManager.isSearchOnLine());
shortCutKeyStore = convert2KeyStroke(alphaFineConfigManager.getShortcuts());
}
@@ -220,8 +220,8 @@ public class AlphaFineConfigPane extends BasicPane {
alphaFineConfigManager.setSearchOnLine(this.isSearchOnlineCheckbox.isSelected());
alphaFineConfigManager.setContainTemplate(this.isContainTemplateCheckbox.isSelected());
alphaFineConfigManager.setContainFileContent(this.isContainFileContentCheckbox.isSelected());
- alphaFineConfigManager.setNeedSegmentationCheckbox(this.isNeedSegmentationCheckbox.isSelected());
- alphaFineConfigManager.setNeedIntelligentCustomerService(this.isNeedIntelligentCustomerService.isSelected());
+ alphaFineConfigManager.setNeedSegmentationCheckbox(this.needSegmentationCheckbox.isSelected());
+ alphaFineConfigManager.setNeedIntelligentCustomerService(this.needIntelligentCustomerService.isSelected());
alphaFineConfigManager.setShortcuts(shortCutKeyStore != null ? shortCutKeyStore.toString().replace(TYPE, DISPLAY_TYPE) : this.shortcutsField.getText());
designerEnvManager.setAlphaFineConfigManager(alphaFineConfigManager);
try {
diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
index cf7f04e0ae..410796f269 100644
--- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
+++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
@@ -1,7 +1,6 @@
package com.fr.design.mainframe.alphafine;
import com.fr.general.CloudCenter;
-
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
@@ -69,6 +68,8 @@ public class AlphaFineConstants {
public static final Color RED = new Color(0xf46c4c);
+ public static final String HIGH_LIGHT_COLOR = "rgb(51,148,240)";
+
public static final Font SMALL_FONT = new Font("Song_TypeFace", 0, 10);
public static final Font MEDIUM_FONT = new Font("Song_TypeFace", 0, 12);
@@ -81,6 +82,8 @@ public class AlphaFineConstants {
public static final String IMAGE_URL = "/com/fr/design/mainframe/alphafine/images/";
+ public static final String ALPHA_HOT_IMAGE_NAME = "alphafine_hot";
+
public static final String PLUGIN_SEARCH_URL = CloudCenter.getInstance().acquireUrlByKind("plugin.searchAPI");
public static final String PLUGIN_URL = CloudCenter.getInstance().acquireUrlByKind("af.pluginInfo");
@@ -100,13 +103,23 @@ public class AlphaFineConstants {
public static final String SEARCH_API = CloudCenter.getInstance().acquireUrlByKind("af.cloud_search");
+ public static final String SPECIAL_CHARACTER_REGEX = "[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】';:”“’。,、?]";
+
+ public static final String BOTTOM_REGEX_FIRST = "
([\\s\\S]*?)class=\"jiaoyes\">YES
";
+
+ public static final String BOTTOM_REGEX_SECOND = "
";
+
public static final String ALPHA_ROBOT_SEARCH_TOKEN = "K8dl0Np6l0gs";
- public static final String SIMILAR_SEARCH_URL_PREFIX = "http://robot.finereport.com/openapi/like.php?action=search&";
+ public static final String SIMILAR_SEARCH_URL_PREFIX = CloudCenter.getInstance().acquireUrlByKind("af.similar_search");
+
+ public static final String COMPLEMENT_ADVICE_SEARCH_URL_PREFIX = CloudCenter.getInstance().acquireUrlByKind("af.advice_search");
+
+ public static final String ALPHA_HOT_SEARCH = CloudCenter.getInstance().acquireUrlByKind("af.hot_search");
- public static final String COMPLEMENT_ADVICE_SEARCH_URL_PREFIX = "http://robot.finereport.com/openapi/getkw.php?";
+ public static final String ALPHA_GO_TO_FORUM = CloudCenter.getInstance().acquireUrlByKind("af.go_fourm");
- public static final String ALPHA_HOT_SEARCH = "http://robot.finereport.com/openapi/hot.php";
+ public static final String ALPHA_GO_TO_WEB = CloudCenter.getInstance().acquireUrlByKind("af.go_web");
}
diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/BottomModel.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/BottomModel.java
index 76528685eb..50dc169bfe 100644
--- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/BottomModel.java
+++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/BottomModel.java
@@ -1,5 +1,6 @@
package com.fr.design.mainframe.alphafine.cell.model;
+import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.design.mainframe.alphafine.CellType;
import com.fr.json.JSONException;
import com.fr.json.JSONObject;
@@ -31,12 +32,12 @@ public class BottomModel extends AlphaCellModel {
@Override
public JSONObject ModelToJson() throws JSONException {
- return null;
+ return JSONObject.EMPTY;
}
@Override
public String getStoreInformation() {
- return null;
+ return "";
}
@Override
@@ -47,7 +48,7 @@ public class BottomModel extends AlphaCellModel {
@Override
public void doAction() {
try {
- Desktop.getDesktop().browse(new URI("http://bbs.fanruan.com/post_newthread_ajax.php?action=newthread&fid=39"));
+ Desktop.getDesktop().browse(new URI(AlphaFineConstants.ALPHA_GO_TO_FORUM));
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
} catch (URISyntaxException e) {
diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/RobotModel.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/RobotModel.java
index 99ccab4bd0..85e0cfa84b 100644
--- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/RobotModel.java
+++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/RobotModel.java
@@ -24,14 +24,14 @@ public class RobotModel extends AlphaCellModel {
private String content;
//热门问题列表的list不需要渲染图标,所以这里需要区分一下
- private boolean isHotItemModel = false;
+ private boolean hotItemModel = false;
public boolean isHotItemModel() {
- return isHotItemModel;
+ return hotItemModel;
}
public void setHotItemModel(boolean hotItemModel) {
- isHotItemModel = hotItemModel;
+ this.hotItemModel = hotItemModel;
}
public String getTitle() {
@@ -45,7 +45,7 @@ public class RobotModel extends AlphaCellModel {
public static String getContent(String titleStr) {
String result;
String token = DigestUtils.md5Hex(AlphaFineConstants.ALPHA_ROBOT_SEARCH_TOKEN + titleStr);
- String url = "http://robot.finereport.com/openapi/reply.php?action=search&msg=" + titleStr + "&token=" + token;
+ String url = AlphaFineConstants.ALPHA_GO_TO_WEB + titleStr + "&token=" + token;
HttpClient httpClient = new HttpClient(url);
httpClient.asGet();
result = httpClient.getResponseText();
diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java
index 367de258c5..cd9affb30c 100644
--- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java
+++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java
@@ -57,18 +57,18 @@ public class ContentCellRender implements ListCellRenderer