XiaXiang
8 years ago
19 changed files with 286 additions and 264 deletions
@ -1,13 +0,0 @@ |
|||||||
package com.fr.design.mainframe.alphafine.cell.cellModel; |
|
||||||
|
|
||||||
import com.fr.json.JSONException; |
|
||||||
import com.fr.json.JSONObject; |
|
||||||
|
|
||||||
/** |
|
||||||
* Created by XiaXiang on 2017/5/16. |
|
||||||
*/ |
|
||||||
public interface ModelHandel { |
|
||||||
|
|
||||||
JSONObject ModelToJson() throws JSONException; |
|
||||||
|
|
||||||
} |
|
After Width: | Height: | Size: 2.7 KiB |
@ -1,59 +0,0 @@ |
|||||||
package com.fr.design.mainframe.alphafine.searchManager; |
|
||||||
|
|
||||||
import com.fr.design.mainframe.alphafine.cell.cellModel.MoreModel; |
|
||||||
import com.fr.design.mainframe.alphafine.model.SearchResult; |
|
||||||
import com.fr.design.mainframe.alphafine.recentSearch.RecentSearchManager; |
|
||||||
import com.fr.general.Inter; |
|
||||||
|
|
||||||
/** |
|
||||||
* Created by XiaXiang on 2017/3/31. |
|
||||||
*/ |
|
||||||
public class LatestSearchManager implements AlphaFineSearchProcessor { |
|
||||||
private static LatestSearchManager latestSearchManager = null; |
|
||||||
private SearchResult modelList; |
|
||||||
private SearchResult latestModelList; |
|
||||||
|
|
||||||
public synchronized static LatestSearchManager getLatestSearchManager() { |
|
||||||
if (latestSearchManager == null) { |
|
||||||
latestSearchManager = new LatestSearchManager(); |
|
||||||
} |
|
||||||
return latestSearchManager; |
|
||||||
} |
|
||||||
@Override |
|
||||||
public synchronized SearchResult showLessSearchResult(String searchText) { |
|
||||||
this.modelList = new SearchResult(); |
|
||||||
modelList.add(new MoreModel(Inter.getLocText("FR-Designer_AlphaFine_Latest"), false)); |
|
||||||
//todo: 本地常用逻辑需要重新设计
|
|
||||||
if (RecentSearchManager.getInstance().getRecentModelList(searchText) != null) { |
|
||||||
modelList.addAll(RecentSearchManager.getInstance().getRecentModelList(searchText)); |
|
||||||
} |
|
||||||
// if (getLatestModelList() != null && getLatestModelList().size() > 0) {
|
|
||||||
// modelList.addAll(getLatestModelList());
|
|
||||||
// }
|
|
||||||
return modelList; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public SearchResult showMoreSearchResult() { |
|
||||||
return null; |
|
||||||
} |
|
||||||
|
|
||||||
public SearchResult getModelList() { |
|
||||||
return modelList; |
|
||||||
} |
|
||||||
|
|
||||||
public void setModelList(SearchResult modelList) { |
|
||||||
this.modelList = modelList; |
|
||||||
} |
|
||||||
|
|
||||||
public SearchResult getLatestModelList() { |
|
||||||
if(this.latestModelList != null && this.latestModelList.size() > 0) { |
|
||||||
return this.latestModelList; |
|
||||||
} |
|
||||||
return AlphaSearchManager.getSearchManager().getLatestSearchResult(); |
|
||||||
} |
|
||||||
|
|
||||||
public void setLatestModelList(SearchResult latestModelList) { |
|
||||||
this.latestModelList = latestModelList; |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue