Search in sources :

Example 1 with LuceneVersion

use of com.qlangtech.tis.fullbuild.indexbuild.LuceneVersion in project tis by qlangtech.

the class SchemaAction method doGotoSolrAppCreateConfirm.

/**
 * 编辑完成schema之后需要跳转到索引確認頁面<br>
 * 这里只作校验
 *
 * @param context
 * @throws Exception
 */
@Func(value = PermissionConstant.APP_ADD)
public void doGotoSolrAppCreateConfirm(Context context) throws Exception {
    this.errorsPageShow(context);
    // 这里只做schema的校验
    CreateIndexConfirmModel confiemModel = parseJsonPost(CreateIndexConfirmModel.class);
    SchemaResult schemaParse = parseSchema(context, ISchemaPluginContext.NULL, confiemModel);
    LuceneVersion ver = confiemModel.parseTplVersion();
// if (schemaParse.success) {
// // 服务器端自动选机器
// // TODO 目前先不选机器
// // TISZkStateReader zookeeper = this.getZkStateReader();
// // Optional<CoreNode> cn = zookeeper.getCoreNodeCandidate(ver);
// // if (cn.isPresent()) {
// // this.setBizResult(context, cn.get());
// // }
// } else {
// // this.addErrorMessage(context, "Schema解析有错");
// }
}
Also used : LuceneVersion(com.qlangtech.tis.fullbuild.indexbuild.LuceneVersion) Func(com.qlangtech.tis.manage.spring.aop.Func)

Example 2 with LuceneVersion

use of com.qlangtech.tis.fullbuild.indexbuild.LuceneVersion in project tis by qlangtech.

the class AddAppAction method doGetCreateAppMasterData.

/**
 * 创建业务流程中所需要的系统表信息,在這個方法中全部取得
 *
 * @param context
 * @throws Exception
 */
@Func(PermissionConstant.APP_ADD)
public void doGetCreateAppMasterData(Context context) throws Exception {
    Map<String, Object> masterData = Maps.newHashMap();
    boolean justbizLine = this.getBoolean("justbizLine");
    masterData.put("bizlinelist", this.getBizLineList());
    if (!justbizLine) {
        final List<Option> verList = new ArrayList<>();
        for (LuceneVersion v : LuceneVersion.values()) {
            verList.add(new Option(v.getKey(), v.getKey()));
        }
        masterData.put("tplenum", verList);
        masterData.put("usableWorkflow", this.offlineManager.getUsableWorkflow());
    }
    this.setBizResult(context, masterData);
}
Also used : LuceneVersion(com.qlangtech.tis.fullbuild.indexbuild.LuceneVersion) Func(com.qlangtech.tis.manage.spring.aop.Func)

Example 3 with LuceneVersion

use of com.qlangtech.tis.fullbuild.indexbuild.LuceneVersion in project tis by qlangtech.

the class BasicModule method getTemplateApp.

protected static Application getTemplateApp(BasicModule module) {
    // LuceneVersion.parse(this.getString("luceneversion"));
    LuceneVersion version = LuceneVersion.LUCENE_7;
    Application tplApp = module.getApplicationDAO().selectByName(version.getTemplateIndexName());
    if (tplApp == null) {
        throw new IllegalStateException("tpl version:" + version + ", index:" + version.getTemplateIndexName() + ", relevant app can not be null");
    }
    return tplApp;
}
Also used : LuceneVersion(com.qlangtech.tis.fullbuild.indexbuild.LuceneVersion)

Aggregations

LuceneVersion (com.qlangtech.tis.fullbuild.indexbuild.LuceneVersion)3 Func (com.qlangtech.tis.manage.spring.aop.Func)2