update codes with freegen
This commit is contained in:
parent
d47911f41c
commit
c3315978ba
11 changed files with 42 additions and 3587 deletions
2
pom.xml
2
pom.xml
|
@ -39,7 +39,7 @@
|
|||
|
||||
<!-- Main Framework -->
|
||||
<dbflute.version>1.1.0-sp8</dbflute.version>
|
||||
<lastaflute.version>0.6.4-RC3</lastaflute.version>
|
||||
<lastaflute.version>0.6.4</lastaflute.version>
|
||||
<lasta.taglib.version>0.6.0</lasta.taglib.version>
|
||||
<servlet.version>3.1.0</servlet.version>
|
||||
<jsp.version>2.3.1</jsp.version>
|
||||
|
|
|
@ -64,7 +64,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
// ==============
|
||||
@Execute
|
||||
public HtmlResponse index(final UserDictSearchForm form) {
|
||||
return asHtml(path_AdminDictUserDict_IndexJsp).renderWith(data -> {
|
||||
return asHtml(path_AdminDictUserdict_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse list(final Integer pageNumber, final UserDictSearchForm form) {
|
||||
userDictPager.setCurrentPageNumber(pageNumber);
|
||||
return asHtml(path_AdminDictUserDict_IndexJsp).renderWith(data -> {
|
||||
return asHtml(path_AdminDictUserdict_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse search(final UserDictSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, userDictPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminDictUserDict_IndexJsp).renderWith(data -> {
|
||||
return asHtml(path_AdminDictUserdict_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
}
|
||||
|
@ -88,14 +88,14 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse reset(final UserDictSearchForm form) {
|
||||
userDictPager.clear();
|
||||
return asHtml(path_AdminDictUserDict_IndexJsp).renderWith(data -> {
|
||||
return asHtml(path_AdminDictUserdict_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
}
|
||||
|
||||
@Execute
|
||||
public HtmlResponse back(final UserDictSearchForm form) {
|
||||
return asHtml(path_AdminDictUserDict_IndexJsp).renderWith(data -> {
|
||||
return asHtml(path_AdminDictUserdict_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
public HtmlResponse createpage(final UserDictEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminDictUserDict_EditJsp);
|
||||
return asHtml(path_AdminDictUserdict_EditJsp);
|
||||
}
|
||||
|
||||
@Token(save = true, validate = false)
|
||||
|
@ -125,13 +125,13 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
form.id = id;
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
// TODO loadUserDict(form);
|
||||
return asHtml(path_AdminDictUserDict_EditJsp);
|
||||
return asHtml(path_AdminDictUserdict_EditJsp);
|
||||
}
|
||||
|
||||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editagain(final UserDictEditForm form) {
|
||||
return asHtml(path_AdminDictUserDict_EditJsp);
|
||||
return asHtml(path_AdminDictUserdict_EditJsp);
|
||||
}
|
||||
|
||||
@Token(save = true, validate = false)
|
||||
|
@ -139,7 +139,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
public HtmlResponse editfromconfirm(final UserDictEditForm form) {
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
// TODO loadUserDict(form);
|
||||
return asHtml(path_AdminDictUserDict_EditJsp);
|
||||
return asHtml(path_AdminDictUserdict_EditJsp);
|
||||
}
|
||||
|
||||
@Token(save = true, validate = false)
|
||||
|
@ -149,7 +149,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
form.id = id;
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
// TODO loadUserDict(form);
|
||||
return asHtml(path_AdminDictUserDict_ConfirmJsp);
|
||||
return asHtml(path_AdminDictUserdict_ConfirmJsp);
|
||||
}
|
||||
|
||||
@Token(save = true, validate = false)
|
||||
|
@ -157,7 +157,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
public HtmlResponse deletefromconfirm(final UserDictEditForm form) {
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
// TODO loadUserDict(form);
|
||||
return asHtml(path_AdminDictUserDict_ConfirmJsp);
|
||||
return asHtml(path_AdminDictUserdict_ConfirmJsp);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
|
@ -169,21 +169,21 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
form.id = id;
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
// TODO loadUserDict(form);
|
||||
return asHtml(path_AdminDictUserDict_ConfirmJsp);
|
||||
return asHtml(path_AdminDictUserdict_ConfirmJsp);
|
||||
}
|
||||
|
||||
@Token(save = false, validate = true, keep = true)
|
||||
@Execute
|
||||
public HtmlResponse confirmfromcreate(final UserDictEditForm form) {
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
return asHtml(path_AdminDictUserDict_ConfirmJsp);
|
||||
return asHtml(path_AdminDictUserdict_ConfirmJsp);
|
||||
}
|
||||
|
||||
@Token(save = false, validate = true, keep = true)
|
||||
@Execute
|
||||
public HtmlResponse confirmfromupdate(final UserDictEditForm form) {
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
return asHtml(path_AdminDictUserDict_ConfirmJsp);
|
||||
return asHtml(path_AdminDictUserdict_ConfirmJsp);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
|
@ -192,7 +192,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
@Token(save = false, validate = true)
|
||||
@Execute
|
||||
public HtmlResponse downloadpage(final UserDictSearchForm form) {
|
||||
return asHtml(path_AdminDictUserDict_DownloadJsp);
|
||||
return asHtml(path_AdminDictUserdict_DownloadJsp);
|
||||
}
|
||||
|
||||
@Token(save = false, validate = true)
|
||||
|
@ -200,7 +200,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
public HtmlResponse download(final UserDictSearchForm form) {
|
||||
// TODO Download
|
||||
|
||||
return asHtml(path_AdminDictUserDict_DownloadJsp);
|
||||
return asHtml(path_AdminDictUserdict_DownloadJsp);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
|
@ -211,7 +211,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
public HtmlResponse uploadpage(final UserDictUploadForm form) {
|
||||
// TODO Upload
|
||||
|
||||
return asHtml(path_AdminDictUserDict_UploadJsp);
|
||||
return asHtml(path_AdminDictUserdict_UploadJsp);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
|
@ -264,7 +264,7 @@ public class AdminDictUserdictAction extends FessAdminAction {
|
|||
|
||||
protected VaErrorHook toEditHtml() {
|
||||
return () -> {
|
||||
return asHtml(path_AdminDictUserDict_EditJsp);
|
||||
return asHtml(path_AdminDictUserdict_EditJsp);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@ import org.codelibs.fess.helper.SystemHelper;
|
|||
import org.codelibs.fess.util.QueryResponseList;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.lastaflute.taglib.function.LaFunctions;
|
||||
import org.lastaflute.web.Execute;
|
||||
import org.lastaflute.web.callback.ActionRuntime;
|
||||
import org.lastaflute.web.response.HtmlResponse;
|
||||
|
|
|
@ -55,11 +55,11 @@ public abstract class BsUserBhv extends AbstractBehavior<User, UserCB> {
|
|||
protected <RESULT extends User> RESULT createEntity(Map<String, Object> source, Class<? extends RESULT> entityType) {
|
||||
try {
|
||||
final RESULT result = entityType.newInstance();
|
||||
result.setGroups(DfTypeUtil.toString(source.get("groups")));
|
||||
result.setGroups(toStringArray(source.get("groups")));
|
||||
result.setId(DfTypeUtil.toString(source.get("id")));
|
||||
result.setName(DfTypeUtil.toString(source.get("name")));
|
||||
result.setPassword(DfTypeUtil.toString(source.get("password")));
|
||||
result.setRoles(DfTypeUtil.toString(source.get("roles")));
|
||||
result.setRoles(toStringArray(source.get("roles")));
|
||||
return result;
|
||||
} catch (InstantiationException | IllegalAccessException e) {
|
||||
final String msg = "Cannot create a new instance: " + entityType.getName();
|
||||
|
|
|
@ -27,7 +27,7 @@ public class BsUser extends AbstractEntity {
|
|||
// Attribute
|
||||
// =========
|
||||
/** groups */
|
||||
protected String groups;
|
||||
protected String[] groups;
|
||||
|
||||
/** name */
|
||||
protected String name;
|
||||
|
@ -36,19 +36,19 @@ public class BsUser extends AbstractEntity {
|
|||
protected String password;
|
||||
|
||||
/** roles */
|
||||
protected String roles;
|
||||
protected String[] roles;
|
||||
|
||||
// [Referrers] *comment only
|
||||
|
||||
// ===================================================================================
|
||||
// Accessor
|
||||
// ========
|
||||
public String getGroups() {
|
||||
public String[] getGroups() {
|
||||
checkSpecifiedProperty("groups");
|
||||
return groups;
|
||||
}
|
||||
|
||||
public void setGroups(String value) {
|
||||
public void setGroups(String[] value) {
|
||||
registerModifiedProperty("groups");
|
||||
this.groups = value;
|
||||
}
|
||||
|
@ -83,12 +83,12 @@ public class BsUser extends AbstractEntity {
|
|||
this.password = value;
|
||||
}
|
||||
|
||||
public String getRoles() {
|
||||
public String[] getRoles() {
|
||||
checkSpecifiedProperty("roles");
|
||||
return roles;
|
||||
}
|
||||
|
||||
public void setRoles(String value) {
|
||||
public void setRoles(String[] value) {
|
||||
registerModifiedProperty("roles");
|
||||
this.roles = value;
|
||||
}
|
||||
|
|
|
@ -35,11 +35,11 @@ public class UserDbm extends AbstractDBMeta {
|
|||
// ---------------
|
||||
protected final Map<String, PropertyGateway> _epgMap = newHashMap();
|
||||
{
|
||||
setupEpg(_epgMap, et -> ((User) et).getGroups(), (et, vl) -> ((User) et).setGroups(DfTypeUtil.toString(vl)), "groups");
|
||||
setupEpg(_epgMap, et -> ((User) et).getGroups(), (et, vl) -> ((User) et).setGroups((String[]) vl), "groups");
|
||||
setupEpg(_epgMap, et -> ((User) et).getId(), (et, vl) -> ((User) et).setId(DfTypeUtil.toString(vl)), "id");
|
||||
setupEpg(_epgMap, et -> ((User) et).getName(), (et, vl) -> ((User) et).setName(DfTypeUtil.toString(vl)), "name");
|
||||
setupEpg(_epgMap, et -> ((User) et).getPassword(), (et, vl) -> ((User) et).setPassword(DfTypeUtil.toString(vl)), "password");
|
||||
setupEpg(_epgMap, et -> ((User) et).getRoles(), (et, vl) -> ((User) et).setRoles(DfTypeUtil.toString(vl)), "roles");
|
||||
setupEpg(_epgMap, et -> ((User) et).getRoles(), (et, vl) -> ((User) et).setRoles((String[]) vl), "roles");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,7 +50,7 @@ public class UserDbm extends AbstractDBMeta {
|
|||
// ===================================================================================
|
||||
// Column Info
|
||||
// ===========
|
||||
protected final ColumnInfo _columnGroups = cci("groups", "groups", null, null, String.class, "groups", null, false, false, false,
|
||||
protected final ColumnInfo _columnGroups = cci("groups", "groups", null, null, String[].class, "groups", null, false, false, false,
|
||||
"String", 0, 0, null, false, null, null, null, null, null, false);
|
||||
protected final ColumnInfo _columnId = cci("id", "id", null, null, String.class, "id", null, false, false, false, "String", 0, 0, null,
|
||||
false, null, null, null, null, null, false);
|
||||
|
@ -58,8 +58,8 @@ public class UserDbm extends AbstractDBMeta {
|
|||
0, null, false, null, null, null, null, null, false);
|
||||
protected final ColumnInfo _columnPassword = cci("password", "password", null, null, String.class, "password", null, false, false,
|
||||
false, "String", 0, 0, null, false, null, null, null, null, null, false);
|
||||
protected final ColumnInfo _columnRoles = cci("roles", "roles", null, null, String.class, "roles", null, false, false, false, "String",
|
||||
0, 0, null, false, null, null, null, null, null, false);
|
||||
protected final ColumnInfo _columnRoles = cci("roles", "roles", null, null, String[].class, "roles", null, false, false, false,
|
||||
"String", 0, 0, null, false, null, null, null, null, null, false);
|
||||
|
||||
public ColumnInfo columnGroups() {
|
||||
return _columnGroups;
|
||||
|
|
|
@ -78,22 +78,22 @@ public interface FessHtmlPath {
|
|||
HtmlNext path_AdminDictSynonym_UploadJsp = new HtmlNext("/admin/dict/synonym/upload.jsp");
|
||||
|
||||
/** The path of the HTML: /admin/dict/userdict/confirm.jsp */
|
||||
HtmlNext path_AdminDictUserDict_ConfirmJsp = new HtmlNext("/admin/dict/userdict/confirm.jsp");
|
||||
HtmlNext path_AdminDictUserdict_ConfirmJsp = new HtmlNext("/admin/dict/userdict/confirm.jsp");
|
||||
|
||||
/** The path of the HTML: /admin/dict/userdict/download.jsp */
|
||||
HtmlNext path_AdminDictUserDict_DownloadJsp = new HtmlNext("/admin/dict/userdict/download.jsp");
|
||||
HtmlNext path_AdminDictUserdict_DownloadJsp = new HtmlNext("/admin/dict/userdict/download.jsp");
|
||||
|
||||
/** The path of the HTML: /admin/dict/userdict/edit.jsp */
|
||||
HtmlNext path_AdminDictUserDict_EditJsp = new HtmlNext("/admin/dict/userdict/edit.jsp");
|
||||
HtmlNext path_AdminDictUserdict_EditJsp = new HtmlNext("/admin/dict/userdict/edit.jsp");
|
||||
|
||||
/** The path of the HTML: /admin/dict/userdict/error.jsp */
|
||||
HtmlNext path_AdminDictUserDict_ErrorJsp = new HtmlNext("/admin/dict/userdict/error.jsp");
|
||||
HtmlNext path_AdminDictUserdict_ErrorJsp = new HtmlNext("/admin/dict/userdict/error.jsp");
|
||||
|
||||
/** The path of the HTML: /admin/dict/userdict/index.jsp */
|
||||
HtmlNext path_AdminDictUserDict_IndexJsp = new HtmlNext("/admin/dict/userdict/index.jsp");
|
||||
HtmlNext path_AdminDictUserdict_IndexJsp = new HtmlNext("/admin/dict/userdict/index.jsp");
|
||||
|
||||
/** The path of the HTML: /admin/dict/userdict/upload.jsp */
|
||||
HtmlNext path_AdminDictUserDict_UploadJsp = new HtmlNext("/admin/dict/userdict/upload.jsp");
|
||||
HtmlNext path_AdminDictUserdict_UploadJsp = new HtmlNext("/admin/dict/userdict/upload.jsp");
|
||||
|
||||
/** The path of the HTML: /admin/failureurl/confirm.jsp */
|
||||
HtmlNext path_AdminFailureurl_ConfirmJsp = new HtmlNext("/admin/failureurl/confirm.jsp");
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3162,11 +3162,4 @@ public class FessMessages extends FessLabels {
|
|||
add(property, new ActionMessage(SUCCESS_crud_delete_crud_table));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The definition of keys for labels.
|
||||
* @author FreeGen
|
||||
*/
|
||||
public static interface LabelKey extends FessLabels.LabelKey {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public interface FessEnv {
|
|||
/** The key of the configuration. e.g. [Test] */
|
||||
String MAIL_SUBJECT_TEST_PREFIX = "mail.subject.test.prefix";
|
||||
|
||||
/** The key of the configuration. e.g. returnpath@docksidestage.org */
|
||||
/** The key of the configuration. e.g. root@localhost */
|
||||
String MAIL_RETURN_PATH = "mail.return.path";
|
||||
|
||||
/**
|
||||
|
@ -150,7 +150,7 @@ public interface FessEnv {
|
|||
|
||||
/**
|
||||
* Get the value for the key 'mail.return.path'. <br>
|
||||
* The value is, e.g. returnpath@docksidestage.org <br>
|
||||
* The value is, e.g. root@localhost <br>
|
||||
* comment: The common return path of all mail
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.codelibs.fess.mylasta;
|
||||
|
||||
import org.codelibs.fess.unit.UnitFessTestCase;
|
||||
import org.dbflute.utflute.core.document.DocumentGenerator;
|
||||
|
||||
public class FessActionDefTest extends UnitFessTestCase {
|
||||
|
||||
|
@ -32,15 +33,9 @@ public class FessActionDefTest extends UnitFessTestCase {
|
|||
// ===================================================================================
|
||||
// Document
|
||||
// ========
|
||||
/*
|
||||
public void test_document() throws Exception {
|
||||
DocumentGenerator documentGenerator = new DocumentGenerator();
|
||||
documentGenerator.saveLastaDocMeta();
|
||||
}
|
||||
*/
|
||||
|
||||
public void test_dummy() throws Exception {
|
||||
// TODO remove
|
||||
assertTrue(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue