Browse Source

Merge pull request #561 in DESIGN/design from ~ALEX.SUNG/design:release/10.0 to release/10.0

REPORT-11880 SimilarSearchManeger拼错了....

* commit '46283dc93c6423225ab4637f99942a72041a59b1':
  REPORT-11880 SimilarSearchManeger拼错了....
final/10.0
Alex.Sung 6 years ago
parent
commit
a85e762292
  1. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineHelper.java
  2. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/CellModelHelper.java
  3. 6
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  4. 10
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManager.java
  5. 10
      designer-realize/src/test/java/com.fr/design/mainframe/alphafine/search/manager/impl/SearchManegerTest.java

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineHelper.java

@ -14,7 +14,7 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.HotIssuesManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.RecentSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.RecentSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.RecommendSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.RecommendSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManeger; import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManager;
import com.fr.general.ProcessCanceledException; import com.fr.general.ProcessCanceledException;
import com.fr.general.http.HttpToolbox; import com.fr.general.http.HttpToolbox;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
@ -142,7 +142,7 @@ public class AlphaFineHelper {
result.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help"))); result.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Community_Help")));
} else if (object instanceof PluginSearchManager) { } else if (object instanceof PluginSearchManager) {
result.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Plugin_Addon"))); result.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Plugin_Addon")));
} else if (object instanceof SimilarSearchManeger) { } else if (object instanceof SimilarSearchManager) {
result.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Relation_Item"))); result.add(0, new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Relation_Item")));
} else if (object instanceof HotIssuesManager) { } else if (object instanceof HotIssuesManager) {
return new SearchResult(); return new SearchResult();

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/CellModelHelper.java

@ -6,7 +6,7 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.ActionSearchManager
import com.fr.design.mainframe.alphafine.search.manager.impl.DocumentSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.DocumentSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.FileSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.FileSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManeger; import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManager;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
/** /**
@ -34,7 +34,7 @@ public class CellModelHelper {
break; break;
case ROBOT: case ROBOT:
case RECOMMEND_ROBOT: case RECOMMEND_ROBOT:
cellModel = SimilarSearchManeger.getModelFromCloud(object.optJSONObject(RESULT)); cellModel = SimilarSearchManager.getModelFromCloud(object.optJSONObject(RESULT));
break; break;
} }
return cellModel; return cellModel;

6
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -32,7 +32,7 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager
import com.fr.design.mainframe.alphafine.search.manager.impl.RecentSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.RecentSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.RecommendSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.RecommendSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.SegmentationManager; import com.fr.design.mainframe.alphafine.search.manager.impl.SegmentationManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManeger; import com.fr.design.mainframe.alphafine.search.manager.impl.SimilarSearchManager;
import com.fr.design.mainframe.errorinfo.ErrorInfoUploader; import com.fr.design.mainframe.errorinfo.ErrorInfoUploader;
import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.design.mainframe.templateinfo.TemplateInfoCollector;
import com.fr.form.main.Form; import com.fr.form.main.Form;
@ -573,7 +573,7 @@ public class AlphaFineDialog extends UIDialog {
} }
private void buildSimilarList(final String[] searchText) { private void buildSimilarList(final String[] searchText) {
addSearchResult(SimilarSearchManeger.getInstance().getLessSearchResult(searchText)); addSearchResult(SimilarSearchManager.getInstance().getLessSearchResult(searchText));
} }
private synchronized void addSearchResult(SearchResult searchResult) { private synchronized void addSearchResult(SearchResult searchResult) {
@ -1052,7 +1052,7 @@ public class AlphaFineDialog extends UIDialog {
break; break;
case ROBOT: case ROBOT:
case RECOMMEND_ROBOT: case RECOMMEND_ROBOT:
moreResult = SimilarSearchManeger.getInstance().getMoreSearchResult(searchTextField.getText()); moreResult = SimilarSearchManager.getInstance().getMoreSearchResult(searchTextField.getText());
break; break;
case RECOMMEND: case RECOMMEND:
moreResult = RecommendSearchManager.getInstance().getMoreSearchResult(searchTextField.getText()); moreResult = RecommendSearchManager.getInstance().getMoreSearchResult(searchTextField.getText());

10
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManeger.java → designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManager.java

@ -17,16 +17,16 @@ import com.fr.third.org.apache.commons.codec.digest.DigestUtils;
/** /**
* Created by alex.sung on 2018/8/3. * Created by alex.sung on 2018/8/3.
*/ */
public class SimilarSearchManeger implements AlphaFineSearchProvider { public class SimilarSearchManager implements AlphaFineSearchProvider {
private static volatile SimilarSearchManeger instance; private static volatile SimilarSearchManager instance;
private SearchResult lessModelList; private SearchResult lessModelList;
private SearchResult moreModelList = new SearchResult(); private SearchResult moreModelList = new SearchResult();
public static SimilarSearchManeger getInstance() { public static SimilarSearchManager getInstance() {
if (instance == null) { if (instance == null) {
synchronized (SimilarSearchManeger.class) { synchronized (SimilarSearchManager.class) {
if (instance == null) { if (instance == null) {
instance = new SimilarSearchManeger(); instance = new SimilarSearchManager();
} }
} }
} }

10
designer-realize/src/test/java/com.fr/design/mainframe/alphafine/search/manager/impl/SearchManegerTest.java

@ -9,7 +9,7 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
public class SearchManegerTest { public class SearchManegerTest {
SimilarSearchManeger similarSearchManeger; SimilarSearchManager similarSearchManager;
ComplementAdviceManager complementAdviceManager; ComplementAdviceManager complementAdviceManager;
DocumentSearchManager documentSearchManager; DocumentSearchManager documentSearchManager;
PluginSearchManager pluginSearchManager; PluginSearchManager pluginSearchManager;
@ -23,7 +23,7 @@ public class SearchManegerTest {
public void setUp() { public void setUp() {
recentSearchManager = RecentSearchManager.getInstance(); recentSearchManager = RecentSearchManager.getInstance();
recommendSearchManager = RecommendSearchManager.getInstance(); recommendSearchManager = RecommendSearchManager.getInstance();
similarSearchManeger = SimilarSearchManeger.getInstance(); similarSearchManager = SimilarSearchManager.getInstance();
complementAdviceManager = ComplementAdviceManager.getInstance(); complementAdviceManager = ComplementAdviceManager.getInstance();
documentSearchManager = DocumentSearchManager.getInstance(); documentSearchManager = DocumentSearchManager.getInstance();
pluginSearchManager = PluginSearchManager.getInstance(); pluginSearchManager = PluginSearchManager.getInstance();
@ -43,7 +43,7 @@ public class SearchManegerTest {
lessModelList = recentSearchManager.getLessSearchResult(new String[]{"数据集"}); lessModelList = recentSearchManager.getLessSearchResult(new String[]{"数据集"});
Assert.assertNotNull(lessModelList); Assert.assertNotNull(lessModelList);
lessModelList = similarSearchManeger.getLessSearchResult(new String[]{"数据集"}); lessModelList = similarSearchManager.getLessSearchResult(new String[]{"数据集"});
Assert.assertEquals(lessModelList.get(1).getType(), CellType.ROBOT); Assert.assertEquals(lessModelList.get(1).getType(), CellType.ROBOT);
lessModelList = complementAdviceManager.getAllSearchResult(new String[]{"数据集"}); lessModelList = complementAdviceManager.getAllSearchResult(new String[]{"数据集"});
@ -51,7 +51,7 @@ public class SearchManegerTest {
//返回MoreSearchResult //返回MoreSearchResult
SearchResult moreModelList; SearchResult moreModelList;
moreModelList = similarSearchManeger.getMoreSearchResult("数据集"); moreModelList = similarSearchManager.getMoreSearchResult("数据集");
Assert.assertNotNull(moreModelList); Assert.assertNotNull(moreModelList);
moreModelList = recommendSearchManager.getMoreSearchResult("数据集"); moreModelList = recommendSearchManager.getMoreSearchResult("数据集");
@ -60,7 +60,7 @@ public class SearchManegerTest {
@Test @Test
public void getModelFromCloudTest() { public void getModelFromCloudTest() {
Assert.assertNotNull(SimilarSearchManeger.getModelFromCloud(new JSONObject())); Assert.assertNotNull(SimilarSearchManager.getModelFromCloud(new JSONObject()));
Assert.assertNotNull(DocumentSearchManager.getModelFromCloud(new JSONObject())); Assert.assertNotNull(DocumentSearchManager.getModelFromCloud(new JSONObject()));
Assert.assertNotNull(PluginSearchManager.getModelFromCloud(new JSONObject())); Assert.assertNotNull(PluginSearchManager.getModelFromCloud(new JSONObject()));
} }

Loading…
Cancel
Save