modify kuromoji admin pages

This commit is contained in:
Shinsuke Sugaya 2015-10-08 23:04:01 +09:00
parent 5b6dbc2908
commit cdf7a1408e
28 changed files with 528 additions and 394 deletions

View file

@ -17,12 +17,10 @@
package org.codelibs.fess.app.service;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.app.pager.KuromojiPager;
import org.codelibs.fess.dict.DictionaryExpiredException;
@ -30,13 +28,14 @@ import org.codelibs.fess.dict.DictionaryFile.PagingList;
import org.codelibs.fess.dict.DictionaryManager;
import org.codelibs.fess.dict.kuromoji.KuromojiFile;
import org.codelibs.fess.dict.kuromoji.KuromojiItem;
import org.dbflute.optional.OptionalEntity;
public class KuromojiService {
@Resource
protected DictionaryManager dictionaryManager;
public List<KuromojiItem> getUserDictList(final String dictId, final KuromojiPager kuromojiPager) {
final KuromojiFile kuromojiFile = getUserDictFile(dictId);
public List<KuromojiItem> getKuromojiList(final String dictId, final KuromojiPager kuromojiPager) {
final KuromojiFile kuromojiFile = getKuromojiFile(dictId);
final int pageSize = kuromojiPager.getPageSize();
final PagingList<KuromojiItem> userDictList =
@ -51,29 +50,18 @@ public class KuromojiService {
}
public KuromojiFile getUserDictFile(final String dictId) {
public KuromojiFile getKuromojiFile(final String dictId) {
return dictionaryManager.getDictionaryFile(dictId).filter(file -> file instanceof KuromojiFile).map(file -> (KuromojiFile) file)
.orElseThrow(() -> new DictionaryExpiredException());
}
public KuromojiItem getUserDict(final String dictId, final Map<String, String> paramMap) {
final KuromojiFile kuromojiFile = getUserDictFile(dictId);
final String idStr = paramMap.get("id");
if (StringUtil.isNotBlank(idStr)) {
try {
final long id = Long.parseLong(idStr);
return kuromojiFile.get(id);
} catch (final NumberFormatException e) {
// ignore
}
}
return null;
public OptionalEntity<KuromojiItem> getKuromoji(final String dictId, final long id) {
final KuromojiFile kuromojiFile = getKuromojiFile(dictId);
return kuromojiFile.get(id);
}
public void store(final String dictId, final KuromojiItem kuromojiItem) {
final KuromojiFile kuromojiFile = getUserDictFile(dictId);
final KuromojiFile kuromojiFile = getKuromojiFile(dictId);
if (kuromojiItem.getId() == 0) {
kuromojiFile.insert(kuromojiItem);
@ -83,7 +71,7 @@ public class KuromojiService {
}
public void delete(final String dictId, final KuromojiItem kuromojiItem) {
final KuromojiFile kuromojiFile = getUserDictFile(dictId);
final KuromojiFile kuromojiFile = getKuromojiFile(dictId);
kuromojiFile.delete(kuromojiItem);
}
}

View file

@ -30,6 +30,7 @@ import org.codelibs.fess.dict.DictionaryFile.PagingList;
import org.codelibs.fess.dict.DictionaryManager;
import org.codelibs.fess.dict.synonym.SynonymFile;
import org.codelibs.fess.dict.synonym.SynonymItem;
import org.dbflute.optional.OptionalEntity;
public class SynonymService {
@Resource
@ -55,7 +56,7 @@ public class SynonymService {
.orElseThrow(() -> new DictionaryExpiredException());
}
public SynonymItem getSynonym(final String dictId, final Map<String, String> paramMap) {
public OptionalEntity<SynonymItem> getSynonym(final String dictId, final Map<String, String> paramMap) {
final SynonymFile synonymFile = getSynonymFile(dictId);
final String idStr = paramMap.get("id");
@ -68,7 +69,7 @@ public class SynonymService {
}
}
return null;
return OptionalEntity.empty();
}
public void store(final String dictId, final SynonymItem synonymItem) {

View file

@ -18,15 +18,19 @@ package org.codelibs.fess.app.web.admin.dict.kuromoji;
import javax.annotation.Resource;
import org.codelibs.core.beans.util.BeanUtil;
import org.codelibs.core.lang.StringUtil;
import org.codelibs.core.misc.DynamicProperties;
import org.codelibs.fess.Constants;
import org.codelibs.fess.annotation.Token;
import org.codelibs.fess.app.pager.KuromojiPager;
import org.codelibs.fess.app.service.KuromojiService;
import org.codelibs.fess.app.web.CrudMode;
import org.codelibs.fess.app.web.admin.suggestelevateword.SuggestElevateWordEditForm;
import org.codelibs.fess.app.web.admin.dict.AdminDictAction;
import org.codelibs.fess.app.web.base.FessAdminAction;
import org.codelibs.fess.dict.kuromoji.KuromojiItem;
import org.codelibs.fess.helper.SystemHelper;
import org.dbflute.optional.OptionalEntity;
import org.lastaflute.web.Execute;
import org.lastaflute.web.callback.ActionRuntime;
import org.lastaflute.web.response.HtmlResponse;
@ -56,7 +60,7 @@ public class AdminDictKuromojiAction extends FessAdminAction {
@Override
protected void setupHtmlData(final ActionRuntime runtime) {
super.setupHtmlData(runtime);
runtime.registerData("helpLink", systemHelper.getHelpLink("userDict"));
runtime.registerData("helpLink", systemHelper.getHelpLink("kuromoji"));
}
// ===================================================================================
@ -64,6 +68,7 @@ public class AdminDictKuromojiAction extends FessAdminAction {
// ==============
@Execute
public HtmlResponse index(final SearchForm form) {
validate(form, messages -> {}, toIndexHtml());
return asHtml(path_AdminDictKuromoji_IndexJsp).renderWith(data -> {
searchPaging(data, form);
});
@ -71,6 +76,7 @@ public class AdminDictKuromojiAction extends FessAdminAction {
@Execute
public HtmlResponse list(final Integer pageNumber, final SearchForm form) {
validate(form, messages -> {}, toIndexHtml());
kuromojiPager.setCurrentPageNumber(pageNumber);
return asHtml(path_AdminDictKuromoji_IndexJsp).renderWith(data -> {
searchPaging(data, form);
@ -79,7 +85,8 @@ public class AdminDictKuromojiAction extends FessAdminAction {
@Execute
public HtmlResponse search(final SearchForm form) {
copyBeanToBean(form.searchParams, kuromojiPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
validate(form, messages -> {}, toIndexHtml());
copyBeanToBean(form, kuromojiPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
return asHtml(path_AdminDictKuromoji_IndexJsp).renderWith(data -> {
searchPaging(data, form);
});
@ -87,6 +94,7 @@ public class AdminDictKuromojiAction extends FessAdminAction {
@Execute
public HtmlResponse reset(final SearchForm form) {
validate(form, messages -> {}, toIndexHtml());
kuromojiPager.clear();
return asHtml(path_AdminDictKuromoji_IndexJsp).renderWith(data -> {
searchPaging(data, form);
@ -95,13 +103,20 @@ public class AdminDictKuromojiAction extends FessAdminAction {
@Execute
public HtmlResponse back(final SearchForm form) {
validate(form, messages -> {}, toIndexHtml());
return asHtml(path_AdminDictKuromoji_IndexJsp).renderWith(data -> {
searchPaging(data, form);
});
}
protected void searchPaging(final RenderData data, final SearchForm form) {
// TODO
// page navi
data.register("kuromojiItemItems", kuromojiService.getKuromojiList(form.dictId, kuromojiPager));
// restore from pager
BeanUtil.copyBeanToBean(kuromojiPager, form, op -> {
op.exclude(Constants.PAGER_CONVERSION_RULE);
});
}
// ===================================================================================
@ -112,51 +127,85 @@ public class AdminDictKuromojiAction extends FessAdminAction {
// ----------
@Token(save = true, validate = false)
@Execute
public HtmlResponse createpage(final EditForm form) {
form.initialize();
form.crudMode = CrudMode.CREATE;
return asHtml(path_AdminDictKuromoji_EditJsp);
public HtmlResponse createpage(final String dictId) {
return asHtml(path_AdminDictKuromoji_EditJsp).useForm(CreateForm.class, op -> {
op.setup(form -> {
form.initialize();
form.crudMode = CrudMode.CREATE;
form.dictId = dictId;
});
});
}
@Token(save = true, validate = false)
@Execute
public HtmlResponse editpage(final int crudMode, final String id, final EditForm form) {
form.crudMode = crudMode;
form.id = id;
verifyCrudMode(form, CrudMode.EDIT);
// TODO loadUserDict(form);
return asHtml(path_AdminDictKuromoji_EditJsp);
public HtmlResponse editpage(final String dictId, final int crudMode, final long id) {
verifyCrudMode(crudMode, CrudMode.EDIT);
return asHtml(path_AdminDictKuromoji_EditJsp).useForm(EditForm.class, op -> {
op.setup(form -> {
kuromojiService.getKuromoji(dictId, id).ifPresent(entity -> {
copyBeanToBean(entity, form, copyOp -> {
copyOp.excludeNull();
});
}).orElse(() -> {
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, dictId + ":" + id), toEditHtml());
});
form.crudMode = crudMode;
form.dictId = dictId;
});
});
}
@Token(save = true, validate = false)
@Execute
public HtmlResponse editagain(final EditForm form) {
verifyCrudMode(form.crudMode, CrudMode.EDIT);
validate(form, messages -> {}, toEditHtml());
return asHtml(path_AdminDictKuromoji_EditJsp);
}
@Token(save = true, validate = false)
@Execute
public HtmlResponse editfromconfirm(final EditForm form) {
validate(form, messages -> {}, toEditHtml());
form.crudMode = CrudMode.EDIT;
// TODO loadUserDict(form);
kuromojiService.getKuromoji(form.dictId, form.id).ifPresent(entity -> {
copyBeanToBean(entity, form, op -> {});
}).orElse(() -> {
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, form.getDisplayId()), toEditHtml());
});
return asHtml(path_AdminDictKuromoji_EditJsp);
}
@Token(save = true, validate = false)
@Execute
public HtmlResponse deletepage(final int crudMode, final String id, final EditForm form) {
form.crudMode = crudMode;
form.id = id;
verifyCrudMode(form, CrudMode.DELETE);
// TODO loadUserDict(form);
return asHtml(path_AdminDictKuromoji_ConfirmJsp);
public HtmlResponse deletepage(final String dictId, final int crudMode, final long id) {
verifyCrudMode(crudMode, CrudMode.DELETE);
return asHtml(path_AdminDictKuromoji_ConfirmJsp).useForm(EditForm.class, op -> {
op.setup(form -> {
kuromojiService.getKuromoji(dictId, id).ifPresent(entity -> {
copyBeanToBean(entity, form, copyOp -> {
copyOp.excludeNull();
});
}).orElse(() -> {
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, dictId + ":" + id), toEditHtml());
});
form.crudMode = crudMode;
form.dictId = dictId;
});
});
}
@Token(save = true, validate = false)
@Execute
public HtmlResponse deletefromconfirm(final EditForm form) {
validate(form, messages -> {}, toEditHtml());
form.crudMode = CrudMode.DELETE;
// TODO loadUserDict(form);
kuromojiService.getKuromoji(form.dictId, form.id).ifPresent(entity -> {
copyBeanToBean(entity, form, op -> {});
}).orElse(() -> {
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, form.getDisplayId()), toEditHtml());
});
return asHtml(path_AdminDictKuromoji_ConfirmJsp);
}
@ -164,18 +213,28 @@ public class AdminDictKuromojiAction extends FessAdminAction {
// Confirm
// -------
@Execute
public HtmlResponse confirmpage(final int crudMode, final String id, final EditForm form) {
form.crudMode = crudMode;
form.id = id;
verifyCrudMode(form, CrudMode.CONFIRM);
// TODO loadUserDict(form);
return asHtml(path_AdminDictKuromoji_ConfirmJsp);
public HtmlResponse confirmpage(final String dictId, final int crudMode, final long id) {
verifyCrudMode(crudMode, CrudMode.CONFIRM);
return asHtml(path_AdminDictKuromoji_ConfirmJsp).useForm(EditForm.class, op -> {
op.setup(form -> {
kuromojiService.getKuromoji(dictId, id).ifPresent(entity -> {
copyBeanToBean(entity, form, copyOp -> {
copyOp.excludeNull();
});
form.crudMode = crudMode;
}).orElse(() -> {
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, dictId + ":" + id), toEditHtml());
});
form.dictId = dictId;
});
});
}
@Token(save = false, validate = true, keep = true)
@Execute
public HtmlResponse confirmfromcreate(final EditForm form) {
public HtmlResponse confirmfromcreate(final CreateForm form) {
validate(form, messages -> {}, toEditHtml());
form.crudMode = CrudMode.CREATE;
return asHtml(path_AdminDictKuromoji_ConfirmJsp);
}
@ -183,6 +242,7 @@ public class AdminDictKuromojiAction extends FessAdminAction {
@Execute
public HtmlResponse confirmfromupdate(final EditForm form) {
validate(form, messages -> {}, toEditHtml());
form.crudMode = CrudMode.EDIT;
return asHtml(path_AdminDictKuromoji_ConfirmJsp);
}
@ -191,15 +251,18 @@ public class AdminDictKuromojiAction extends FessAdminAction {
// -------
@Token(save = false, validate = true)
@Execute
public HtmlResponse downloadpage(final SearchForm form) {
return asHtml(path_AdminDictKuromoji_DownloadJsp);
public HtmlResponse downloadpage(final String dictId) {
return asHtml(path_AdminDictKuromoji_DownloadJsp).useForm(DownloadForm.class, op -> {
op.setup(form -> {
form.dictId = dictId;
});
});
}
@Token(save = false, validate = true)
@Execute
public HtmlResponse download(final SearchForm form) {
public HtmlResponse download(final DownloadForm form) {
// TODO Download
return asHtml(path_AdminDictKuromoji_DownloadJsp);
}
@ -208,33 +271,12 @@ public class AdminDictKuromojiAction extends FessAdminAction {
// -------
@Token(save = false, validate = true)
@Execute
public HtmlResponse uploadpage(final UploadForm form) {
// TODO Upload
return asHtml(path_AdminDictKuromoji_UploadJsp);
}
// -----------------------------------------------------
// Actually Crud
// -------------
@Token(save = false, validate = true)
@Execute
public HtmlResponse create(final EditForm form) {
// TODO
return redirect(getClass());
}
@Token(save = false, validate = true)
@Execute
public HtmlResponse update(final EditForm form) {
// TODO
return redirect(getClass());
}
@Execute
public HtmlResponse delete(final EditForm form) {
// TODO
return redirect(getClass());
public HtmlResponse uploadpage(final String dictId) {
return asHtml(path_AdminDictKuromoji_UploadJsp).useForm(UploadForm.class, op -> {
op.setup(form -> {
form.dictId = dictId;
});
});
}
@Token(save = false, validate = true)
@ -244,24 +286,98 @@ public class AdminDictKuromojiAction extends FessAdminAction {
return redirect(getClass());
}
// -----------------------------------------------------
// Actually Crud
// -------------
@Token(save = false, validate = true)
@Execute
public HtmlResponse create(final CreateForm form) {
verifyCrudMode(form.crudMode, CrudMode.CREATE);
validate(form, messages -> {}, toEditHtml());
createKuromojiItem(form).ifPresent(entity -> {
entity.setNewToken(form.token);
entity.setNewSegmentation(form.segmentation);
entity.setNewReading(form.reading);
entity.setNewPos(form.pos);
kuromojiService.store(form.dictId, entity);
saveInfo(messages -> messages.addSuccessCrudCreateCrudTable(GLOBAL));
}).orElse(() -> {
throwValidationError(messages -> messages.addErrorsCrudFailedToCreateCrudTable(GLOBAL), toEditHtml());
});
return redirect(getClass());
}
@Token(save = false, validate = true)
@Execute
public HtmlResponse update(final EditForm form) {
verifyCrudMode(form.crudMode, CrudMode.EDIT);
validate(form, messages -> {}, toEditHtml());
createKuromojiItem(form).ifPresent(entity -> {
entity.setNewToken(form.token);
entity.setNewSegmentation(form.segmentation);
entity.setNewReading(form.reading);
entity.setNewPos(form.pos);
kuromojiService.store(form.dictId, entity);
saveInfo(messages -> messages.addSuccessCrudUpdateCrudTable(GLOBAL));
}).orElse(() -> {
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, form.getDisplayId()), toEditHtml());
});
return redirect(getClass());
}
@Execute
public HtmlResponse delete(final EditForm form) {
verifyCrudMode(form.crudMode, CrudMode.DELETE);
validate(form, messages -> {}, toEditHtml());
kuromojiService.getKuromoji(form.dictId, form.id).ifPresent(entity -> {
kuromojiService.delete(form.dictId, entity);
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
}).orElse(() -> {
throwValidationError(messages -> messages.addErrorsCrudCouldNotFindCrudTable(GLOBAL, form.getDisplayId()), toEditHtml());
});
return redirect(getClass());
}
//===================================================================================
// Assist Logic
// ============
protected void loadUserDict(final SuggestElevateWordEditForm form) {
// TODO
protected OptionalEntity<KuromojiItem> createKuromojiItem(CreateForm form) {
switch (form.crudMode) {
case CrudMode.CREATE:
if (form instanceof CreateForm) {
final KuromojiItem entity = new KuromojiItem(0, StringUtil.EMPTY, StringUtil.EMPTY, StringUtil.EMPTY, StringUtil.EMPTY);
return OptionalEntity.of(entity);
}
break;
case CrudMode.EDIT:
if (form instanceof EditForm) {
return kuromojiService.getKuromoji(form.dictId, ((EditForm) form).id);
}
break;
default:
break;
}
return OptionalEntity.empty();
}
// ===================================================================================
// Small Helper
// ============
protected void verifyCrudMode(final EditForm form, final int expectedMode) {
if (form.crudMode != expectedMode) {
protected void verifyCrudMode(final int crudMode, final int expectedMode) {
if (crudMode != expectedMode) {
throwValidationError(messages -> {
messages.addErrorsCrudInvalidMode(GLOBAL, String.valueOf(expectedMode), String.valueOf(form.crudMode));
messages.addErrorsCrudInvalidMode(GLOBAL, String.valueOf(expectedMode), String.valueOf(crudMode));
}, toEditHtml());
}
}
protected VaErrorHook toIndexHtml() {
return () -> {
return redirect(AdminDictAction.class);
};
}
protected VaErrorHook toEditHtml() {
return () -> {
return asHtml(path_AdminDictKuromoji_EditJsp);

View file

@ -0,0 +1,58 @@
/*
* Copyright 2009-2015 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.codelibs.fess.app.web.admin.dict.kuromoji;
import java.io.Serializable;
import javax.validation.constraints.Size;
import org.codelibs.fess.app.web.CrudMode;
import org.lastaflute.web.validation.Required;
/**
* @author shinsuke
* @author Keiichi Watanabe
*/
public class CreateForm implements Serializable {
private static final long serialVersionUID = 1L;
@Required
public String dictId;
public Integer crudMode;
@Required
@Size(max = 1000)
public String token;
@Required
@Size(max = 1000)
public String segmentation;
@Required
@Size(max = 1000)
public String reading;
@Required
@Size(max = 1000)
public String pos;
public void initialize() {
crudMode = CrudMode.CREATE;
}
}

View file

@ -0,0 +1,8 @@
package org.codelibs.fess.app.web.admin.dict.kuromoji;
import org.lastaflute.web.validation.Required;
public class DownloadForm {
@Required
public String dictId;
}

View file

@ -1,73 +1,15 @@
/*
* Copyright 2009-2015 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.codelibs.fess.app.web.admin.dict.kuromoji;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.lastaflute.web.validation.Required;
/**
* @author codelibs
* @author Keiichi Watanabe
*/
public class EditForm implements Serializable {
public class EditForm extends CreateForm {
private static final long serialVersionUID = 1L;
//@IntegerType
public String pageNumber;
public Map<String, String> searchParams = new HashMap<String, String>();
//@Required
public String dictId;
//@IntegerType
public int crudMode;
public String getCurrentPageNumber() {
return pageNumber;
}
//@Required(target = "confirmfromupdate,update,delete")
//@LongType
public String id;
//@Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
//@Maxbytelength(maxbytelength = 1000)
public String token;
//@Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
//@Maxbytelength(maxbytelength = 1000)
public String segmentation;
//@Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
//@Maxbytelength(maxbytelength = 1000)
public String reading;
//@Required(target = "confirmfromcreate,create,confirmfromupdate,update,delete")
//@Maxbytelength(maxbytelength = 1000)
public String pos;
//@Required(target = "upload")
//public FormFile userDictFile;
public void initialize() {
id = null;
@Required
public Long id;
public String getDisplayId() {
return dictId + ":" + id;
}
}

View file

@ -17,8 +17,8 @@
package org.codelibs.fess.app.web.admin.dict.kuromoji;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.lastaflute.web.validation.Required;
/**
* @author codelibs
@ -28,5 +28,6 @@ public class SearchForm implements Serializable {
private static final long serialVersionUID = 1L;
public Map<String, String> searchParams = new HashMap<String, String>();
@Required
public String dictId;
}

View file

@ -19,6 +19,7 @@ package org.codelibs.fess.app.web.admin.dict.kuromoji;
import java.io.Serializable;
import org.lastaflute.web.ruts.multipart.MultipartFormFile;
import org.lastaflute.web.validation.Required;
/**
* @author codelibs
@ -28,6 +29,9 @@ public class UploadForm implements Serializable {
private static final long serialVersionUID = 1L;
public MultipartFormFile userDictFile;
public MultipartFormFile kuromojiFile;
@Required
public String dictId;
}

View file

@ -23,6 +23,8 @@ import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import org.dbflute.optional.OptionalEntity;
public abstract class DictionaryFile<T extends DictionaryItem> {
protected DictionaryManager dictionaryManager;
@ -59,7 +61,7 @@ public abstract class DictionaryFile<T extends DictionaryItem> {
public abstract PagingList<T> selectList(int offset, int size);
public abstract T get(long id);
public abstract OptionalEntity<T> get(long id);
public abstract void insert(T item);

View file

@ -36,6 +36,7 @@ import org.codelibs.fess.Constants;
import org.codelibs.fess.dict.DictionaryException;
import org.codelibs.fess.dict.DictionaryFile;
import org.codelibs.fess.util.KuromojiCSVUtil;
import org.dbflute.optional.OptionalEntity;
public class KuromojiFile extends DictionaryFile<KuromojiItem> {
private static final String KUROMOJI = "kuromoji";
@ -57,13 +58,17 @@ public class KuromojiFile extends DictionaryFile<KuromojiItem> {
}
@Override
public KuromojiItem get(final long id) {
public OptionalEntity<KuromojiItem> get(final long id) {
if (kuromojiItemList == null) {
reload(null);
}
for (final KuromojiItem kuromojiItem : kuromojiItemList) {
if (id == kuromojiItem.getId()) {
return kuromojiItem;
return OptionalEntity.of(kuromojiItem);
}
}
return null;
return OptionalEntity.empty();
}
@Override

View file

@ -35,6 +35,7 @@ import org.codelibs.core.lang.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.dict.DictionaryException;
import org.codelibs.fess.dict.DictionaryFile;
import org.dbflute.optional.OptionalEntity;
public class SynonymFile extends DictionaryFile<SynonymItem> {
private static final String SYNONYM = "synonym";
@ -51,13 +52,17 @@ public class SynonymFile extends DictionaryFile<SynonymItem> {
}
@Override
public SynonymItem get(final long id) {
public OptionalEntity<SynonymItem> get(final long id) {
if (synonymItemList == null) {
reload(null);
}
for (final SynonymItem synonymItem : synonymItemList) {
if (id == synonymItem.getId()) {
return synonymItem;
return OptionalEntity.of(synonymItem);
}
}
return null;
return OptionalEntity.empty();
}
@Override

View file

@ -2963,70 +2963,70 @@ public class FessLabels extends ActionMessages {
public static final String LABELS_dict_synonym_file = "{labels.dict_synonym_file}";
/** The key of the message: UserDict List */
public static final String LABELS_dict_userdict_configuration = "{labels.dict_userdict_configuration}";
public static final String LABELS_dict_kuromoji_configuration = "{labels.dict_kuromoji_configuration}";
/** The key of the message: UserDict List */
public static final String LABELS_dict_userdict_title = "{labels.dict_userdict_title}";
public static final String LABELS_dict_kuromoji_title = "{labels.dict_kuromoji_title}";
/** The key of the message: List */
public static final String LABELS_dict_userdict_list_link = "{labels.dict_userdict_list_link}";
public static final String LABELS_dict_kuromoji_list_link = "{labels.dict_kuromoji_list_link}";
/** The key of the message: Create New */
public static final String LABELS_dict_userdict_link_create = "{labels.dict_userdict_link_create}";
public static final String LABELS_dict_kuromoji_link_create = "{labels.dict_kuromoji_link_create}";
/** The key of the message: Edit */
public static final String LABELS_dict_userdict_link_update = "{labels.dict_userdict_link_update}";
public static final String LABELS_dict_kuromoji_link_update = "{labels.dict_kuromoji_link_update}";
/** The key of the message: Delete */
public static final String LABELS_dict_userdict_link_delete = "{labels.dict_userdict_link_delete}";
public static final String LABELS_dict_kuromoji_link_delete = "{labels.dict_kuromoji_link_delete}";
/** The key of the message: Confirm */
public static final String LABELS_dict_userdict_link_confirm = "{labels.dict_userdict_link_confirm}";
public static final String LABELS_dict_kuromoji_link_confirm = "{labels.dict_kuromoji_link_confirm}";
/** The key of the message: Download */
public static final String LABELS_dict_userdict_link_download = "{labels.dict_userdict_link_download}";
public static final String LABELS_dict_kuromoji_link_download = "{labels.dict_kuromoji_link_download}";
/** The key of the message: Upload */
public static final String LABELS_dict_userdict_link_upload = "{labels.dict_userdict_link_upload}";
public static final String LABELS_dict_kuromoji_link_upload = "{labels.dict_kuromoji_link_upload}";
/** The key of the message: Token */
public static final String LABELS_dict_userdict_token = "{labels.dict_userdict_token}";
public static final String LABELS_dict_kuromoji_token = "{labels.dict_kuromoji_token}";
/** The key of the message: Segmentation */
public static final String LABELS_dict_userdict_segmentation = "{labels.dict_userdict_segmentation}";
public static final String LABELS_dict_kuromoji_segmentation = "{labels.dict_kuromoji_segmentation}";
/** The key of the message: Reading */
public static final String LABELS_dict_userdict_reading = "{labels.dict_userdict_reading}";
public static final String LABELS_dict_kuromoji_reading = "{labels.dict_kuromoji_reading}";
/** The key of the message: POS */
public static final String LABELS_dict_userdict_pos = "{labels.dict_userdict_pos}";
public static final String LABELS_dict_kuromoji_pos = "{labels.dict_kuromoji_pos}";
/** The key of the message: Create */
public static final String LABELS_dict_userdict_button_create = "{labels.dict_userdict_button_create}";
public static final String LABELS_dict_kuromoji_button_create = "{labels.dict_kuromoji_button_create}";
/** The key of the message: Back */
public static final String LABELS_dict_userdict_button_back = "{labels.dict_userdict_button_back}";
public static final String LABELS_dict_kuromoji_button_back = "{labels.dict_kuromoji_button_back}";
/** The key of the message: Confirm */
public static final String LABELS_dict_userdict_button_confirm = "{labels.dict_userdict_button_confirm}";
public static final String LABELS_dict_kuromoji_button_confirm = "{labels.dict_kuromoji_button_confirm}";
/** The key of the message: Edit */
public static final String LABELS_dict_userdict_button_edit = "{labels.dict_userdict_button_edit}";
public static final String LABELS_dict_kuromoji_button_edit = "{labels.dict_kuromoji_button_edit}";
/** The key of the message: Delete */
public static final String LABELS_dict_userdict_button_delete = "{labels.dict_userdict_button_delete}";
public static final String LABELS_dict_kuromoji_button_delete = "{labels.dict_kuromoji_button_delete}";
/** The key of the message: Update */
public static final String LABELS_dict_userdict_button_update = "{labels.dict_userdict_button_update}";
public static final String LABELS_dict_kuromoji_button_update = "{labels.dict_kuromoji_button_update}";
/** The key of the message: Download */
public static final String LABELS_dict_userdict_button_download = "{labels.dict_userdict_button_download}";
public static final String LABELS_dict_kuromoji_button_download = "{labels.dict_kuromoji_button_download}";
/** The key of the message: Upload */
public static final String LABELS_dict_userdict_button_upload = "{labels.dict_userdict_button_upload}";
public static final String LABELS_dict_kuromoji_button_upload = "{labels.dict_kuromoji_button_upload}";
/** The key of the message: UserDict File */
public static final String LABELS_dict_userdict_file = "{labels.dict_userdict_file}";
public static final String LABELS_dict_kuromoji_file = "{labels.dict_kuromoji_file}";
/** The key of the message: Doc Boost */
public static final String LABELS_boost_document_rule_configuration = "{labels.boost_document_rule_configuration}";

View file

@ -346,13 +346,13 @@ public class FessMessages extends FessLabels {
public static final String ERRORS_failed_to_upload_synonym_file = "{errors.failed_to_upload_synonym_file}";
/** The key of the message: Synonym file is not found */
public static final String ERRORS_userdict_file_is_not_found = "{errors.userdict_file_is_not_found}";
public static final String ERRORS_kuromoji_file_is_not_found = "{errors.kuromoji_file_is_not_found}";
/** The key of the message: Failed to download the UserDict file. */
public static final String ERRORS_failed_to_download_userdict_file = "{errors.failed_to_download_userdict_file}";
public static final String ERRORS_failed_to_download_kuromoji_file = "{errors.failed_to_download_kuromoji_file}";
/** The key of the message: Failed to upload the UserDict file. */
public static final String ERRORS_failed_to_upload_userdict_file = "{errors.failed_to_upload_userdict_file}";
public static final String ERRORS_failed_to_upload_kuromoji_file = "{errors.failed_to_upload_kuromoji_file}";
/** The key of the message: Password is required. */
public static final String ERRORS_blank_password = "{errors.blank_password}";
@ -463,7 +463,7 @@ public class FessMessages extends FessLabels {
public static final String SUCCESS_upload_synonym_file = "{success.upload_synonym_file}";
/** The key of the message: Uploaded UserDict file. */
public static final String SUCCESS_upload_userdict_file = "{success.upload_userdict_file}";
public static final String SUCCESS_upload_kuromoji_file = "{success.upload_kuromoji_file}";
/** The key of the message: Uploaded Additional Word file. */
public static final String SUCCESS_upload_suggest_elevate_word = "{success.upload_suggest_elevate_word}";
@ -2175,44 +2175,44 @@ public class FessMessages extends FessLabels {
}
/**
* Add the created action message for the key 'errors.userdict_file_is_not_found' with parameters.
* Add the created action message for the key 'errors.kuromoji_file_is_not_found' with parameters.
* <pre>
* message: Synonym file is not found
* </pre>
* @param property The property name for the message. (NotNull)
* @return this. (NotNull)
*/
public FessMessages addErrorsUserdictFileIsNotFound(String property) {
public FessMessages addErrorsKuromojiFileIsNotFound(String property) {
assertPropertyNotNull(property);
add(property, new ActionMessage(ERRORS_userdict_file_is_not_found));
add(property, new ActionMessage(ERRORS_kuromoji_file_is_not_found));
return this;
}
/**
* Add the created action message for the key 'errors.failed_to_download_userdict_file' with parameters.
* Add the created action message for the key 'errors.failed_to_download_kuromoji_file' with parameters.
* <pre>
* message: Failed to download the UserDict file.
* </pre>
* @param property The property name for the message. (NotNull)
* @return this. (NotNull)
*/
public FessMessages addErrorsFailedToDownloadUserdictFile(String property) {
public FessMessages addErrorsFailedToDownloadKuromojiFile(String property) {
assertPropertyNotNull(property);
add(property, new ActionMessage(ERRORS_failed_to_download_userdict_file));
add(property, new ActionMessage(ERRORS_failed_to_download_kuromoji_file));
return this;
}
/**
* Add the created action message for the key 'errors.failed_to_upload_userdict_file' with parameters.
* Add the created action message for the key 'errors.failed_to_upload_kuromoji_file' with parameters.
* <pre>
* message: Failed to upload the UserDict file.
* </pre>
* @param property The property name for the message. (NotNull)
* @return this. (NotNull)
*/
public FessMessages addErrorsFailedToUploadUserdictFile(String property) {
public FessMessages addErrorsFailedToUploadKuromojiFile(String property) {
assertPropertyNotNull(property);
add(property, new ActionMessage(ERRORS_failed_to_upload_userdict_file));
add(property, new ActionMessage(ERRORS_failed_to_upload_kuromoji_file));
return this;
}
@ -2727,16 +2727,16 @@ public class FessMessages extends FessLabels {
}
/**
* Add the created action message for the key 'success.upload_userdict_file' with parameters.
* Add the created action message for the key 'success.upload_kuromoji_file' with parameters.
* <pre>
* message: Uploaded UserDict file.
* </pre>
* @param property The property name for the message. (NotNull)
* @return this. (NotNull)
*/
public FessMessages addSuccessUploadUserdictFile(String property) {
public FessMessages addSuccessUploadKuromojiFile(String property) {
assertPropertyNotNull(property);
add(property, new ActionMessage(SUCCESS_upload_userdict_file));
add(property, new ActionMessage(SUCCESS_upload_kuromoji_file));
return this;
}

View file

@ -1014,28 +1014,28 @@ labels.dict_synonym_button_update=Update
labels.dict_synonym_button_download=Download
labels.dict_synonym_button_upload=Upload
labels.dict_synonym_file=Synonym File
labels.dict_userdict_configuration=UserDict List
labels.dict_userdict_title=UserDict List
labels.dict_userdict_list_link=List
labels.dict_userdict_link_create=Create New
labels.dict_userdict_link_update=Edit
labels.dict_userdict_link_delete=Delete
labels.dict_userdict_link_confirm=Confirm
labels.dict_userdict_link_download=Download
labels.dict_userdict_link_upload=Upload
labels.dict_userdict_token=Token
labels.dict_userdict_segmentation=Segmentation
labels.dict_userdict_reading=Reading
labels.dict_userdict_pos=POS
labels.dict_userdict_button_create=Create
labels.dict_userdict_button_back=Back
labels.dict_userdict_button_confirm=Confirm
labels.dict_userdict_button_edit=Edit
labels.dict_userdict_button_delete=Delete
labels.dict_userdict_button_update=Update
labels.dict_userdict_button_download=Download
labels.dict_userdict_button_upload=Upload
labels.dict_userdict_file=UserDict File
labels.dict_kuromoji_configuration=UserDict List
labels.dict_kuromoji_title=UserDict List
labels.dict_kuromoji_list_link=List
labels.dict_kuromoji_link_create=Create New
labels.dict_kuromoji_link_update=Edit
labels.dict_kuromoji_link_delete=Delete
labels.dict_kuromoji_link_confirm=Confirm
labels.dict_kuromoji_link_download=Download
labels.dict_kuromoji_link_upload=Upload
labels.dict_kuromoji_token=Token
labels.dict_kuromoji_segmentation=Segmentation
labels.dict_kuromoji_reading=Reading
labels.dict_kuromoji_pos=POS
labels.dict_kuromoji_button_create=Create
labels.dict_kuromoji_button_back=Back
labels.dict_kuromoji_button_confirm=Confirm
labels.dict_kuromoji_button_edit=Edit
labels.dict_kuromoji_button_delete=Delete
labels.dict_kuromoji_button_update=Update
labels.dict_kuromoji_button_download=Download
labels.dict_kuromoji_button_upload=Upload
labels.dict_kuromoji_file=UserDict File
labels.boost_document_rule_configuration=Doc Boost
labels.boost_document_rule_title_list=Doc Boost
labels.boost_document_rule_title_confirm=Confirm Doc Boost

View file

@ -1014,28 +1014,28 @@ labels.dict_synonym_button_update=Update
labels.dict_synonym_button_download=Download
labels.dict_synonym_button_upload=Upload
labels.dict_synonym_file=Synonym File
labels.dict_userdict_configuration=UserDict List
labels.dict_userdict_title=UserDict List
labels.dict_userdict_list_link=List
labels.dict_userdict_link_create=Create New
labels.dict_userdict_link_update=Edit
labels.dict_userdict_link_delete=Delete
labels.dict_userdict_link_confirm=Confirm
labels.dict_userdict_link_download=Download
labels.dict_userdict_link_upload=Upload
labels.dict_userdict_token=Token
labels.dict_userdict_segmentation=Segmentation
labels.dict_userdict_reading=Reading
labels.dict_userdict_pos=POS
labels.dict_userdict_button_create=Create
labels.dict_userdict_button_back=Back
labels.dict_userdict_button_confirm=Confirm
labels.dict_userdict_button_edit=Edit
labels.dict_userdict_button_delete=Delete
labels.dict_userdict_button_update=Update
labels.dict_userdict_button_download=Download
labels.dict_userdict_button_upload=Upload
labels.dict_userdict_file=UserDict File
labels.dict_kuromoji_configuration=UserDict List
labels.dict_kuromoji_title=UserDict List
labels.dict_kuromoji_list_link=List
labels.dict_kuromoji_link_create=Create New
labels.dict_kuromoji_link_update=Edit
labels.dict_kuromoji_link_delete=Delete
labels.dict_kuromoji_link_confirm=Confirm
labels.dict_kuromoji_link_download=Download
labels.dict_kuromoji_link_upload=Upload
labels.dict_kuromoji_token=Token
labels.dict_kuromoji_segmentation=Segmentation
labels.dict_kuromoji_reading=Reading
labels.dict_kuromoji_pos=POS
labels.dict_kuromoji_button_create=Create
labels.dict_kuromoji_button_back=Back
labels.dict_kuromoji_button_confirm=Confirm
labels.dict_kuromoji_button_edit=Edit
labels.dict_kuromoji_button_delete=Delete
labels.dict_kuromoji_button_update=Update
labels.dict_kuromoji_button_download=Download
labels.dict_kuromoji_button_upload=Upload
labels.dict_kuromoji_file=UserDict File
labels.boost_document_rule_configuration=Doc Boost
labels.boost_document_rule_title_list=Doc Boost
labels.boost_document_rule_title_confirm=Confirm Doc Boost

View file

@ -1014,28 +1014,28 @@ labels.dict_synonym_button_update=\u66f4\u65b0
labels.dict_synonym_button_download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
labels.dict_synonym_button_upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
labels.dict_synonym_file=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb
labels.dict_userdict_configuration=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u4e00\u89a7
labels.dict_userdict_title=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u4e00\u89a7
labels.dict_userdict_list_link=\u4e00\u89a7
labels.dict_userdict_link_create=\u65b0\u898f\u4f5c\u6210
labels.dict_userdict_link_update=\u7de8\u96c6
labels.dict_userdict_link_delete=\u524a\u9664
labels.dict_userdict_link_confirm=\u78ba\u8a8d
labels.dict_userdict_link_download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
labels.dict_userdict_link_upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
labels.dict_userdict_token=\u30c8\u30fc\u30af\u30f3
labels.dict_userdict_segmentation=\u5206\u5272
labels.dict_userdict_reading=\u8aad\u307f
labels.dict_userdict_pos=\u54c1\u8a5e
labels.dict_userdict_button_create=\u4f5c\u6210
labels.dict_userdict_button_back=\u623b\u308b
labels.dict_userdict_button_confirm=\u78ba\u8a8d
labels.dict_userdict_button_edit=\u7de8\u96c6
labels.dict_userdict_button_delete=\u524a\u9664
labels.dict_userdict_button_update=\u66f4\u65b0
labels.dict_userdict_button_download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
labels.dict_userdict_button_upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
labels.dict_userdict_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb
labels.dict_kuromoji_configuration=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u4e00\u89a7
labels.dict_kuromoji_title=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u4e00\u89a7
labels.dict_kuromoji_list_link=\u4e00\u89a7
labels.dict_kuromoji_link_create=\u65b0\u898f\u4f5c\u6210
labels.dict_kuromoji_link_update=\u7de8\u96c6
labels.dict_kuromoji_link_delete=\u524a\u9664
labels.dict_kuromoji_link_confirm=\u78ba\u8a8d
labels.dict_kuromoji_link_download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
labels.dict_kuromoji_link_upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
labels.dict_kuromoji_token=\u30c8\u30fc\u30af\u30f3
labels.dict_kuromoji_segmentation=\u5206\u5272
labels.dict_kuromoji_reading=\u8aad\u307f
labels.dict_kuromoji_pos=\u54c1\u8a5e
labels.dict_kuromoji_button_create=\u4f5c\u6210
labels.dict_kuromoji_button_back=\u623b\u308b
labels.dict_kuromoji_button_confirm=\u78ba\u8a8d
labels.dict_kuromoji_button_edit=\u7de8\u96c6
labels.dict_kuromoji_button_delete=\u524a\u9664
labels.dict_kuromoji_button_update=\u66f4\u65b0
labels.dict_kuromoji_button_download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
labels.dict_kuromoji_button_upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
labels.dict_kuromoji_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb
labels.boost_document_rule_configuration=\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d6\u30fc\u30b9\u30c8
labels.boost_document_rule_title_list=\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d6\u30fc\u30b9\u30c8
labels.boost_document_rule_title_confirm=\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d6\u30fc\u30b9\u30c8\u306e\u78ba\u8a8d

View file

@ -147,9 +147,9 @@ errors.failed_to_create_cache=Failed to create a cache reponse for ID:{0}.
errors.synonym_file_is_not_found=Synonym file is not found
errors.failed_to_download_synonym_file=Failed to download the Synonym file.
errors.failed_to_upload_synonym_file=Failed to upload the Synonym file.
errors.userdict_file_is_not_found=Synonym file is not found
errors.failed_to_download_userdict_file=Failed to download the UserDict file.
errors.failed_to_upload_userdict_file=Failed to upload the UserDict file.
errors.kuromoji_file_is_not_found=Synonym file is not found
errors.failed_to_download_kuromoji_file=Failed to download the UserDict file.
errors.failed_to_upload_kuromoji_file=Failed to upload the UserDict file.
errors.blank_password=Password is required.
errors.invalid_confirm_password=Confirm Password does not match.
errors.password_does_not_exist_in_session=Invalid password.
@ -188,7 +188,7 @@ success.job_started=Started job {0}.
success.job_stopped=Stopped job {0}.
success.joblog_delete_all=Deleted job logs.
success.upload_synonym_file=Uploaded Synonym file.
success.upload_userdict_file=Uploaded UserDict file.
success.upload_kuromoji_file=Uploaded UserDict file.
success.upload_suggest_elevate_word=Uploaded Additional Word file.
success.upload_suggest_bad_word=Uploaded Bad Word file.

View file

@ -76,9 +76,9 @@ errors.failed_to_create_cache=Failed to create a cache reponse for ID:{0}.
errors.synonym_file_is_not_found=Synonym file is not found
errors.failed_to_download_synonym_file=Failed to download the Synonym file.
errors.failed_to_upload_synonym_file=Failed to upload the Synonym file.
errors.userdict_file_is_not_found=Synonym file is not found
errors.failed_to_download_userdict_file=Failed to download the UserDict file.
errors.failed_to_upload_userdict_file=Failed to upload the UserDict file.
errors.kuromoji_file_is_not_found=Synonym file is not found
errors.failed_to_download_kuromoji_file=Failed to download the UserDict file.
errors.failed_to_upload_kuromoji_file=Failed to upload the UserDict file.
errors.blank_password=Password is required.
errors.invalid_confirm_password=Confirm Password does not match.
errors.password_does_not_exist_in_session=Invalid password.
@ -117,7 +117,7 @@ success.job_started=Started job {0}.
success.job_stopped=Stopped job {0}.
success.joblog_delete_all=Deleted job logs.
success.upload_synonym_file=Uploaded Synonym file.
success.upload_userdict_file=Uploaded UserDict file.
success.upload_kuromoji_file=Uploaded UserDict file.
success.upload_suggest_elevate_word=Uploaded Additional Word file. <br/>Started to restore data.
success.upload_suggest_bad_word=Uploaded Bad Word file. <br/>Started to restore data.

View file

@ -76,9 +76,9 @@ errors.failed_to_create_cache=ID:{0}\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u
errors.synonym_file_is_not_found=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
errors.failed_to_download_synonym_file=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
errors.failed_to_upload_synonym_file=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
errors.userdict_file_is_not_found=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
errors.failed_to_download_userdict_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
errors.failed_to_upload_userdict_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
errors.kuromoji_file_is_not_found=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
errors.failed_to_download_kuromoji_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
errors.failed_to_upload_kuromoji_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
errors.invalid_query_unknown=\u691c\u7d22\u30af\u30a8\u30ea\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002
errors.invalid_query_quoted=\u30af\u30aa\u30fc\u30c8\u6587\u5b57(")\u306e\u5229\u7528\u65b9\u6cd5\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002
@ -114,7 +114,7 @@ success.job_started=\u30b8\u30e7\u30d6 {0} \u3092\u958b\u59cb\u3057\u307e\u3057\
success.job_stopped=\u30b8\u30e7\u30d6 {0} \u3092\u505c\u6b62\u3057\u307e\u3057\u305f\u3002
success.joblog_delete_all=\u30b8\u30e7\u30d6\u30ed\u30b0\u3092\u524a\u9664\u3057\u307e\u3057\u305f\u3002
success.upload_synonym_file=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3057\u305f\u3002
success.upload_userdict_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3057\u305f\u3002
success.upload_kuromoji_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3057\u305f\u3002
success.upload_suggest_elevate_word=\u8ffd\u52a0\u5019\u88dc\u30d5\u30a1\u30a4\u30eb\u306e\u767b\u9332\u51e6\u7406\u3092\u958b\u59cb\u3057\u307e\u3057\u305f\u3002
success.upload_suggest_bad_word=NG\u30ef\u30fc\u30c9\u30d5\u30a1\u30a4\u30eb\u306e\u767b\u9332\u51e6\u7406\u3092\u958b\u59cb\u3057\u307e\u3057\u305f\u3002

View file

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>Fess | <la:message key="labels.dict_userdict_configuration" /></title>
<title>Fess | <la:message key="labels.dict_kuromoji_configuration" /></title>
<jsp:include page="/WEB-INF/view/common/admin/head.jsp"></jsp:include>
</head>
<body class="skin-blue sidebar-mini">
@ -18,23 +18,23 @@
<%-- Content Header --%>
<section class="content-header">
<h1>
<la:message key="labels.dict_userdict_title" />
<la:message key="labels.dict_kuromoji_title" />
</h1>
<ol class="breadcrumb">
<li><la:link href="index">
<la:message key="labels.dict_userdict_list_link" />
<li><la:link href="list">
<la:message key="labels.dict_kuromoji_list_link" />
</la:link></li>
<c:if test="${crudMode == 1}">
<li class="active"><a href="#"><la:message key="labels.dict_userdict_link_create" /></a></li>
<li class="active"><a href="#"><la:message key="labels.dict_kuromoji_link_create" /></a></li>
</c:if>
<c:if test="${crudMode == 2}">
<li class="active"><a href="#"><la:message key="labels.dict_userdict_link_update" /></a></li>
<li class="active"><a href="#"><la:message key="labels.dict_kuromoji_link_update" /></a></li>
</c:if>
<c:if test="${crudMode == 3}">
<li class="active"><a href="#"><la:message key="labels.dict_userdict_link_delete" /></a></li>
<li class="active"><a href="#"><la:message key="labels.dict_kuromoji_link_delete" /></a></li>
</c:if>
<c:if test="${crudMode == 4}">
<li class="active"><a href="#"><la:message key="labels.dict_userdict_link_confirm" /></a></li>
<li class="active"><a href="#"><la:message key="labels.dict_kuromoji_link_confirm" /></a></li>
</c:if>
</ol>
</section>
@ -44,6 +44,8 @@
<%-- Form --%>
<la:form>
<la:hidden property="crudMode" />
<la:hidden property="dictId" />
<la:hidden property="id" />
<div class="row">
<div class="col-md-12">
<div class="box">
@ -51,65 +53,65 @@
<div class="box-header with-border">
<h3 class="box-title">
<c:if test="${crudMode == 1}">
<la:message key="labels.dict_userdict_link_create" />
<la:message key="labels.dict_kuromoji_link_create" />
</c:if>
<c:if test="${crudMode == 2}">
<la:message key="labels.dict_userdict_link_update" />
<la:message key="labels.dict_kuromoji_link_update" />
</c:if>
<c:if test="${crudMode == 3}">
<la:message key="labels.dict_userdict_link_delete" />
<la:message key="labels.dict_kuromoji_link_delete" />
</c:if>
<c:if test="${crudMode == 4}">
<la:message key="labels.dict_userdict_link_confirm" />
<la:message key="labels.dict_kuromoji_link_confirm" />
</c:if>
</h3>
<div class="box-tools pull-right">
<span class="label label-default">
<la:link href="../index">
<la:link href="../list">
<la:message key="labels.dict_list_link" />
</la:link>
</span>
<span class="label label-default">
<la:link href="index?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_list_link" />
<la:link href="list/1?dictId=${f:u(dictId)}">
<la:message key="labels.dict_kuromoji_list_link" />
</la:link>
</span>
<c:if test="${crudMode == 1}">
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_link_create" />
<la:message key="labels.dict_kuromoji_link_create" />
</a>
</span>
</c:if>
<c:if test="${crudMode == 2}">
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_link_update" />
<la:message key="labels.dict_kuromoji_link_update" />
</a>
</span>
</c:if>
<c:if test="${crudMode == 3}">
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_link_delete" />
<la:message key="labels.dict_kuromoji_link_delete" />
</a>
</span>
</c:if>
<c:if test="${crudMode == 4}">
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_link_confirm" />
<la:message key="labels.dict_kuromoji_link_confirm" />
</a>
</span>
</c:if>
<span class="label label-default">
<la:link href="downloadpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_download" />
<la:link href="downloadpage/${f:u(dictId)}">
<la:message key="labels.dict_kuromoji_link_download" />
</la:link>
</span>
<span class="label label-default">
<la:link href="uploadpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_upload" />
<la:link href="uploadpage/${f:u(dictId)}">
<la:message key="labels.dict_kuromoji_link_upload" />
</la:link>
</span>
</div>
@ -131,19 +133,19 @@
<tbody>
<tr>
<th style="width: 150px;"><la:message
key="labels.dict_userdict_token" /></th>
key="labels.dict_kuromoji_token" /></th>
<td>${f:h(token)}<la:hidden property="token" /></td>
</tr>
<tr>
<th><la:message key="labels.dict_userdict_segmentation" /></th>
<th><la:message key="labels.dict_kuromoji_segmentation" /></th>
<td>${f:h(segmentation)}<la:hidden property="segmentation" /></td>
</tr>
<tr>
<th><la:message key="labels.dict_userdict_reading" /></th>
<th><la:message key="labels.dict_kuromoji_reading" /></th>
<td>${f:h(reading)}<la:hidden property="reading" /></td>
</tr>
<tr>
<th><la:message key="labels.dict_userdict_pos" /></th>
<th><la:message key="labels.dict_kuromoji_pos" /></th>
<td>${f:h(pos)}<la:hidden property="pos" /></td>
</tr>
</tbody>
@ -153,30 +155,30 @@
<%-- Box Footer --%>
<div class="box-footer">
<c:if test="${crudMode == 1}">
<input type="submit" class="btn" name="editagain" value="<la:message key="labels.dict_userdict_button_back"/>" />
<input type="submit" class="btn" name="editagain" value="<la:message key="labels.dict_kuromoji_button_back"/>" />
<input type="submit" class="btn btn-primary" name="create"
value="<la:message key="labels.dict_userdict_button_create"/>"
value="<la:message key="labels.dict_kuromoji_button_create"/>"
/>
</c:if>
<c:if test="${crudMode == 2}">
<input type="submit" class="btn" name="editagain" value="<la:message key="labels.dict_userdict_button_back"/>" />
<input type="submit" class="btn" name="editagain" value="<la:message key="labels.dict_kuromoji_button_back"/>" />
<input type="submit" class="btn btn-primary" name="update"
value="<la:message key="labels.dict_userdict_button_update"/>"
value="<la:message key="labels.dict_kuromoji_button_update"/>"
/>
</c:if>
<c:if test="${crudMode == 3}">
<input type="submit" class="btn" name="back" value="<la:message key="labels.dict_userdict_button_back"/>" />
<input type="submit" class="btn" name="back" value="<la:message key="labels.dict_kuromoji_button_back"/>" />
<input type="submit" class="btn btn-primary" name="delete"
value="<la:message key="labels.dict_userdict_button_delete"/>"
value="<la:message key="labels.dict_kuromoji_button_delete"/>"
/>
</c:if>
<c:if test="${crudMode == 4}">
<input type="submit" class="btn" name="back" value="<la:message key="labels.dict_userdict_button_back"/>" />
<input type="submit" class="btn" name="back" value="<la:message key="labels.dict_kuromoji_button_back"/>" />
<input type="submit" class="btn" name="editfromconfirm"
value="<la:message key="labels.dict_userdict_button_edit"/>"
value="<la:message key="labels.dict_kuromoji_button_edit"/>"
/>
<input type="submit" class="btn" name="deletefromconfirm"
value="<la:message key="labels.dict_userdict_button_delete"/>"
value="<la:message key="labels.dict_kuromoji_button_delete"/>"
/>
</c:if>
</div>

View file

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>Fess | <la:message key="labels.dict_userdict_configuration" /></title>
<title>Fess | <la:message key="labels.dict_kuromoji_configuration" /></title>
<jsp:include page="/WEB-INF/view/common/admin/head.jsp"></jsp:include>
</head>
<body class="skin-blue sidebar-mini">
@ -18,11 +18,11 @@
<%-- Content Header --%>
<section class="content-header">
<h1>
<la:message key="labels.dict_userdict_title" />
<la:message key="labels.dict_kuromoji_title" />
</h1>
<ol class="breadcrumb">
<li class="active"><la:link href="index">
<la:message key="labels.dict_userdict_link_download" />
<la:message key="labels.dict_kuromoji_link_download" />
</la:link></li>
</ol>
</section>
@ -35,7 +35,7 @@
<%-- Box Header --%>
<div class="box-header with-border">
<h3 class="box-title">
<la:message key="labels.dict_userdict_link_download" />
<la:message key="labels.dict_kuromoji_link_download" />
</h3>
<div class="box-tools pull-right">
<span class="label label-default">
@ -45,22 +45,22 @@
</span>
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_list_link" />
<la:message key="labels.dict_kuromoji_list_link" />
</a>
</span>
<span class="label label-default">
<la:link href="createpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_create" />
<la:message key="labels.dict_kuromoji_link_create" />
</la:link>
</span>
<span class="label label-default">
<la:link href="downloadpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_download" />
<la:message key="labels.dict_kuromoji_link_download" />
</la:link>
</span>
<span class="label label-default">
<la:link href="uploadpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_upload" />
<la:message key="labels.dict_kuromoji_link_upload" />
</la:link>
</span>
</div>
@ -88,7 +88,7 @@
<td style="form-control">
<input type="submit"
class="btn small" name="download"
value="<la:message key="labels.dict_userdict_button_download"/>" />
value="<la:message key="labels.dict_kuromoji_button_download"/>" />
</td>
</tr>
</tbody>

View file

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>Fess | <la:message key="labels.dict_userdict_configuration" /></title>
<title>Fess | <la:message key="labels.dict_kuromoji_configuration" /></title>
<jsp:include page="/WEB-INF/view/common/admin/head.jsp"></jsp:include>
</head>
<body class="skin-blue sidebar-mini">
@ -17,7 +17,7 @@
<%-- Content Header --%>
<section class="content-header">
<h1>
<la:message key="labels.dict_userdict_title" />
<la:message key="labels.dict_kuromoji_title" />
</h1>
</section>
@ -37,59 +37,59 @@
<div class="box-header with-border">
<h3 class="box-title">
<c:if test="${crudMode == 1}">
<la:message key="labels.dict_userdict_link_create" />
<la:message key="labels.dict_kuromoji_link_create" />
</c:if>
<c:if test="${crudMode == 2}">
<la:message key="labels.dict_userdict_link_update" />
<la:message key="labels.dict_kuromoji_link_update" />
</c:if>
</h3>
<div class="box-tools pull-right">
<span class="label label-default">
<la:link href="../index">
<la:link href="../list">
<la:message key="labels.dict_list_link" />
</la:link>
</span>
<span class="label label-default">
<la:link href="index?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_list_link" />
<la:link href="list/1?dictId=${f:u(dictId)}">
<la:message key="labels.dict_kuromoji_list_link" />
</la:link>
</span>
<c:if test="${crudMode == 1}">
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_link_create" />
<la:message key="labels.dict_kuromoji_link_create" />
</a>
</span>
</c:if>
<c:if test="${crudMode == 2}">
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_link_update" />
<la:message key="labels.dict_kuromoji_link_update" />
</a>
</span>
</c:if>
<c:if test="${crudMode == 3}">
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_link_delete" />
<la:message key="labels.dict_kuromoji_link_delete" />
</a>
</span>
</c:if>
<c:if test="${crudMode == 4}">
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_link_confirm" />
<la:message key="labels.dict_kuromoji_link_confirm" />
</a>
</span>
</c:if>
<span class="label label-default">
<la:link href="downloadpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_download" />
<la:link href="downloadpage/${f:u(dictId)}">
<la:message key="labels.dict_kuromoji_link_download" />
</la:link>
</span>
<span class="label label-default">
<la:link href="uploadpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_upload" />
<la:link href="uploadpage/${f:u(dictId)}">
<la:message key="labels.dict_kuromoji_link_upload" />
</la:link>
</span>
</div>
@ -108,19 +108,19 @@
<%-- Form Fields --%>
<div class="form-group">
<label for="token"><la:message key="labels.dict_userdict_token" /></label>
<label for="token"><la:message key="labels.dict_kuromoji_token" /></label>
<la:text property="token" styleClass="form-control" />
</div>
<div class="form-group">
<label for="segmentation"><la:message key="labels.dict_userdict_segmentation" /></label>
<label for="segmentation"><la:message key="labels.dict_kuromoji_segmentation" /></label>
<la:text property="segmentation" styleClass="form-control" />
</div>
<div class="form-group">
<label for="reading"><la:message key="labels.dict_userdict_reading" /></label>
<label for="reading"><la:message key="labels.dict_kuromoji_reading" /></label>
<la:text property="reading" styleClass="form-control" />
</div>
<div class="form-group">
<label for="pos"><la:message key="labels.dict_userdict_pos" /></label>
<label for="pos"><la:message key="labels.dict_kuromoji_pos" /></label>
<la:text property="pos" styleClass="form-control" />
</div>
</div>

View file

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>Fess | <la:message key="labels.dict_userdict_configuration" /></title>
<title>Fess | <la:message key="labels.dict_kuromoji_configuration" /></title>
<jsp:include page="/WEB-INF/view/common/admin/head.jsp"></jsp:include>
</head>
<body class="skin-blue sidebar-mini">
@ -20,7 +20,7 @@
</h1>
<ol class="breadcrumb">
<li class="active"><la:link href="/admin/dict/">
<la:message key="labels.dict_userdict_link_list" />
<la:message key="labels.dict_kuromoji_link_list" />
</la:link></li>
</ol>
</section>
@ -34,7 +34,7 @@
</p>
<p>
<la:link href="index">
<la:message key="labels.dict_userdict_button_back" />
<la:message key="labels.dict_kuromoji_button_back" />
</la:link>
</p>
</div>
@ -49,7 +49,7 @@
</body>
</html>
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><tilela:insert template="/WEB-INF/view/common/admin/layout.jsp" flush="true">
<tilela:put name="title"><la:message key="labels.dict_userdict_configuration" /></tilela:put>
<tilela:put name="title"><la:message key="labels.dict_kuromoji_configuration" /></tilela:put>
<tilela:put name="header" value="/WEB-INF/view/common/admin/header.jsp" />
<tilela:put name="footer" value="/WEB-INF/view/common/admin/footer.jsp" />
<tilela:put name="menu" value="/WEB-INF/view/common/admin/menu.jsp" />

View file

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>Fess | <la:message key="labels.dict_userdict_configuration" /></title>
<title>Fess | <la:message key="labels.dict_kuromoji_configuration" /></title>
<jsp:include page="/WEB-INF/view/common/admin/head.jsp"></jsp:include>
</head>
<body class="skin-blue sidebar-mini">
@ -18,11 +18,11 @@
<%-- Content Header --%>
<section class="content-header">
<h1>
<la:message key="labels.dict_userdict_title" />
<la:message key="labels.dict_kuromoji_title" />
</h1>
<ol class="breadcrumb">
<li class="active"><la:link href="">
<la:message key="labels.dict_userdict_list_link" />
<la:message key="labels.dict_kuromoji_list_link" />
</la:link></li>
</ol>
</section>
@ -35,7 +35,7 @@
<%-- Box Header --%>
<div class="box-header with-border">
<h3 class="box-title">
<la:message key="labels.dict_userdict_list_link" />
<la:message key="labels.dict_kuromoji_list_link" />
</h3>
<div class="box-tools pull-right">
<span class="label label-default">
@ -45,22 +45,22 @@
</span>
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_list_link" />
<la:message key="labels.dict_kuromoji_list_link" />
</a>
</span>
<span class="label label-default">
<la:link href="createpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_create" />
<la:link href="createpage/${f:u(dictId)}">
<la:message key="labels.dict_kuromoji_link_create" />
</la:link>
</span>
<span class="label label-default">
<la:link href="downloadpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_download" />
<la:link href="downloadpage/${f:u(dictId)}">
<la:message key="labels.dict_kuromoji_link_download" />
</la:link>
</span>
<span class="label label-default">
<la:link href="uploadpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_upload" />
<la:link href="uploadpage/${f:u(dictId)}">
<la:message key="labels.dict_kuromoji_link_upload" />
</la:link>
</span>
</div>
@ -77,27 +77,27 @@
<la:errors />
</div>
<%-- List --%>
<c:if test="${userDictPager.allRecordCount == 0}">
<c:if test="${kuromojiPager.allRecordCount == 0}">
<p class="alert-message warning">
<la:message key="labels.list_could_not_find_crud_table" />
</p>
</c:if>
<c:if test="${userDictPager.allRecordCount > 0}">
<c:if test="${kuromojiPager.allRecordCount > 0}">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
<la:message
key="labels.dict_userdict_token" /></th>
key="labels.dict_kuromoji_token" /></th>
<th>
<la:message
key="labels.dict_userdict_reading" /></th>
key="labels.dict_kuromoji_reading" /></th>
</tr>
</tr>
</thead>
<tbody>
<c:forEach var="data" varStatus="s" items="${userDictItemItems}">
<tr class="${s.index % 2 == 0 ? 'row1' : 'row2'}" data-href="${contextPath}/admin/dict/userdict/confirmpage/${f:u(dictId)}/4/${f:u(data.id)}">
<c:forEach var="data" varStatus="s" items="${kuromojiItemItems}">
<tr class="${s.index % 2 == 0 ? 'row1' : 'row2'}" data-href="${contextPath}/admin/dict/kuromoji/confirmpage/${f:u(dictId)}/4/${f:u(data.id)}">
<td>${f:h(data.token)}</td>
<td>${f:h(data.reading)}</td>
</tr>
@ -109,30 +109,30 @@
<%-- Box Footer --%>
<div class="box-footer">
<%-- Paging Info --%>
<span><la:message key="labels.pagination_page_guide_msg" arg0="${f:h(userDictPager.currentPageNumber)}"
arg1="${f:h(userDictPager.allPageCount)}" arg2="${f:h(userDictPager.allRecordCount)}"
<span><la:message key="labels.pagination_page_guide_msg" arg0="${f:h(kuromojiPager.currentPageNumber)}"
arg1="${f:h(kuromojiPager.allPageCount)}" arg2="${f:h(kuromojiPager.allRecordCount)}"
/></span>
<%-- Paging Navigation --%>
<ul class="pagination pagination-sm no-margin pull-right">
<c:if test="${userDictPager.existPrePage}">
<li class="prev"><la:link href="list/${userDictPager.currentPageNumber - 1}">
<c:if test="${kuromojiPager.existPrePage}">
<li class="prev"><la:link href="list/${kuromojiPager.currentPageNumber - 1}">
<la:message key="labels.dict_link_prev_page" />
</la:link></li>
</c:if>
<c:if test="${!userDictPager.existPrePage}">
<c:if test="${!kuromojiPager.existPrePage}">
<li class="prev disabled"><a href="#"><la:message key="labels.dict_link_prev_page" /></a></li>
</c:if>
<c:forEach var="p" varStatus="s" items="${userDictPager.pageNumberList}">
<li <c:if test="${p == userDictPager.currentPageNumber}">class="active"</c:if>><la:link href="list/${p}">${p}</la:link>
<c:forEach var="p" varStatus="s" items="${kuromojiPager.pageNumberList}">
<li <c:if test="${p == kuromojiPager.currentPageNumber}">class="active"</c:if>><la:link href="list/${p}">${p}</la:link>
</li>
</c:forEach>
<c:if test="${userDictPager.existNextPage}">
<li class="next"><la:link href="list/${userDictPager.currentPageNumber + 1}">
<c:if test="${kuromojiPager.existNextPage}">
<li class="next"><la:link href="list/${kuromojiPager.currentPageNumber + 1}">
<la:message key="labels.dict_link_next_page" />
</la:link></li>
</c:if>
<c:if test="${!userDictPager.existNextPage}">
<c:if test="${!kuromojiPager.existNextPage}">
<li class="next disabled"><a href="#"><la:message key="labels.dict_link_next_page" /></a></li>
</c:if>
</ul>

View file

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>Fess | <la:message key="labels.dict_userdict_configuration" /></title>
<title>Fess | <la:message key="labels.dict_kuromoji_configuration" /></title>
<jsp:include page="/WEB-INF/view/common/admin/head.jsp"></jsp:include>
</head>
<body class="skin-blue sidebar-mini">
@ -18,11 +18,11 @@
<%-- Content Header --%>
<section class="content-header">
<h1>
<la:message key="labels.dict_userdict_title" />
<la:message key="labels.dict_kuromoji_title" />
</h1>
<ol class="breadcrumb">
<li class="active"><la:link href="index">
<la:message key="labels.dict_userdict_link_upload" />
<la:message key="labels.dict_kuromoji_link_upload" />
</la:link></li>
</ol>
</section>
@ -35,7 +35,7 @@
<%-- Box Header --%>
<div class="box-header with-border">
<h3 class="box-title">
<la:message key="labels.dict_userdict_link_upload" />
<la:message key="labels.dict_kuromoji_link_upload" />
</h3>
<div class="box-tools pull-right">
<span class="label label-default">
@ -45,22 +45,22 @@
</span>
<span class="label label-default">
<a href="#">
<la:message key="labels.dict_userdict_list_link" />
<la:message key="labels.dict_kuromoji_list_link" />
</a>
</span>
<span class="label label-default">
<la:link href="createpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_create" />
<la:message key="labels.dict_kuromoji_link_create" />
</la:link>
</span>
<span class="label label-default">
<la:link href="downloadpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_download" />
<la:message key="labels.dict_kuromoji_link_download" />
</la:link>
</span>
<span class="label label-default">
<la:link href="uploadpage?dictId=${f:u(dictId)}">
<la:message key="labels.dict_userdict_link_upload" />
<la:message key="labels.dict_kuromoji_link_upload" />
</la:link>
</span>
</div>
@ -88,10 +88,10 @@
</tr>
<tr>
<th>
<la:message key="labels.dict_userdict_file" />
<la:message key="labels.dict_kuromoji_file" />
</th>
<td>
<input type="file" name="userdictFile" />
<input type="file" name="kuromojiFile" />
</td>
</tr>
</tbody>
@ -99,7 +99,7 @@
<tr>
<td colspan="2">
<input type="submit" class="btn small" name="upload"
value="<la:message key="labels.dict_userdict_button_upload"/>" />
value="<la:message key="labels.dict_kuromoji_button_upload"/>" />
</td>
</tr>
</tfoot>

View file

@ -44,6 +44,8 @@
<%-- Form --%>
<la:form>
<la:hidden property="crudMode" />
<la:hidden property="dictId" />
<la:hidden property="id" />
<div class="row">
<div class="col-md-12">
<div class="box">
@ -70,7 +72,7 @@
</la:link>
</span>
<span class="label label-default">
<la:link href="index?dictId=${f:u(dictId)}">
<la:link href="list/1?dictId=${f:u(dictId)}">
<la:message key="labels.dict_synonym_list_link" />
</la:link>
</span>
@ -103,12 +105,12 @@
</span>
</c:if>
<span class="label label-default">
<la:link href="downloadpage?dictId=${f:u(dictId)}">
<la:link href="downloadpage/${f:u(dictId)}">
<la:message key="labels.dict_synonym_link_download" />
</la:link>
</span>
<span class="label label-default">
<la:link href="uploadpage?dictId=${f:u(dictId)}">
<la:link href="uploadpage/${f:u(dictId)}">
<la:message key="labels.dict_synonym_link_upload" />
</la:link>
</span>

View file

@ -45,12 +45,12 @@
</h3>
<div class="box-tools pull-right">
<span class="label label-default">
<la:link href="../index">
<la:link href="../list">
<la:message key="labels.dict_list_link" />
</la:link>
</span>
<span class="label label-default">
<la:link href="index?dictId=${f:u(dictId)}">
<la:link href="list/1?dictId=${f:u(dictId)}">
<la:message key="labels.dict_synonym_list_link" />
</la:link>
</span>

View file

@ -21,7 +21,7 @@
<la:message key="labels.dict_synonym_title" />
</h1>
<ol class="breadcrumb">
<li class="active"><la:link href="index">
<li class="active"><la:link href="list">
<la:message key="labels.dict_synonym_list_link" />
</la:link></li>
</ol>
@ -49,17 +49,17 @@
</a>
</span>
<span class="label label-default">
<la:link href="createpage?dictId=${f:u(dictId)}">
<la:link href="createpage/${f:u(dictId)}">
<la:message key="labels.dict_synonym_link_create" />
</la:link>
</span>
<span class="label label-default">
<la:link href="downloadpage?dictId=${f:u(dictId)}">
<la:link href="downloadpage/${f:u(dictId)}">
<la:message key="labels.dict_synonym_link_download" />
</la:link>
</span>
<span class="label label-default">
<la:link href="uploadpage?dictId=${f:u(dictId)}">
<la:link href="uploadpage/${f:u(dictId)}">
<la:message key="labels.dict_synonym_link_upload" />
</la:link>
</span>