refactoring
This commit is contained in:
parent
84b78893d7
commit
f777365267
162 changed files with 729 additions and 1427 deletions
|
@ -18,14 +18,8 @@ body {
|
|||
</head>
|
||||
<body>
|
||||
/ :: RootAction <br>
|
||||
/data/ :: DataAction <br>
|
||||
/admin/ :: AdminAction <br>
|
||||
/dict/ :: DictAction <br>
|
||||
/document/ :: DocumentAction <br>
|
||||
/failure/url/ :: FailureUrlAction <br>
|
||||
/index/ :: IndexAction <br>
|
||||
/log/ :: LogAction <br>
|
||||
/search/list/ :: SearchListAction <br>
|
||||
/wizard/ :: WizardAction <br>
|
||||
/admin/boostdocumentrule/ :: AdminBoostdocumentruleAction <br>
|
||||
/admin/crawl/ :: AdminCrawlAction <br>
|
||||
/admin/crawlingsession/ :: AdminCrawlingsessionAction <br>
|
||||
|
@ -33,18 +27,21 @@ body {
|
|||
/admin/design/ :: AdminDesignAction <br>
|
||||
/synonym/ :: SynonymAction <br>
|
||||
/user/dict/ :: UserDictAction <br>
|
||||
/admin/failureurl/ :: AdminFailureurlAction <br>
|
||||
/admin/fileauthentication/ :: AdminFileauthenticationAction <br>
|
||||
/admin/fileconfig/ :: AdminFileconfigAction <br>
|
||||
/admin/group/ :: AdminGroupAction <br>
|
||||
/admin/joblog/ :: AdminJoblogAction <br>
|
||||
/admin/keymatch/ :: AdminKeymatchAction <br>
|
||||
/admin/labeltype/ :: AdminLabeltypeAction <br>
|
||||
/admin/log/ :: AdminLogAction <br>
|
||||
/admin/overlappinghost/ :: AdminOverlappinghostAction <br>
|
||||
/admin/pathmapping/ :: AdminPathmappingAction <br>
|
||||
/admin/requestheader/ :: AdminRequestheaderAction <br>
|
||||
/admin/role/ :: AdminRoleAction <br>
|
||||
/admin/roletype/ :: AdminRoletypeAction <br>
|
||||
/admin/scheduledjob/ :: AdminScheduledjobAction <br>
|
||||
/admin/searchlist/ :: AdminSearchlistAction <br>
|
||||
/admin/suggestbadword/ :: AdminSuggestbadwordAction <br>
|
||||
/admin/suggestelevateword/ :: AdminSuggestelevatewordAction <br>
|
||||
/admin/system/ :: AdminSystemAction <br>
|
||||
|
@ -52,6 +49,7 @@ body {
|
|||
/admin/user/ :: AdminUserAction <br>
|
||||
/admin/webauthentication/ :: AdminWebauthenticationAction <br>
|
||||
/admin/webconfig/ :: AdminWebconfigAction <br>
|
||||
/admin/wizard/ :: AdminWizardAction <br>
|
||||
/fess/admin/ :: FessAdminAction <br>
|
||||
/fess/base/ :: FessBaseAction <br>
|
||||
/fess/search/ :: FessSearchAction <br>
|
||||
|
|
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-C-SNAPSHOT</lastaflute.version>
|
||||
<lastaflute.version>0.6.4-RC3</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>
|
||||
|
|
|
@ -17,6 +17,14 @@
|
|||
<include>org.codelibs.fess:fess</include>
|
||||
</includes>
|
||||
</dependencySet>
|
||||
<dependencySet>
|
||||
<outputDirectory>fess-${project.version}/app/WEB-INF/cmd/lib</outputDirectory>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<includes>
|
||||
<include>javax.servlet:javax.servlet-api</include>
|
||||
</includes>
|
||||
<scope>provided</scope>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<fileSets>
|
||||
<!-- lib -->
|
||||
|
|
|
@ -88,12 +88,6 @@ public class Constants extends CoreLibConstants {
|
|||
|
||||
public static final long DEFAULT_CRAWLING_EXECUTION_INTERVAL = 5000L;
|
||||
|
||||
/** Solr Status: Active */
|
||||
public static final String ACTIVE = "ACTIVE";
|
||||
|
||||
/** Solr Status: Inactive */
|
||||
public static final String INACTIVE = "INACTIVE";
|
||||
|
||||
// fess properties
|
||||
public static final String USER_INFO_PROPERTY = "user.info";
|
||||
|
||||
|
@ -232,9 +226,9 @@ public class Constants extends CoreLibConstants {
|
|||
public static final String[] RESERVED = { "+", "-", "&&", "||", "!", "(", ")", "{", "}", "[", "]", "^", "~", "*", "?", "\\", ";", ":",
|
||||
"/" };
|
||||
|
||||
public static final Pattern SOLR_FIELD_RESERVED_PATTERN = Pattern.compile("([+\\-!\\(\\){}\\[\\]^\"~\\\\:\\p{Zs}]|(&&)|(\\|\\|))"); // "*", "?",
|
||||
public static final Pattern LUCENE_FIELD_RESERVED_PATTERN = Pattern.compile("([+\\-!\\(\\){}\\[\\]^\"~\\\\:\\p{Zs}]|(&&)|(\\|\\|))"); // "*", "?",
|
||||
|
||||
public static final Pattern SOLR_RANGE_FIELD_RESERVED_PATTERN = Pattern.compile("([!\\(\\){}\\[\\]\"~\\\\:\\p{Zs}]|(&&)|(\\|\\|))");
|
||||
public static final Pattern LUCENE_RANGE_FIELD_RESERVED_PATTERN = Pattern.compile("([!\\(\\){}\\[\\]\"~\\\\:\\p{Zs}]|(&&)|(\\|\\|))");
|
||||
|
||||
public static final String SEARCH_LOG_ACCESS_TYPE = "searchLogAccessType";
|
||||
|
||||
|
@ -252,8 +246,6 @@ public class Constants extends CoreLibConstants {
|
|||
|
||||
public static final String SEARCH_FIELD_LOG_SEARCH_QUERY = "query";
|
||||
|
||||
public static final String SEARCH_FIELD_LOG_SOLR_QUERY = "solrQuery";
|
||||
|
||||
public static final String STATS_REPORT_TYPE = "reportType";
|
||||
|
||||
public static final String RESULT_DOC_ID_CACHE = "resultDocIds";
|
||||
|
@ -326,4 +318,13 @@ public class Constants extends CoreLibConstants {
|
|||
public static final long ONE_DAY_IN_MILLIS = 24L * 60L * 60L * 1000L;
|
||||
|
||||
public static final String GUEST_USER = "guest";
|
||||
|
||||
public static final String[] PAGER_CONVERSION_RULE = { "allRecordCount", "pageSize", "currentPageNumber", "allPageCount",
|
||||
"existPrePage", "existNextPage" };
|
||||
|
||||
// TODO remove searchParams
|
||||
public static final String[] COMMON_CONVERSION_RULE = new String[] { "searchParams", "crudMode", "createdBy", "createdTime",
|
||||
"updatedBy", "updatedTime" };
|
||||
|
||||
public static final String USER_INFO = "LoginInfo";
|
||||
}
|
||||
|
|
|
@ -35,13 +35,13 @@ public class FessBoot extends TomcatBoot {
|
|||
|
||||
private static final String UTF_8 = "UTF-8";
|
||||
|
||||
public FessBoot(int port, String contextPath) {
|
||||
public FessBoot(final int port, final String contextPath) {
|
||||
super(port, contextPath);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String prepareWebappPath() {
|
||||
String value = System.getProperty(FESS_WEBAPP_PATH);
|
||||
final String value = System.getProperty(FESS_WEBAPP_PATH);
|
||||
if (value != null) {
|
||||
return value;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class FessBoot extends TomcatBoot {
|
|||
|
||||
@Override
|
||||
protected String prepareWebXmlPath() {
|
||||
String value = System.getProperty(FESS_WEBXML_PATH);
|
||||
final String value = System.getProperty(FESS_WEBXML_PATH);
|
||||
if (value != null) {
|
||||
return value;
|
||||
}
|
||||
|
@ -59,16 +59,11 @@ public class FessBoot extends TomcatBoot {
|
|||
|
||||
@Override
|
||||
protected String getMarkDir() {
|
||||
String value = System.getProperty(FESS_TEMP_PATH);
|
||||
if (value != null) {
|
||||
System.setProperty(JAVA_IO_TMPDIR, value);
|
||||
return new File(value, "fessboot").getAbsolutePath();
|
||||
}
|
||||
return new File(System.getProperty(JAVA_IO_TMPDIR), "fessboot").getAbsolutePath();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void info(String msg) {
|
||||
protected void info(final String msg) {
|
||||
logger.info(msg);
|
||||
}
|
||||
|
||||
|
@ -76,7 +71,8 @@ public class FessBoot extends TomcatBoot {
|
|||
// main
|
||||
// ============
|
||||
|
||||
public static void main(String[] args) {
|
||||
public static void main(final String[] args) {
|
||||
// load logging.properties
|
||||
try (InputStream is = FessBoot.class.getResourceAsStream(LOGGING_PROPERTIES)) {
|
||||
if (is != null) {
|
||||
try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
|
||||
|
@ -97,9 +93,16 @@ public class FessBoot extends TomcatBoot {
|
|||
logger.info(LOGGING_PROPERTIES + " is loaded.");
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
} catch (final IOException e) {
|
||||
logger.log(Level.WARNING, "Failed to load " + LOGGING_PROPERTIES, e);
|
||||
}
|
||||
|
||||
// update java.io.tmpdir
|
||||
final String value = System.getProperty(FESS_TEMP_PATH);
|
||||
if (value != null) {
|
||||
System.setProperty(JAVA_IO_TMPDIR, value);
|
||||
}
|
||||
|
||||
new FessBoot(getPort(), getContextPath()).useTldDetect().asDevelopment(isNoneEnv()).bootAwait();
|
||||
}
|
||||
|
||||
|
@ -108,7 +111,7 @@ public class FessBoot extends TomcatBoot {
|
|||
}
|
||||
|
||||
protected static int getPort() {
|
||||
String value = System.getProperty(FESS_PORT);
|
||||
final String value = System.getProperty(FESS_PORT);
|
||||
if (value != null) {
|
||||
return Integer.parseInt(value);
|
||||
}
|
||||
|
@ -116,7 +119,7 @@ public class FessBoot extends TomcatBoot {
|
|||
}
|
||||
|
||||
protected static String getContextPath() {
|
||||
String value = System.getProperty(FESS_CONTEXT_PATH);
|
||||
final String value = System.getProperty(FESS_CONTEXT_PATH);
|
||||
if (value != null) {
|
||||
return value;
|
||||
}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 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;
|
||||
|
||||
import org.codelibs.core.CoreLibConstants;
|
||||
|
||||
public class SSCConstants extends CoreLibConstants {
|
||||
|
||||
public static final String USER_INFO = "LoginInfo";
|
||||
|
||||
public static final String RETURN_PATH = "ReturnPath";
|
||||
|
||||
protected SSCConstants() {
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@ import java.lang.annotation.Target;
|
|||
|
||||
/**
|
||||
* @author shinsuke
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.lang.annotation.Target;
|
|||
|
||||
/**
|
||||
* @author shinsuke
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Target({ ElementType.FIELD, ElementType.METHOD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
@ -32,13 +32,13 @@ import org.apache.commons.lang3.StringEscapeUtils;
|
|||
import org.codelibs.core.CoreLibConstants;
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.WebApiException;
|
||||
import org.codelibs.fess.api.BaseApiManager;
|
||||
import org.codelibs.fess.api.WebApiManager;
|
||||
import org.codelibs.fess.api.WebApiRequest;
|
||||
import org.codelibs.fess.api.WebApiResponse;
|
||||
import org.codelibs.fess.client.FessEsClient;
|
||||
import org.codelibs.fess.entity.PingResponse;
|
||||
import org.codelibs.fess.es.client.FessEsClient;
|
||||
import org.codelibs.fess.exception.WebApiException;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.codelibs.fess.util.FacetResponse;
|
||||
import org.codelibs.fess.util.FacetResponse.Field;
|
||||
|
|
|
@ -35,8 +35,8 @@ import org.codelibs.fess.api.BaseApiManager;
|
|||
import org.codelibs.fess.api.WebApiManager;
|
||||
import org.codelibs.fess.api.WebApiRequest;
|
||||
import org.codelibs.fess.api.WebApiResponse;
|
||||
import org.codelibs.fess.client.FessEsClient;
|
||||
import org.codelibs.fess.entity.PingResponse;
|
||||
import org.codelibs.fess.es.client.FessEsClient;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.codelibs.fess.util.FacetResponse;
|
||||
import org.codelibs.fess.util.FacetResponse.Field;
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.BoostDocumentRulePager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.BoostDocumentRuleCB;
|
||||
import org.codelibs.fess.es.exbhv.BoostDocumentRuleBhv;
|
||||
import org.codelibs.fess.es.exentity.BoostDocumentRule;
|
||||
|
@ -51,8 +50,7 @@ public class BoostDocumentRuleService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(boostDocumentRuleList, boostDocumentRulePager,
|
||||
option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(boostDocumentRuleList, boostDocumentRulePager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
boostDocumentRulePager.setPageNumberList(boostDocumentRuleList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -64,7 +62,7 @@ public class BoostDocumentRuleService implements Serializable {
|
|||
return boostDocumentRuleBhv.selectByPK(id);
|
||||
}
|
||||
|
||||
public void store(final BoostDocumentRule boostDocumentRule) throws CrudMessageException {
|
||||
public void store(final BoostDocumentRule boostDocumentRule) {
|
||||
setupStoreCondition(boostDocumentRule);
|
||||
|
||||
boostDocumentRuleBhv.insertOrUpdate(boostDocumentRule, op -> {
|
||||
|
@ -73,7 +71,7 @@ public class BoostDocumentRuleService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final BoostDocumentRule boostDocumentRule) throws CrudMessageException {
|
||||
public void delete(final BoostDocumentRule boostDocumentRule) {
|
||||
setupDeleteCondition(boostDocumentRule);
|
||||
|
||||
boostDocumentRuleBhv.delete(boostDocumentRule, op -> {
|
||||
|
|
|
@ -38,15 +38,14 @@ import org.apache.commons.logging.LogFactory;
|
|||
import org.codelibs.core.CoreLibConstants;
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.CrawlingSessionPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.CrawlingSessionCB;
|
||||
import org.codelibs.fess.es.exbhv.CrawlingSessionBhv;
|
||||
import org.codelibs.fess.es.exbhv.CrawlingSessionInfoBhv;
|
||||
import org.codelibs.fess.es.exentity.CrawlingSession;
|
||||
import org.codelibs.fess.es.exentity.CrawlingSessionInfo;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.dbflute.bhv.readable.EntityRowHandler;
|
||||
import org.dbflute.cbean.result.ListResultBean;
|
||||
|
@ -80,7 +79,7 @@ public class CrawlingSessionService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(crawlingSessionList, crawlingSessionPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(crawlingSessionList, crawlingSessionPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
crawlingSessionPager.setPageNumberList(crawlingSessionList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -101,14 +100,14 @@ public class CrawlingSessionService implements Serializable {
|
|||
return crawlingSession;
|
||||
}
|
||||
|
||||
public void store(final CrawlingSession crawlingSession) throws CrudMessageException {
|
||||
public void store(final CrawlingSession crawlingSession) {
|
||||
setupStoreCondition(crawlingSession);
|
||||
|
||||
crawlingSessionBhv.insertOrUpdate(crawlingSession);
|
||||
|
||||
}
|
||||
|
||||
public void delete(final CrawlingSession crawlingSession) throws CrudMessageException {
|
||||
public void delete(final CrawlingSession crawlingSession) {
|
||||
setupDeleteCondition(crawlingSession);
|
||||
|
||||
crawlingSessionBhv.delete(crawlingSession);
|
||||
|
|
|
@ -26,8 +26,6 @@ import javax.annotation.Resource;
|
|||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.DataConfigPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.DataConfigCB;
|
||||
import org.codelibs.fess.es.exbhv.DataConfigBhv;
|
||||
import org.codelibs.fess.es.exbhv.DataConfigToLabelBhv;
|
||||
|
@ -63,7 +61,7 @@ public class DataConfigService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(dataConfigList, dataConfigPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(dataConfigList, dataConfigPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
dataConfigPager.setPageNumberList(dataConfigList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -71,7 +69,7 @@ public class DataConfigService implements Serializable {
|
|||
return dataConfigList;
|
||||
}
|
||||
|
||||
public void delete(final DataConfig dataConfig) throws CrudMessageException {
|
||||
public void delete(final DataConfig dataConfig) {
|
||||
setupDeleteCondition(dataConfig);
|
||||
|
||||
dataConfigBhv.delete(dataConfig, op -> {
|
||||
|
|
|
@ -32,8 +32,6 @@ import org.codelibs.core.lang.StringUtil;
|
|||
import org.codelibs.core.misc.DynamicProperties;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.FailureUrlPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.FailureUrlCB;
|
||||
import org.codelibs.fess.es.exbhv.FailureUrlBhv;
|
||||
import org.codelibs.fess.es.exentity.CrawlingConfig;
|
||||
|
@ -66,7 +64,7 @@ public class FailureUrlService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(failureUrlList, failureUrlPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(failureUrlList, failureUrlPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
failureUrlPager.setPageNumberList(failureUrlList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -87,7 +85,7 @@ public class FailureUrlService implements Serializable {
|
|||
return failureUrl;
|
||||
}
|
||||
|
||||
public void store(final FailureUrl failureUrl) throws CrudMessageException {
|
||||
public void store(final FailureUrl failureUrl) {
|
||||
setupStoreCondition(failureUrl);
|
||||
|
||||
failureUrlBhv.insertOrUpdate(failureUrl, op -> {
|
||||
|
@ -96,7 +94,7 @@ public class FailureUrlService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final FailureUrl failureUrl) throws CrudMessageException {
|
||||
public void delete(final FailureUrl failureUrl) {
|
||||
setupDeleteCondition(failureUrl);
|
||||
|
||||
failureUrlBhv.delete(failureUrl, op -> {
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.FileAuthenticationPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.FileAuthenticationCB;
|
||||
import org.codelibs.fess.es.exbhv.FileAuthenticationBhv;
|
||||
import org.codelibs.fess.es.exentity.FileAuthentication;
|
||||
|
@ -50,8 +49,7 @@ public class FileAuthenticationService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(fileAuthenticationList, fileAuthenticationPager,
|
||||
option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(fileAuthenticationList, fileAuthenticationPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
fileAuthenticationPager.setPageNumberList(fileAuthenticationList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -72,7 +70,7 @@ public class FileAuthenticationService implements Serializable {
|
|||
return fileAuthentication;
|
||||
}
|
||||
|
||||
public void store(final FileAuthentication fileAuthentication) throws CrudMessageException {
|
||||
public void store(final FileAuthentication fileAuthentication) {
|
||||
setupStoreCondition(fileAuthentication);
|
||||
|
||||
fileAuthenticationBhv.insertOrUpdate(fileAuthentication, op -> {
|
||||
|
@ -81,7 +79,7 @@ public class FileAuthenticationService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final FileAuthentication fileAuthentication) throws CrudMessageException {
|
||||
public void delete(final FileAuthentication fileAuthentication) {
|
||||
setupDeleteCondition(fileAuthentication);
|
||||
|
||||
fileAuthenticationBhv.delete(fileAuthentication, op -> {
|
||||
|
|
|
@ -26,8 +26,6 @@ import javax.annotation.Resource;
|
|||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.FileConfigPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.FileConfigCB;
|
||||
import org.codelibs.fess.es.exbhv.FileConfigBhv;
|
||||
import org.codelibs.fess.es.exbhv.FileConfigToLabelBhv;
|
||||
|
@ -62,7 +60,7 @@ public class FileConfigService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(fileConfigList, fileConfigPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(fileConfigList, fileConfigPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
fileConfigPager.setPageNumberList(fileConfigList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -70,7 +68,7 @@ public class FileConfigService implements Serializable {
|
|||
return fileConfigList;
|
||||
}
|
||||
|
||||
public void delete(final FileConfig fileConfig) throws CrudMessageException {
|
||||
public void delete(final FileConfig fileConfig) {
|
||||
setupDeleteCondition(fileConfig);
|
||||
|
||||
fileConfigBhv.delete(fileConfig, op -> {
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.GroupPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.GroupCB;
|
||||
import org.codelibs.fess.es.exbhv.GroupBhv;
|
||||
import org.codelibs.fess.es.exentity.Group;
|
||||
|
@ -46,7 +45,7 @@ public class GroupService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(groupList, groupPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(groupList, groupPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
groupPager.setPageNumberList(groupList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -67,7 +66,7 @@ public class GroupService implements Serializable {
|
|||
return group;
|
||||
}
|
||||
|
||||
public void store(final Group group) throws CrudMessageException {
|
||||
public void store(final Group group) {
|
||||
setupStoreCondition(group);
|
||||
|
||||
groupBhv.insertOrUpdate(group, op -> {
|
||||
|
@ -76,7 +75,7 @@ public class GroupService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final Group group) throws CrudMessageException {
|
||||
public void delete(final Group group) {
|
||||
setupDeleteCondition(group);
|
||||
|
||||
groupBhv.delete(group, op -> {
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.JobLogPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.JobLogCB;
|
||||
import org.codelibs.fess.es.exbhv.JobLogBhv;
|
||||
import org.codelibs.fess.es.exentity.JobLog;
|
||||
|
@ -51,7 +50,7 @@ public class JobLogService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(jobLogList, jobLogPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(jobLogList, jobLogPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
jobLogPager.setPageNumberList(jobLogList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -72,7 +71,7 @@ public class JobLogService implements Serializable {
|
|||
return jobLog;
|
||||
}
|
||||
|
||||
public void store(final JobLog jobLog) throws CrudMessageException {
|
||||
public void store(final JobLog jobLog) {
|
||||
setupStoreCondition(jobLog);
|
||||
|
||||
jobLogBhv.insertOrUpdate(jobLog, op -> {
|
||||
|
@ -81,7 +80,7 @@ public class JobLogService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final JobLog jobLog) throws CrudMessageException {
|
||||
public void delete(final JobLog jobLog) {
|
||||
setupDeleteCondition(jobLog);
|
||||
|
||||
jobLogBhv.delete(jobLog, op -> {
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.KeyMatchPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.KeyMatchCB;
|
||||
import org.codelibs.fess.es.exbhv.KeyMatchBhv;
|
||||
import org.codelibs.fess.es.exentity.KeyMatch;
|
||||
|
@ -50,7 +49,7 @@ public class KeyMatchService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(keyMatchList, keyMatchPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(keyMatchList, keyMatchPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
keyMatchPager.setPageNumberList(keyMatchList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -71,7 +70,7 @@ public class KeyMatchService implements Serializable {
|
|||
return keyMatch;
|
||||
}
|
||||
|
||||
public void store(final KeyMatch keyMatch) throws CrudMessageException {
|
||||
public void store(final KeyMatch keyMatch) {
|
||||
setupStoreCondition(keyMatch);
|
||||
|
||||
keyMatchBhv.insertOrUpdate(keyMatch, op -> {
|
||||
|
@ -80,7 +79,7 @@ public class KeyMatchService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final KeyMatch keyMatch) throws CrudMessageException {
|
||||
public void delete(final KeyMatch keyMatch) {
|
||||
setupDeleteCondition(keyMatch);
|
||||
|
||||
keyMatchBhv.delete(keyMatch, op -> {
|
||||
|
|
|
@ -24,9 +24,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.LabelTypePager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.LabelTypeCB;
|
||||
import org.codelibs.fess.es.exbhv.LabelToRoleBhv;
|
||||
import org.codelibs.fess.es.exbhv.LabelTypeBhv;
|
||||
|
@ -59,7 +58,7 @@ public class LabelTypeService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(labelTypeList, labelTypePager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(labelTypeList, labelTypePager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
labelTypePager.setPageNumberList(labelTypeList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -67,7 +66,7 @@ public class LabelTypeService implements Serializable {
|
|||
return labelTypeList;
|
||||
}
|
||||
|
||||
public void delete(final LabelType labelType) throws CrudMessageException {
|
||||
public void delete(final LabelType labelType) {
|
||||
setupDeleteCondition(labelType);
|
||||
|
||||
labelTypeBhv.delete(labelType, op -> {
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.OverlappingHostPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.OverlappingHostCB;
|
||||
import org.codelibs.fess.es.exbhv.OverlappingHostBhv;
|
||||
import org.codelibs.fess.es.exentity.OverlappingHost;
|
||||
|
@ -50,7 +49,7 @@ public class OverlappingHostService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(overlappingHostList, overlappingHostPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(overlappingHostList, overlappingHostPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
overlappingHostPager.setPageNumberList(overlappingHostList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -71,7 +70,7 @@ public class OverlappingHostService implements Serializable {
|
|||
return overlappingHost;
|
||||
}
|
||||
|
||||
public void store(final OverlappingHost overlappingHost) throws CrudMessageException {
|
||||
public void store(final OverlappingHost overlappingHost) {
|
||||
setupStoreCondition(overlappingHost);
|
||||
|
||||
overlappingHostBhv.insertOrUpdate(overlappingHost, op -> {
|
||||
|
@ -80,7 +79,7 @@ public class OverlappingHostService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final OverlappingHost overlappingHost) throws CrudMessageException {
|
||||
public void delete(final OverlappingHost overlappingHost) {
|
||||
setupDeleteCondition(overlappingHost);
|
||||
|
||||
overlappingHostBhv.delete(overlappingHost, op -> {
|
||||
|
|
|
@ -24,9 +24,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.PathMappingPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.PathMappingCB;
|
||||
import org.codelibs.fess.es.exbhv.PathMappingBhv;
|
||||
import org.codelibs.fess.es.exentity.PathMapping;
|
||||
|
@ -47,7 +46,7 @@ public class PathMappingService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(pathMappingList, pathMappingPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(pathMappingList, pathMappingPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
pathMappingPager.setPageNumberList(pathMappingList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -69,7 +68,7 @@ public class PathMappingService implements Serializable {
|
|||
return pathMapping;
|
||||
}
|
||||
|
||||
public void store(final PathMapping pathMapping) throws CrudMessageException {
|
||||
public void store(final PathMapping pathMapping) {
|
||||
setupStoreCondition(pathMapping);
|
||||
|
||||
pathMappingBhv.insertOrUpdate(pathMapping, op -> {
|
||||
|
@ -78,7 +77,7 @@ public class PathMappingService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final PathMapping pathMapping) throws CrudMessageException {
|
||||
public void delete(final PathMapping pathMapping) {
|
||||
setupDeleteCondition(pathMapping);
|
||||
|
||||
pathMappingBhv.delete(pathMapping, op -> {
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.RequestHeaderPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.RequestHeaderCB;
|
||||
import org.codelibs.fess.es.exbhv.RequestHeaderBhv;
|
||||
import org.codelibs.fess.es.exentity.RequestHeader;
|
||||
|
@ -50,7 +49,7 @@ public class RequestHeaderService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(requestHeaderList, requestHeaderPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(requestHeaderList, requestHeaderPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
requestHeaderPager.setPageNumberList(requestHeaderList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -71,7 +70,7 @@ public class RequestHeaderService implements Serializable {
|
|||
return requestHeader;
|
||||
}
|
||||
|
||||
public void store(final RequestHeader requestHeader) throws CrudMessageException {
|
||||
public void store(final RequestHeader requestHeader) {
|
||||
setupStoreCondition(requestHeader);
|
||||
|
||||
requestHeaderBhv.insertOrUpdate(requestHeader, op -> {
|
||||
|
@ -80,7 +79,7 @@ public class RequestHeaderService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final RequestHeader requestHeader) throws CrudMessageException {
|
||||
public void delete(final RequestHeader requestHeader) {
|
||||
setupDeleteCondition(requestHeader);
|
||||
|
||||
requestHeaderBhv.delete(requestHeader, op -> {
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.RolePager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.RoleCB;
|
||||
import org.codelibs.fess.es.exbhv.RoleBhv;
|
||||
import org.codelibs.fess.es.exentity.Role;
|
||||
|
@ -46,7 +45,7 @@ public class RoleService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(roleList, rolePager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(roleList, rolePager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
rolePager.setPageNumberList(roleList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -67,7 +66,7 @@ public class RoleService implements Serializable {
|
|||
return role;
|
||||
}
|
||||
|
||||
public void store(final Role role) throws CrudMessageException {
|
||||
public void store(final Role role) {
|
||||
setupStoreCondition(role);
|
||||
|
||||
roleBhv.insertOrUpdate(role, op -> {
|
||||
|
@ -76,7 +75,7 @@ public class RoleService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final Role role) throws CrudMessageException {
|
||||
public void delete(final Role role) {
|
||||
setupDeleteCondition(role);
|
||||
|
||||
roleBhv.delete(role, op -> {
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.RoleTypePager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.RoleTypeCB;
|
||||
import org.codelibs.fess.es.exbhv.RoleTypeBhv;
|
||||
import org.codelibs.fess.es.exentity.RoleType;
|
||||
|
@ -50,7 +49,7 @@ public class RoleTypeService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(roleTypeList, roleTypePager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(roleTypeList, roleTypePager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
roleTypePager.setPageNumberList(roleTypeList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -71,7 +70,7 @@ public class RoleTypeService implements Serializable {
|
|||
return roleType;
|
||||
}
|
||||
|
||||
public void store(final RoleType roleType) throws CrudMessageException {
|
||||
public void store(final RoleType roleType) {
|
||||
setupStoreCondition(roleType);
|
||||
|
||||
roleTypeBhv.insertOrUpdate(roleType, op -> {
|
||||
|
@ -80,7 +79,7 @@ public class RoleTypeService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final RoleType roleType) throws CrudMessageException {
|
||||
public void delete(final RoleType roleType) {
|
||||
setupDeleteCondition(roleType);
|
||||
|
||||
roleTypeBhv.delete(roleType, op -> {
|
||||
|
|
|
@ -25,8 +25,6 @@ import javax.annotation.Resource;
|
|||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.ScheduledJobPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.ScheduledJobCB;
|
||||
import org.codelibs.fess.es.exbhv.ScheduledJobBhv;
|
||||
import org.codelibs.fess.es.exentity.ScheduledJob;
|
||||
|
@ -52,7 +50,7 @@ public class ScheduledJobService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(scheduledJobList, scheduledJobPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(scheduledJobList, scheduledJobPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
scheduledJobPager.setPageNumberList(scheduledJobList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -73,7 +71,7 @@ public class ScheduledJobService implements Serializable {
|
|||
return scheduledJob;
|
||||
}
|
||||
|
||||
public void delete(final ScheduledJob scheduledJob) throws CrudMessageException {
|
||||
public void delete(final ScheduledJob scheduledJob) {
|
||||
setupDeleteCondition(scheduledJob);
|
||||
|
||||
scheduledJobBhv.delete(scheduledJob, op -> {
|
||||
|
|
|
@ -30,9 +30,8 @@ import org.apache.commons.logging.Log;
|
|||
import org.apache.commons.logging.LogFactory;
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.SuggestBadWordPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.SuggestBadWordCB;
|
||||
import org.codelibs.fess.es.exbhv.SuggestBadWordBhv;
|
||||
import org.codelibs.fess.es.exentity.SuggestBadWord;
|
||||
|
@ -67,7 +66,7 @@ public class SuggestBadWordService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(suggestBadWordList, suggestBadWordPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(suggestBadWordList, suggestBadWordPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
suggestBadWordPager.setPageNumberList(suggestBadWordList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -88,7 +87,7 @@ public class SuggestBadWordService implements Serializable {
|
|||
return suggestBadWord;
|
||||
}
|
||||
|
||||
public void store(final SuggestBadWord suggestBadWord) throws CrudMessageException {
|
||||
public void store(final SuggestBadWord suggestBadWord) {
|
||||
setupStoreCondition(suggestBadWord);
|
||||
|
||||
suggestBadWordBhv.insertOrUpdate(suggestBadWord, op -> {
|
||||
|
@ -97,7 +96,7 @@ public class SuggestBadWordService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final SuggestBadWord suggestBadWord) throws CrudMessageException {
|
||||
public void delete(final SuggestBadWord suggestBadWord) {
|
||||
setupDeleteCondition(suggestBadWord);
|
||||
|
||||
suggestBadWordBhv.delete(suggestBadWord, op -> {
|
||||
|
|
|
@ -30,9 +30,8 @@ import org.apache.commons.logging.Log;
|
|||
import org.apache.commons.logging.LogFactory;
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.SuggestElevateWordPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.SuggestElevateWordCB;
|
||||
import org.codelibs.fess.es.exbhv.SuggestElevateWordBhv;
|
||||
import org.codelibs.fess.es.exentity.SuggestElevateWord;
|
||||
|
@ -65,8 +64,7 @@ public class SuggestElevateWordService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(suggestElevateWordList, suggestElevateWordPager,
|
||||
option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(suggestElevateWordList, suggestElevateWordPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
suggestElevateWordPager.setPageNumberList(suggestElevateWordList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -87,7 +85,7 @@ public class SuggestElevateWordService implements Serializable {
|
|||
return suggestElevateWord;
|
||||
}
|
||||
|
||||
public void store(final SuggestElevateWord suggestElevateWord) throws CrudMessageException {
|
||||
public void store(final SuggestElevateWord suggestElevateWord) {
|
||||
setupStoreCondition(suggestElevateWord);
|
||||
|
||||
suggestElevateWordBhv.insertOrUpdate(suggestElevateWord, op -> {
|
||||
|
@ -96,7 +94,7 @@ public class SuggestElevateWordService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final SuggestElevateWord suggestElevateWord) throws CrudMessageException {
|
||||
public void delete(final SuggestElevateWord suggestElevateWord) {
|
||||
setupDeleteCondition(suggestElevateWord);
|
||||
|
||||
suggestElevateWordBhv.delete(suggestElevateWord, op -> {
|
||||
|
|
|
@ -23,8 +23,8 @@ 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.SynonymPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.dict.DictionaryExpiredException;
|
||||
import org.codelibs.fess.dict.DictionaryFile;
|
||||
import org.codelibs.fess.dict.DictionaryFile.PagingList;
|
||||
|
@ -43,7 +43,7 @@ public class SynonymService {
|
|||
final PagingList<SynonymItem> synonymList = synonymFile.selectList((synonymPager.getCurrentPageNumber() - 1) * pageSize, pageSize);
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(synonymList, synonymPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(synonymList, synonymPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
synonymList.setPageRangeSize(5);
|
||||
synonymPager.setPageNumberList(synonymList.createPageNumberList());
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ 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.UserDictPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.dict.DictionaryExpiredException;
|
||||
import org.codelibs.fess.dict.DictionaryFile;
|
||||
import org.codelibs.fess.dict.DictionaryFile.PagingList;
|
||||
|
@ -44,7 +44,7 @@ public class UserDictService {
|
|||
userDictFile.selectList((userDictPager.getCurrentPageNumber() - 1) * pageSize, pageSize);
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(userDictList, userDictPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(userDictList, userDictPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
userDictList.setPageRangeSize(5);
|
||||
userDictPager.setPageNumberList(userDictList.createPageNumberList());
|
||||
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.UserPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.UserCB;
|
||||
import org.codelibs.fess.es.exbhv.UserBhv;
|
||||
import org.codelibs.fess.es.exentity.User;
|
||||
|
@ -50,7 +49,7 @@ public class UserService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(userList, userPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(userList, userPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
userPager.setPageNumberList(userList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -71,7 +70,7 @@ public class UserService implements Serializable {
|
|||
return user;
|
||||
}
|
||||
|
||||
public void store(final User user) throws CrudMessageException {
|
||||
public void store(final User user) {
|
||||
setupStoreCondition(user);
|
||||
|
||||
userBhv.insertOrUpdate(user, op -> {
|
||||
|
@ -80,7 +79,7 @@ public class UserService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final User user) throws CrudMessageException {
|
||||
public void delete(final User user) {
|
||||
setupDeleteCondition(user);
|
||||
|
||||
userBhv.delete(user, op -> {
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.Map;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.WebAuthenticationPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.WebAuthenticationCB;
|
||||
import org.codelibs.fess.es.exbhv.WebAuthenticationBhv;
|
||||
import org.codelibs.fess.es.exentity.WebAuthentication;
|
||||
|
@ -50,8 +49,7 @@ public class WebAuthenticationService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(webAuthenticationList, webAuthenticationPager,
|
||||
option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(webAuthenticationList, webAuthenticationPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
webAuthenticationPager.setPageNumberList(webAuthenticationList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -72,7 +70,7 @@ public class WebAuthenticationService implements Serializable {
|
|||
return webAuthentication;
|
||||
}
|
||||
|
||||
public void store(final WebAuthentication webAuthentication) throws CrudMessageException {
|
||||
public void store(final WebAuthentication webAuthentication) {
|
||||
setupStoreCondition(webAuthentication);
|
||||
|
||||
webAuthenticationBhv.insertOrUpdate(webAuthentication, op -> {
|
||||
|
@ -81,7 +79,7 @@ public class WebAuthenticationService implements Serializable {
|
|||
|
||||
}
|
||||
|
||||
public void delete(final WebAuthentication webAuthentication) throws CrudMessageException {
|
||||
public void delete(final WebAuthentication webAuthentication) {
|
||||
setupDeleteCondition(webAuthentication);
|
||||
|
||||
webAuthenticationBhv.delete(webAuthentication, op -> {
|
||||
|
|
|
@ -26,8 +26,6 @@ import javax.annotation.Resource;
|
|||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.WebConfigPager;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.es.cbean.WebConfigCB;
|
||||
import org.codelibs.fess.es.exbhv.WebConfigBhv;
|
||||
import org.codelibs.fess.es.exbhv.WebConfigToLabelBhv;
|
||||
|
@ -62,7 +60,7 @@ public class WebConfigService implements Serializable {
|
|||
});
|
||||
|
||||
// update pager
|
||||
BeanUtil.copyBeanToBean(webConfigList, webConfigPager, option -> option.include(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
BeanUtil.copyBeanToBean(webConfigList, webConfigPager, option -> option.include(Constants.PAGER_CONVERSION_RULE));
|
||||
webConfigPager.setPageNumberList(webConfigList.pageRange(op -> {
|
||||
op.rangeSize(5);
|
||||
}).createPageNumberList());
|
||||
|
@ -70,7 +68,7 @@ public class WebConfigService implements Serializable {
|
|||
return webConfigList;
|
||||
}
|
||||
|
||||
public void delete(final WebConfig webConfig) throws CrudMessageException {
|
||||
public void delete(final WebConfig webConfig) {
|
||||
setupDeleteCondition(webConfig);
|
||||
|
||||
webConfigBhv.delete(webConfig, op -> {
|
||||
|
|
|
@ -14,22 +14,20 @@
|
|||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.codelibs.fess.helper;
|
||||
package org.codelibs.fess.app.web;
|
||||
|
||||
import java.util.List;
|
||||
public class CrudMode {
|
||||
public static final int LIST = 0;
|
||||
|
||||
public interface WebManagementHelper {
|
||||
public static final int CREATE = 1;
|
||||
|
||||
boolean hasSolrInstance();
|
||||
public static final int EDIT = 2;
|
||||
|
||||
List<String> getSolrInstanceNameList();
|
||||
public static final int DELETE = 3;
|
||||
|
||||
String getStatus(String name);
|
||||
public static final int CONFIRM = 4;
|
||||
|
||||
void start(String name);
|
||||
|
||||
void stop(String name);
|
||||
|
||||
void reload(String name);
|
||||
|
||||
}
|
||||
protected CrudMode() {
|
||||
// nothing
|
||||
}
|
||||
}
|
|
@ -24,11 +24,11 @@ public class RootAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Search Execute
|
||||
|
|
|
@ -25,11 +25,11 @@ public class AdminAction extends FessAdminAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Search Execute
|
||||
|
|
|
@ -18,11 +18,12 @@ package org.codelibs.fess.app.web.admin.boostdocumentrule;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.BoostDocumentRulePager;
|
||||
import org.codelibs.fess.app.service.BoostDocumentRuleService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.BoostDocumentRule;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.dbflute.optional.OptionalEntity;
|
||||
|
@ -76,7 +77,7 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final SearchForm form) {
|
||||
copyBeanToBean(form, boostDocumentRulePager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form, boostDocumentRulePager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminBoostdocumentrule_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -116,7 +117,7 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
return asHtml(path_AdminBoostdocumentrule_EditJsp).useForm(CreateForm.class, op -> {
|
||||
op.setup(form -> {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -124,7 +125,7 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editpage(final int crudMode, final String id) {
|
||||
verifyCrudMode(crudMode, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(crudMode, CrudMode.EDIT);
|
||||
return asHtml(path_AdminBoostdocumentrule_EditJsp).useForm(EditForm.class, op -> {
|
||||
op.setup(form -> {
|
||||
boostDocumentRuleService.getBoostDocumentRule(id).ifPresent(entity -> {
|
||||
|
@ -142,7 +143,7 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse createagain(final CreateForm form) {
|
||||
verifyCrudMode(form.crudMode, CommonConstants.CREATE_MODE);
|
||||
verifyCrudMode(form.crudMode, CrudMode.CREATE);
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
return asHtml(path_AdminBoostdocumentrule_EditJsp);
|
||||
}
|
||||
|
@ -150,7 +151,7 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editagain(final EditForm form) {
|
||||
verifyCrudMode(form.crudMode, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form.crudMode, CrudMode.EDIT);
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
return asHtml(path_AdminBoostdocumentrule_EditJsp);
|
||||
}
|
||||
|
@ -159,8 +160,8 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse editfromconfirm(final EditForm form) {
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
String id = form.id;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
final String id = form.id;
|
||||
boostDocumentRuleService.getBoostDocumentRule(id).ifPresent(entity -> {
|
||||
copyBeanToBean(entity, form, op -> {});
|
||||
}).orElse(() -> {
|
||||
|
@ -172,7 +173,7 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletepage(final int crudMode, final String id) {
|
||||
verifyCrudMode(crudMode, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(crudMode, CrudMode.DELETE);
|
||||
return asHtml(path_AdminBoostdocumentrule_ConfirmJsp).useForm(EditForm.class, op -> {
|
||||
op.setup(form -> {
|
||||
boostDocumentRuleService.getBoostDocumentRule(id).ifPresent(entity -> {
|
||||
|
@ -191,8 +192,8 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final EditForm form) {
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
String id = form.id;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
final String id = form.id;
|
||||
boostDocumentRuleService.getBoostDocumentRule(id).ifPresent(entity -> {
|
||||
copyBeanToBean(entity, form, op -> {});
|
||||
}).orElse(() -> {
|
||||
|
@ -206,7 +207,7 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
// -------
|
||||
@Execute
|
||||
public HtmlResponse confirmpage(final int crudMode, final String id) {
|
||||
verifyCrudMode(crudMode, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(crudMode, CrudMode.CONFIRM);
|
||||
return asHtml(path_AdminBoostdocumentrule_ConfirmJsp).useForm(EditForm.class, op -> {
|
||||
op.setup(form -> {
|
||||
boostDocumentRuleService.getBoostDocumentRule(id).ifPresent(entity -> {
|
||||
|
@ -225,7 +226,7 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse confirmfromcreate(final CreateForm form) {
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminBoostdocumentrule_ConfirmJsp);
|
||||
}
|
||||
|
||||
|
@ -233,7 +234,7 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse confirmfromupdate(final EditForm form) {
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
return asHtml(path_AdminBoostdocumentrule_ConfirmJsp);
|
||||
}
|
||||
|
||||
|
@ -243,10 +244,10 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
@Token(save = false, validate = true)
|
||||
@Execute
|
||||
public HtmlResponse create(final CreateForm form) {
|
||||
verifyCrudMode(form.crudMode, CommonConstants.CREATE_MODE);
|
||||
verifyCrudMode(form.crudMode, CrudMode.CREATE);
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
createBoostDocumentRule(form).ifPresent(entity -> {
|
||||
copyBeanToBean(form, entity, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, entity, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
boostDocumentRuleService.store(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudCreateCrudTable(GLOBAL));
|
||||
}).orElse(() -> {
|
||||
|
@ -258,10 +259,10 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
@Token(save = false, validate = true)
|
||||
@Execute
|
||||
public HtmlResponse update(final EditForm form) {
|
||||
verifyCrudMode(form.crudMode, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form.crudMode, CrudMode.EDIT);
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
createBoostDocumentRule(form).ifPresent(entity -> {
|
||||
copyBeanToBean(form, entity, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, entity, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
boostDocumentRuleService.store(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudUpdateCrudTable(GLOBAL));
|
||||
}).orElse(() -> {
|
||||
|
@ -272,9 +273,9 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final EditForm form) {
|
||||
verifyCrudMode(form.crudMode, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form.crudMode, CrudMode.DELETE);
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
String id = form.id;
|
||||
final String id = form.id;
|
||||
boostDocumentRuleService.getBoostDocumentRule(id).ifPresent(entity -> {
|
||||
boostDocumentRuleService.delete(entity);
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
|
@ -292,9 +293,9 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
switch (form.crudMode) {
|
||||
case CommonConstants.CREATE_MODE:
|
||||
case CrudMode.CREATE:
|
||||
if (form instanceof CreateForm) {
|
||||
BoostDocumentRule entity = new BoostDocumentRule();
|
||||
final BoostDocumentRule entity = new BoostDocumentRule();
|
||||
entity.setCreatedBy(username);
|
||||
entity.setCreatedTime(currentTime);
|
||||
entity.setUpdatedBy(username);
|
||||
|
@ -302,7 +303,7 @@ public class AdminBoostdocumentruleAction extends FessAdminAction {
|
|||
return OptionalEntity.of(entity);
|
||||
}
|
||||
break;
|
||||
case CommonConstants.EDIT_MODE:
|
||||
case CrudMode.EDIT:
|
||||
if (form instanceof EditForm) {
|
||||
return boostDocumentRuleService.getBoostDocumentRule(((EditForm) form).id).map(entity -> {
|
||||
entity.setUpdatedBy(username);
|
||||
|
|
|
@ -6,7 +6,7 @@ import javax.validation.constraints.Max;
|
|||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.lastaflute.web.validation.Required;
|
||||
|
||||
|
@ -37,7 +37,7 @@ public class CreateForm implements Serializable {
|
|||
public Long createdTime;
|
||||
|
||||
public void initialize() {
|
||||
crudMode = CommonConstants.CREATE_MODE;
|
||||
crudMode = CrudMode.CREATE;
|
||||
sortOrder = 0;
|
||||
createdBy = ComponentUtil.getSystemHelper().getUsername();
|
||||
createdTime = ComponentUtil.getSystemHelper().getCurrentTimeAsLong();
|
||||
|
|
|
@ -21,11 +21,12 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.CrawlingSessionPager;
|
||||
import org.codelibs.fess.app.service.CrawlingSessionService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.CrawlingSession;
|
||||
import org.codelibs.fess.helper.JobHelper;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
|
@ -89,7 +90,7 @@ public class AdminCrawlingsessionAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final CrawlingSessionSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, crawlingSessionPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, crawlingSessionPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminCrawlingsession_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -114,7 +115,7 @@ public class AdminCrawlingsessionAction extends FessAdminAction {
|
|||
data.register("crawlingSessionItems", crawlingSessionService.getCrawlingSessionList(crawlingSessionPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(crawlingSessionPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(crawlingSessionPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -128,7 +129,7 @@ public class AdminCrawlingsessionAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final CrawlingSessionEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadCrawlingSession(form);
|
||||
return asHtml(path_AdminCrawlingsession_ConfirmJsp);
|
||||
}
|
||||
|
@ -136,7 +137,7 @@ public class AdminCrawlingsessionAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final CrawlingSessionEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadCrawlingSession(form);
|
||||
return asHtml(path_AdminCrawlingsession_ConfirmJsp);
|
||||
}
|
||||
|
@ -148,7 +149,7 @@ public class AdminCrawlingsessionAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final CrawlingSessionEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadCrawlingSession(form);
|
||||
return asHtml(path_AdminCrawlingsession_ConfirmJsp);
|
||||
}
|
||||
|
@ -158,7 +159,7 @@ public class AdminCrawlingsessionAction extends FessAdminAction {
|
|||
// -------------
|
||||
@Execute
|
||||
public HtmlResponse delete(final CrawlingSessionEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
crawlingSessionService.delete(getCrawlingSession(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
|
|
@ -29,8 +29,8 @@ import org.codelibs.fess.app.pager.DataConfigPager;
|
|||
import org.codelibs.fess.app.service.DataConfigService;
|
||||
import org.codelibs.fess.app.service.LabelTypeService;
|
||||
import org.codelibs.fess.app.service.RoleTypeService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.ds.DataStoreFactory;
|
||||
import org.codelibs.fess.es.exentity.DataConfig;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
|
@ -91,7 +91,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final DataConfigSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, dataConfigPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, dataConfigPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminDataconfig_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -116,7 +116,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
data.register("dataConfigItems", dataConfigService.getDataConfigList(dataConfigPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(dataConfigPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(dataConfigPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -129,7 +129,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final DataConfigEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminDataconfig_EditJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
registerHandlerNames(data);
|
||||
|
@ -141,7 +141,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final DataConfigEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadDataConfig(form);
|
||||
return asHtml(path_AdminDataconfig_EditJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -161,7 +161,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final DataConfigEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadDataConfig(form);
|
||||
return asHtml(path_AdminDataconfig_EditJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -174,7 +174,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final DataConfigEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadDataConfig(form);
|
||||
return asHtml(path_AdminDataconfig_ConfirmJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -185,7 +185,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final DataConfigEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadDataConfig(form);
|
||||
return asHtml(path_AdminDataconfig_ConfirmJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -201,7 +201,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
try {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadDataConfig(form);
|
||||
return asHtml(path_AdminDataconfig_ConfirmJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -256,7 +256,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final DataConfigEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
dataConfigService.delete(getDataConfig(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -281,7 +281,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
DataConfig dataConfig;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
dataConfig = getDataConfig(form);
|
||||
} else {
|
||||
dataConfig = new DataConfig();
|
||||
|
@ -290,7 +290,7 @@ public class AdminDataconfigAction extends FessAdminAction {
|
|||
}
|
||||
dataConfig.setUpdatedBy(username);
|
||||
dataConfig.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, dataConfig, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, dataConfig, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return dataConfig;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@ import org.codelibs.core.io.FileUtil;
|
|||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.core.misc.DynamicProperties;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
import org.lastaflute.web.callback.ActionRuntime;
|
||||
|
@ -206,7 +206,7 @@ public class AdminDesignAction extends FessAdminAction implements Serializable {
|
|||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
// Edit
|
||||
// Edit
|
||||
// ------
|
||||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.apache.commons.logging.LogFactory;
|
|||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.crud.util.SAStrutsUtil;
|
||||
import org.codelibs.fess.dict.DictionaryExpiredException;
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory;
|
|||
import org.codelibs.core.beans.util.BeanUtil;
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.crud.CrudMessageException;
|
||||
import org.codelibs.fess.crud.util.SAStrutsUtil;
|
||||
import org.codelibs.fess.dict.DictionaryExpiredException;
|
||||
|
|
|
@ -21,10 +21,10 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.app.pager.FailureUrlPager;
|
||||
import org.codelibs.fess.app.service.FailureUrlService;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.FailureUrl;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -77,7 +77,7 @@ public class AdminFailureurlAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final FailureUrlSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, failureUrlPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, failureUrlPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminFailureurl_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -102,7 +102,7 @@ public class AdminFailureurlAction extends FessAdminAction {
|
|||
data.register("failureUrlItems", failureUrlService.getFailureUrlList(failureUrlPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(failureUrlPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(failureUrlPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// -----------------------------------------------------
|
||||
|
@ -113,7 +113,7 @@ public class AdminFailureurlAction extends FessAdminAction {
|
|||
// TODO
|
||||
// form.crudMode = crudMode;
|
||||
// form.id = id;
|
||||
// verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
// verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadFailureUrl(form);
|
||||
return asHtml(path_AdminFailureurl_ConfirmJsp);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ public class AdminFailureurlAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final FailureUrlEditForm form) {
|
||||
// TODO verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
// TODO verifyCrudMode(form, CrudMode.DELETE);
|
||||
failureUrlService.delete(getFailureUrl(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
|
|
@ -37,7 +37,7 @@ public class FailureUrlEditForm implements Serializable {
|
|||
|
||||
public Map<String, String> searchParams = new HashMap<String, String>();
|
||||
|
||||
//@IntegerType
|
||||
//@IntegerType
|
||||
// TODO necessary?
|
||||
public int crudMode;
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ import org.codelibs.fess.annotation.Token;
|
|||
import org.codelibs.fess.app.pager.FileAuthenticationPager;
|
||||
import org.codelibs.fess.app.service.FileAuthenticationService;
|
||||
import org.codelibs.fess.app.service.FileConfigService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.FileAuthentication;
|
||||
import org.codelibs.fess.es.exentity.FileConfig;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
|
@ -89,7 +89,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final FileAuthenticationSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, fileAuthenticationPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, fileAuthenticationPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminFileauthentication_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -114,7 +114,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
data.register("fileAuthenticationItems", fileAuthenticationService.getFileAuthenticationList(fileAuthenticationPager)); // page navi
|
||||
data.register("displayCreateLink", !fileConfigService.getAllFileConfigList(false, false, false, null).isEmpty());
|
||||
// restore from pager
|
||||
copyBeanToBean(fileAuthenticationPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(fileAuthenticationPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -127,7 +127,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final FileAuthenticationEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminFileauthentication_EditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerFileConfigItems(data);
|
||||
|
@ -139,7 +139,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final FileAuthenticationEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadFileAuthentication(form);
|
||||
return asHtml(path_AdminFileauthentication_EditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -159,7 +159,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final FileAuthenticationEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadFileAuthentication(form);
|
||||
return asHtml(path_AdminFileauthentication_EditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -172,7 +172,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final FileAuthenticationEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadFileAuthentication(form);
|
||||
return asHtml(path_AdminFileauthentication_ConfirmJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -183,7 +183,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final FileAuthenticationEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadFileAuthentication(form);
|
||||
return asHtml(path_AdminFileauthentication_ConfirmJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -198,7 +198,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final FileAuthenticationEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadFileAuthentication(form);
|
||||
return asHtml(path_AdminFileauthentication_ConfirmJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -249,7 +249,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final FileAuthenticationEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
fileAuthenticationService.delete(getFileAuthentication(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -274,7 +274,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
FileAuthentication fileAuthentication;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
fileAuthentication = getFileAuthentication(form);
|
||||
} else {
|
||||
fileAuthentication = new FileAuthentication();
|
||||
|
@ -283,7 +283,7 @@ public class AdminFileauthenticationAction extends FessAdminAction {
|
|||
}
|
||||
fileAuthentication.setUpdatedBy(username);
|
||||
fileAuthentication.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, fileAuthentication, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, fileAuthentication, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return fileAuthentication;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,13 +21,14 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.FileConfigPager;
|
||||
import org.codelibs.fess.app.service.FileConfigService;
|
||||
import org.codelibs.fess.app.service.LabelTypeService;
|
||||
import org.codelibs.fess.app.service.RoleTypeService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.FileConfig;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -85,7 +86,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final FileConfigSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, fileConfigPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, fileConfigPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminFileconfig_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -110,7 +111,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
data.register("fileConfigItems", fileConfigService.getFileConfigList(fileConfigPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(fileConfigPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(fileConfigPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -123,7 +124,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final FileConfigEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminFileconfig_EditJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
});
|
||||
|
@ -134,7 +135,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final FileConfigEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadFileConfig(form);
|
||||
return asHtml(path_AdminFileconfig_EditJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -152,7 +153,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final FileConfigEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadFileConfig(form);
|
||||
return asHtml(path_AdminFileconfig_EditJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -164,7 +165,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final FileConfigEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadFileConfig(form);
|
||||
return asHtml(path_AdminFileconfig_ConfirmJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -174,7 +175,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final FileConfigEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadFileConfig(form);
|
||||
return asHtml(path_AdminFileconfig_ConfirmJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -189,7 +190,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
try {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadFileConfig(form);
|
||||
return asHtml(path_AdminFileconfig_ConfirmJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -241,7 +242,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final FileConfigEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
fileConfigService.delete(getFileConfig(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -266,7 +267,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
FileConfig fileConfig;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
fileConfig = getFileConfig(form);
|
||||
} else {
|
||||
fileConfig = new FileConfig();
|
||||
|
@ -275,7 +276,7 @@ public class AdminFileconfigAction extends FessAdminAction {
|
|||
}
|
||||
fileConfig.setUpdatedBy(username);
|
||||
fileConfig.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, fileConfig, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, fileConfig, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return fileConfig;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ import org.codelibs.fess.Constants;
|
|||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.GroupPager;
|
||||
import org.codelibs.fess.app.service.GroupService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.Group;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -80,7 +80,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final GroupSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, groupPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, groupPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminGroup_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -105,7 +105,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
data.register("groupItems", groupService.getGroupList(groupPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(groupPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(groupPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -118,7 +118,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final GroupEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminGroup_EditJsp);
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final GroupEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadGroup(form);
|
||||
return asHtml(path_AdminGroup_EditJsp);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final GroupEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadGroup(form);
|
||||
return asHtml(path_AdminGroup_EditJsp);
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final GroupEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadGroup(form);
|
||||
return asHtml(path_AdminGroup_ConfirmJsp);
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final GroupEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadGroup(form);
|
||||
return asHtml(path_AdminGroup_ConfirmJsp);
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final GroupEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadGroup(form);
|
||||
return asHtml(path_AdminGroup_ConfirmJsp);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final GroupEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
groupService.delete(getGroup(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -236,12 +236,12 @@ public class AdminGroupAction extends FessAdminAction {
|
|||
|
||||
protected Group createGroup(final GroupEditForm form) {
|
||||
Group group;
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
group = getGroup(form);
|
||||
} else {
|
||||
group = new Group();
|
||||
}
|
||||
copyBeanToBean(form, group, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, group, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
group.setId(Base64.getEncoder().encodeToString(group.getName().getBytes(Constants.CHARSET_UTF_8)));
|
||||
return group;
|
||||
}
|
||||
|
|
|
@ -21,11 +21,12 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.JobLogPager;
|
||||
import org.codelibs.fess.app.service.JobLogService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.JobLog;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -79,7 +80,7 @@ public class AdminJoblogAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final JobLogSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, jobLogPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, jobLogPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminJoblog_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -104,7 +105,7 @@ public class AdminJoblogAction extends FessAdminAction {
|
|||
data.register("jobLogItems", jobLogService.getJobLogList(jobLogPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(jobLogPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(jobLogPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -118,7 +119,7 @@ public class AdminJoblogAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final JobLogEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadJobLog(form);
|
||||
return asHtml(path_AdminJoblog_ConfirmJsp);
|
||||
}
|
||||
|
@ -126,7 +127,7 @@ public class AdminJoblogAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final JobLogEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadJobLog(form);
|
||||
return asHtml(path_AdminJoblog_ConfirmJsp);
|
||||
}
|
||||
|
@ -138,7 +139,7 @@ public class AdminJoblogAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final JobLogEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadJobLog(form);
|
||||
return asHtml(path_AdminJoblog_ConfirmJsp);
|
||||
}
|
||||
|
@ -148,7 +149,7 @@ public class AdminJoblogAction extends FessAdminAction {
|
|||
// -------------
|
||||
@Execute
|
||||
public HtmlResponse delete(final JobLogEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
jobLogService.delete(getJobLog(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
|
|
@ -21,11 +21,12 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.KeyMatchPager;
|
||||
import org.codelibs.fess.app.service.KeyMatchService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.KeyMatch;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
|
@ -80,7 +81,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final KeyMatchSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, keyMatchPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, keyMatchPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminKeymatch_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -105,7 +106,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
data.register("keyMatchItems", keyMatchService.getKeyMatchList(keyMatchPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(keyMatchPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(keyMatchPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -118,7 +119,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final KeyMatchEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminKeymatch_EditJsp);
|
||||
}
|
||||
|
||||
|
@ -127,7 +128,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final KeyMatchEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadKeyMatch(form);
|
||||
return asHtml(path_AdminKeymatch_EditJsp);
|
||||
}
|
||||
|
@ -141,7 +142,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final KeyMatchEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadKeyMatch(form);
|
||||
return asHtml(path_AdminKeymatch_EditJsp);
|
||||
}
|
||||
|
@ -151,7 +152,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final KeyMatchEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadKeyMatch(form);
|
||||
return asHtml(path_AdminKeymatch_ConfirmJsp);
|
||||
}
|
||||
|
@ -159,7 +160,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final KeyMatchEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadKeyMatch(form);
|
||||
return asHtml(path_AdminKeymatch_ConfirmJsp);
|
||||
}
|
||||
|
@ -171,7 +172,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final KeyMatchEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadKeyMatch(form);
|
||||
return asHtml(path_AdminKeymatch_ConfirmJsp);
|
||||
}
|
||||
|
@ -215,7 +216,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final KeyMatchEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
keyMatchService.delete(getKeyMatch(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
ComponentUtil.getKeyMatchHelper().update();
|
||||
|
@ -241,7 +242,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
KeyMatch keyMatch;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
keyMatch = getKeyMatch(form);
|
||||
} else {
|
||||
keyMatch = new KeyMatch();
|
||||
|
@ -250,7 +251,7 @@ public class AdminKeymatchAction extends FessAdminAction {
|
|||
}
|
||||
keyMatch.setUpdatedBy(username);
|
||||
keyMatch.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, keyMatch, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, keyMatch, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return keyMatch;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,12 +21,13 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.LabelTypePager;
|
||||
import org.codelibs.fess.app.service.LabelTypeService;
|
||||
import org.codelibs.fess.app.service.RoleTypeService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.LabelType;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -82,7 +83,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final LabelTypeSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, labelTypePager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, labelTypePager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminLabeltype_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -107,7 +108,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
data.register("labelTypeItems", labelTypeService.getLabelTypeList(labelTypePager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(labelTypePager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(labelTypePager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -120,7 +121,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final LabelTypeEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminLabeltype_EditJsp).renderWith(data -> {
|
||||
data.register("roleTypeItems", roleTypeService.getRoleTypeList());
|
||||
});
|
||||
|
@ -131,7 +132,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final LabelTypeEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadLabelType(form);
|
||||
return asHtml(path_AdminLabeltype_EditJsp).renderWith(data -> {
|
||||
data.register("roleTypeItems", roleTypeService.getRoleTypeList());
|
||||
|
@ -149,7 +150,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final LabelTypeEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadLabelType(form);
|
||||
return asHtml(path_AdminLabeltype_EditJsp).renderWith(data -> {
|
||||
data.register("roleTypeItems", roleTypeService.getRoleTypeList());
|
||||
|
@ -161,7 +162,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final LabelTypeEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadLabelType(form);
|
||||
return asHtml(path_AdminLabeltype_ConfirmJsp).renderWith(data -> {
|
||||
data.register("roleTypeItems", roleTypeService.getRoleTypeList());
|
||||
|
@ -171,7 +172,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final LabelTypeEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadLabelType(form);
|
||||
return asHtml(path_AdminLabeltype_ConfirmJsp).renderWith(data -> {
|
||||
data.register("roleTypeItems", roleTypeService.getRoleTypeList());
|
||||
|
@ -185,7 +186,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final LabelTypeEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadLabelType(form);
|
||||
return asHtml(path_AdminLabeltype_ConfirmJsp).renderWith(data -> {
|
||||
data.register("roleTypeItems", roleTypeService.getRoleTypeList());
|
||||
|
@ -233,7 +234,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final LabelTypeEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
labelTypeService.delete(getLabelType(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -258,7 +259,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
LabelType labelType;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
labelType = getLabelType(form);
|
||||
} else {
|
||||
labelType = new LabelType();
|
||||
|
@ -267,7 +268,7 @@ public class AdminLabeltypeAction extends FessAdminAction {
|
|||
}
|
||||
labelType.setUpdatedBy(username);
|
||||
labelType.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, labelType, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, labelType, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return labelType;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,11 +21,12 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.OverlappingHostPager;
|
||||
import org.codelibs.fess.app.service.OverlappingHostService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.OverlappingHost;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -79,7 +80,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final OverlappingHostSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, overlappingHostPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, overlappingHostPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminOverlappinghost_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -104,7 +105,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
data.register("overlappingHostItems", overlappingHostService.getOverlappingHostList(overlappingHostPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(overlappingHostPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(overlappingHostPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -117,7 +118,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final OverlappingHostEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminOverlappinghost_EditJsp);
|
||||
}
|
||||
|
||||
|
@ -126,7 +127,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final OverlappingHostEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadOverlappingHost(form);
|
||||
return asHtml(path_AdminOverlappinghost_EditJsp);
|
||||
}
|
||||
|
@ -140,7 +141,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final OverlappingHostEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadOverlappingHost(form);
|
||||
return asHtml(path_AdminOverlappinghost_EditJsp);
|
||||
}
|
||||
|
@ -150,7 +151,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final OverlappingHostEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadOverlappingHost(form);
|
||||
return asHtml(path_AdminOverlappinghost_ConfirmJsp);
|
||||
}
|
||||
|
@ -158,7 +159,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final OverlappingHostEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadOverlappingHost(form);
|
||||
return asHtml(path_AdminOverlappinghost_ConfirmJsp);
|
||||
}
|
||||
|
@ -170,7 +171,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final OverlappingHostEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadOverlappingHost(form);
|
||||
return asHtml(path_AdminOverlappinghost_ConfirmJsp);
|
||||
}
|
||||
|
@ -212,7 +213,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final OverlappingHostEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
overlappingHostService.delete(getOverlappingHost(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -237,7 +238,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
OverlappingHost overlappingHost;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
overlappingHost = getOverlappingHost(form);
|
||||
} else {
|
||||
overlappingHost = new OverlappingHost();
|
||||
|
@ -246,7 +247,7 @@ public class AdminOverlappinghostAction extends FessAdminAction {
|
|||
}
|
||||
overlappingHost.setUpdatedBy(username);
|
||||
overlappingHost.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, overlappingHost, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, overlappingHost, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return overlappingHost;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,11 +21,12 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.PathMappingPager;
|
||||
import org.codelibs.fess.app.service.PathMappingService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.PathMapping;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -79,7 +80,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final PathMappingSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, pathMappingPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, pathMappingPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminPathmapping_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -104,7 +105,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
data.register("pathMappingItems", pathMappingService.getPathMappingList(pathMappingPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(pathMappingPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(pathMappingPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -117,7 +118,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final PathMappingEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminPathmapping_EditJsp);
|
||||
}
|
||||
|
||||
|
@ -126,7 +127,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final PathMappingEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadPathMapping(form);
|
||||
return asHtml(path_AdminPathmapping_EditJsp);
|
||||
}
|
||||
|
@ -140,7 +141,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final PathMappingEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadPathMapping(form);
|
||||
return asHtml(path_AdminPathmapping_EditJsp);
|
||||
}
|
||||
|
@ -150,7 +151,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final PathMappingEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadPathMapping(form);
|
||||
return asHtml(path_AdminPathmapping_ConfirmJsp);
|
||||
}
|
||||
|
@ -158,7 +159,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final PathMappingEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadPathMapping(form);
|
||||
return asHtml(path_AdminPathmapping_ConfirmJsp);
|
||||
}
|
||||
|
@ -170,7 +171,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final PathMappingEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadPathMapping(form);
|
||||
return asHtml(path_AdminPathmapping_ConfirmJsp);
|
||||
}
|
||||
|
@ -212,7 +213,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final PathMappingEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
pathMappingService.delete(getPathMapping(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -237,7 +238,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
PathMapping pathMapping;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
pathMapping = getPathMapping(form);
|
||||
} else {
|
||||
pathMapping = new PathMapping();
|
||||
|
@ -246,7 +247,7 @@ public class AdminPathmappingAction extends FessAdminAction {
|
|||
}
|
||||
pathMapping.setUpdatedBy(username);
|
||||
pathMapping.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, pathMapping, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, pathMapping, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return pathMapping;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ import org.codelibs.fess.annotation.Token;
|
|||
import org.codelibs.fess.app.pager.RequestHeaderPager;
|
||||
import org.codelibs.fess.app.service.RequestHeaderService;
|
||||
import org.codelibs.fess.app.service.WebConfigService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.RequestHeader;
|
||||
import org.codelibs.fess.es.exentity.WebConfig;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
|
@ -89,7 +89,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final RequestHeaderSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, requestHeaderPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, requestHeaderPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminRequestheader_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -115,7 +115,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
data.register("displayCreateLink", !webConfigService.getAllWebConfigList(false, false, false, null).isEmpty());
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(requestHeaderPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(requestHeaderPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -128,7 +128,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final RequestHeaderEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminRequestheader_EditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerWebConfigItems(data);
|
||||
|
@ -140,7 +140,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final RequestHeaderEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadRequestHeader(form);
|
||||
return asHtml(path_AdminRequestheader_EditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -160,7 +160,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final RequestHeaderEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadRequestHeader(form);
|
||||
return asHtml(path_AdminRequestheader_EditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -173,7 +173,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final RequestHeaderEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadRequestHeader(form);
|
||||
return asHtml(path_AdminRequestheader_ConfirmJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -184,7 +184,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final RequestHeaderEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadRequestHeader(form);
|
||||
return asHtml(path_AdminRequestheader_ConfirmJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -199,7 +199,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final RequestHeaderEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadRequestHeader(form);
|
||||
return asHtml(path_AdminRequestheader_ConfirmJsp);
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final RequestHeaderEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
requestHeaderService.delete(getRequestHeader(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -266,7 +266,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
RequestHeader requestHeader;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
requestHeader = getRequestHeader(form);
|
||||
} else {
|
||||
requestHeader = new RequestHeader();
|
||||
|
@ -275,7 +275,7 @@ public class AdminRequestheaderAction extends FessAdminAction {
|
|||
}
|
||||
requestHeader.setUpdatedBy(username);
|
||||
requestHeader.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, requestHeader, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, requestHeader, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return requestHeader;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ import org.codelibs.fess.Constants;
|
|||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.RolePager;
|
||||
import org.codelibs.fess.app.service.RoleService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.Role;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -80,7 +80,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final RoleSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, rolePager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, rolePager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminRole_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -105,7 +105,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
data.register("roleItems", roleService.getRoleList(rolePager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(rolePager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(rolePager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -118,7 +118,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final RoleEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminRole_EditJsp);
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final RoleEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadRole(form);
|
||||
return asHtml(path_AdminRole_EditJsp);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final RoleEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadRole(form);
|
||||
return asHtml(path_AdminRole_EditJsp);
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final RoleEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadRole(form);
|
||||
return asHtml(path_AdminRole_ConfirmJsp);
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final RoleEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadRole(form);
|
||||
return asHtml(path_AdminRole_ConfirmJsp);
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final RoleEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadRole(form);
|
||||
return asHtml(path_AdminRole_ConfirmJsp);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final RoleEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
roleService.delete(getRole(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -236,12 +236,12 @@ public class AdminRoleAction extends FessAdminAction {
|
|||
|
||||
protected Role createRole(final RoleEditForm form) {
|
||||
Role role;
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
role = getRole(form);
|
||||
} else {
|
||||
role = new Role();
|
||||
}
|
||||
copyBeanToBean(form, role, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, role, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
role.setId(Base64.getEncoder().encodeToString(role.getName().getBytes(Constants.CHARSET_UTF_8)));
|
||||
return role;
|
||||
}
|
||||
|
|
|
@ -21,11 +21,12 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.RoleTypePager;
|
||||
import org.codelibs.fess.app.service.RoleTypeService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.RoleType;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -79,7 +80,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final RoleTypeSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, roleTypePager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, roleTypePager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminRoletype_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -104,7 +105,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
data.register("roleTypeItems", roleTypeService.getRoleTypeList(roleTypePager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(roleTypePager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(roleTypePager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -116,7 +117,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse createpage(final RoleTypeEditForm form) {
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminRoletype_EditJsp);
|
||||
}
|
||||
|
||||
|
@ -125,7 +126,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final RoleTypeEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadRoleType(form);
|
||||
return asHtml(path_AdminRoletype_EditJsp);
|
||||
}
|
||||
|
@ -139,7 +140,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final RoleTypeEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadRoleType(form);
|
||||
return asHtml(path_AdminRoletype_EditJsp);
|
||||
}
|
||||
|
@ -149,7 +150,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final RoleTypeEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadRoleType(form);
|
||||
return asHtml(path_AdminRoletype_ConfirmJsp);
|
||||
}
|
||||
|
@ -157,7 +158,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final RoleTypeEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadRoleType(form);
|
||||
return asHtml(path_AdminRoletype_ConfirmJsp);
|
||||
}
|
||||
|
@ -169,7 +170,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final RoleTypeEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadRoleType(form);
|
||||
return asHtml(path_AdminRoletype_ConfirmJsp);
|
||||
}
|
||||
|
@ -211,7 +212,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final RoleTypeEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
roleTypeService.delete(getRoleType(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -236,7 +237,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
RoleType roleType;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
roleType = getRoleType(form);
|
||||
} else {
|
||||
roleType = new RoleType();
|
||||
|
@ -245,7 +246,7 @@ public class AdminRoletypeAction extends FessAdminAction {
|
|||
}
|
||||
roleType.setUpdatedBy(username);
|
||||
roleType.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, roleType, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, roleType, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return roleType;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ import org.codelibs.fess.Constants;
|
|||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.ScheduledJobPager;
|
||||
import org.codelibs.fess.app.service.ScheduledJobService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.ScheduledJob;
|
||||
import org.codelibs.fess.helper.JobHelper;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
|
@ -88,7 +88,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final ScheduledjobSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, scheduledJobPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, scheduledJobPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminScheduledjob_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -113,7 +113,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
data.register("scheduledJobItems", scheduledJobService.getScheduledJobList(scheduledJobPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(scheduledJobPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(scheduledJobPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -126,7 +126,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final ScheduledjobEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminScheduledjob_EditJsp);
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final ScheduledjobEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadScheduledJob(form);
|
||||
return asHtml(path_AdminScheduledjob_EditJsp);
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final ScheduledjobEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadScheduledJob(form);
|
||||
return asHtml(path_AdminScheduledjob_EditJsp);
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final ScheduledjobEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadScheduledJob(form);
|
||||
return asHtml(path_AdminScheduledjob_ConfirmJsp);
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final ScheduledjobEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadScheduledJob(form);
|
||||
return asHtml(path_AdminScheduledjob_ConfirmJsp);
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final ScheduledjobEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadScheduledJob(form);
|
||||
return asHtml(path_AdminScheduledjob_ConfirmJsp).renderWith(data -> {
|
||||
data.register("running", running);
|
||||
|
@ -227,7 +227,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final ScheduledjobEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
scheduledJobService.delete(getScheduledJob(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -235,7 +235,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse start(final ScheduledjobEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
final ScheduledJob scheduledJob = getScheduledJob(form);
|
||||
try {
|
||||
scheduledJob.start();
|
||||
|
@ -250,7 +250,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse stop(final ScheduledjobEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
final ScheduledJob scheduledJob = getScheduledJob(form);
|
||||
try {
|
||||
final JobExecutor jobExecutoer = jobHelper.getJobExecutoer(scheduledJob.getId());
|
||||
|
@ -288,7 +288,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
ScheduledJob scheduledJob;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
scheduledJob = getScheduledJob(form);
|
||||
} else {
|
||||
scheduledJob = new ScheduledJob();
|
||||
|
@ -297,7 +297,7 @@ public class AdminScheduledjobAction extends FessAdminAction {
|
|||
}
|
||||
scheduledJob.setUpdatedBy(username);
|
||||
scheduledJob.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, scheduledJob, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, scheduledJob, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
scheduledJob.setJobLogging(Constants.ON.equals(form.jobLogging) ? Constants.T : Constants.F);
|
||||
scheduledJob.setCrawler(Constants.ON.equals(form.crawler) ? Constants.T : Constants.F);
|
||||
scheduledJob.setAvailable(Constants.ON.equals(form.available) ? Constants.T : Constants.F);
|
||||
|
|
|
@ -24,12 +24,12 @@ import javax.annotation.Resource;
|
|||
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.InvalidQueryException;
|
||||
import org.codelibs.fess.ResultOffsetExceededException;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.client.FessEsClient;
|
||||
import org.codelibs.fess.client.FessEsClient.SearchConditionBuilder;
|
||||
import org.codelibs.fess.es.client.FessEsClient;
|
||||
import org.codelibs.fess.es.client.FessEsClient.SearchConditionBuilder;
|
||||
import org.codelibs.fess.exception.InvalidQueryException;
|
||||
import org.codelibs.fess.exception.ResultOffsetExceededException;
|
||||
import org.codelibs.fess.helper.FieldHelper;
|
||||
import org.codelibs.fess.helper.JobHelper;
|
||||
import org.codelibs.fess.helper.QueryHelper;
|
||||
|
@ -119,8 +119,6 @@ public class AdminSearchlistAction extends FessAdminAction {
|
|||
}
|
||||
|
||||
private void doSearchInternal(final RenderData data, final SearchListForm form) {
|
||||
final String query = form.query;
|
||||
|
||||
// init pager
|
||||
if (StringUtil.isBlank(form.start)) {
|
||||
form.start = String.valueOf(Constants.DEFAULT_START_COUNT);
|
||||
|
@ -164,7 +162,7 @@ public class AdminSearchlistAction extends FessAdminAction {
|
|||
nf.setMaximumIntegerDigits(2);
|
||||
nf.setMaximumFractionDigits(2);
|
||||
try {
|
||||
String execTime = nf.format((double) queryResponseList.getExecTime() / 1000);
|
||||
nf.format((double) queryResponseList.getExecTime() / 1000);
|
||||
} catch (final Exception e) {}
|
||||
|
||||
copyBeanToBean(documentItems, this, option -> option.include("pageSize", "currentPageNumber", "allRecordCount", "allPageCount",
|
||||
|
@ -242,7 +240,7 @@ public class AdminSearchlistAction extends FessAdminAction {
|
|||
}
|
||||
final Thread thread = new Thread(() -> {
|
||||
if (!jobHelper.isCrawlProcessRunning()) {
|
||||
final long time = System.currentTimeMillis();
|
||||
System.currentTimeMillis();
|
||||
try {
|
||||
final QueryBuilder query = QueryBuilders.termQuery(fieldHelper.docIdField, docId);
|
||||
fessEsClient.deleteByQuery(fieldHelper.docIndex, fieldHelper.docType, query);
|
||||
|
|
|
@ -36,13 +36,13 @@ import org.apache.commons.io.IOUtils;
|
|||
import org.codelibs.core.io.CopyUtil;
|
||||
import org.codelibs.core.misc.DynamicProperties;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.SuggestBadWordPager;
|
||||
import org.codelibs.fess.app.service.SuggestBadWordService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.SuggestBadWord;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
import org.lastaflute.web.callback.ActionRuntime;
|
||||
|
@ -97,7 +97,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final SuggestBadWordSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, suggestBadWordPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, suggestBadWordPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminSuggestbadword_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -121,7 +121,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
protected void searchPaging(final RenderData data, final SuggestBadWordSearchForm form) {
|
||||
data.register("suggestBadWordItems", suggestBadWordService.getSuggestBadWordList(suggestBadWordPager)); // page navi
|
||||
// restore from pager
|
||||
copyBeanToBean(suggestBadWordPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(suggestBadWordPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -134,7 +134,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final SuggestBadWordEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminSuggestbadword_EditJsp);
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final SuggestBadWordEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadSuggestBadWord(form);
|
||||
return asHtml(path_AdminSuggestbadword_EditJsp);
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final SuggestBadWordEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadSuggestBadWord(form);
|
||||
return asHtml(path_AdminSuggestbadword_EditJsp);
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final SuggestBadWordEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadSuggestBadWord(form);
|
||||
return asHtml(path_AdminSuggestbadword_ConfirmJsp);
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final SuggestBadWordEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadSuggestBadWord(form);
|
||||
return asHtml(path_AdminSuggestbadword_ConfirmJsp);
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final SuggestBadWordEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadSuggestBadWord(form);
|
||||
return asHtml(path_AdminSuggestbadword_ConfirmJsp);
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final SuggestBadWordEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
suggestBadWordService.delete(getSuggestBadWord(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -344,7 +344,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
SuggestBadWord suggestBadWord;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
suggestBadWord = getSuggestBadWord(form);
|
||||
} else {
|
||||
suggestBadWord = new SuggestBadWord();
|
||||
|
@ -353,7 +353,7 @@ public class AdminSuggestbadwordAction extends FessAdminAction {
|
|||
}
|
||||
suggestBadWord.setUpdatedBy(username);
|
||||
suggestBadWord.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, suggestBadWord, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, suggestBadWord, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return suggestBadWord;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,13 +36,13 @@ import org.apache.commons.io.IOUtils;
|
|||
import org.codelibs.core.io.CopyUtil;
|
||||
import org.codelibs.core.misc.DynamicProperties;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.SuggestElevateWordPager;
|
||||
import org.codelibs.fess.app.service.SuggestElevateWordService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.SuggestElevateWord;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
import org.lastaflute.web.callback.ActionRuntime;
|
||||
|
@ -97,7 +97,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final SuggestElevateWordSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, suggestElevateWordPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, suggestElevateWordPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminSuggestelevateword_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -121,7 +121,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
protected void searchPaging(final RenderData data, final SuggestElevateWordSearchForm form) {
|
||||
data.register("suggestElevateWordItems", suggestElevateWordService.getSuggestElevateWordList(suggestElevateWordPager)); // page navi
|
||||
// restore from pager
|
||||
copyBeanToBean(suggestElevateWordPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(suggestElevateWordPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -134,7 +134,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final SuggestElevateWordEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminSuggestelevateword_EditJsp);
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final SuggestElevateWordEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadSuggestElevateWord(form);
|
||||
return asHtml(path_AdminSuggestelevateword_EditJsp);
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final SuggestElevateWordEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadSuggestElevateWord(form);
|
||||
return asHtml(path_AdminSuggestelevateword_EditJsp);
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final SuggestElevateWordEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadSuggestElevateWord(form);
|
||||
return asHtml(path_AdminSuggestelevateword_ConfirmJsp);
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final SuggestElevateWordEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadSuggestElevateWord(form);
|
||||
return asHtml(path_AdminSuggestelevateword_ConfirmJsp);
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final SuggestElevateWordEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadSuggestElevateWord(form);
|
||||
return asHtml(path_AdminSuggestelevateword_ConfirmJsp);
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final SuggestElevateWordEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
suggestElevateWordService.delete(getSuggestElevateWord(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -344,7 +344,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
SuggestElevateWord suggestElevateWord;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
suggestElevateWord = getSuggestElevateWord(form);
|
||||
} else {
|
||||
suggestElevateWord = new SuggestElevateWord();
|
||||
|
@ -353,7 +353,7 @@ public class AdminSuggestelevatewordAction extends FessAdminAction {
|
|||
}
|
||||
suggestElevateWord.setUpdatedBy(username);
|
||||
suggestElevateWord.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, suggestElevateWord, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, suggestElevateWord, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return suggestElevateWord;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.codelibs.core.misc.DynamicProperties;
|
|||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.service.ScheduledJobService;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.client.FessEsClient;
|
||||
import org.codelibs.fess.es.client.FessEsClient;
|
||||
import org.codelibs.fess.es.exentity.ScheduledJob;
|
||||
import org.codelibs.fess.helper.JobHelper;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
|
|
|
@ -29,8 +29,8 @@ import org.codelibs.fess.app.pager.UserPager;
|
|||
import org.codelibs.fess.app.service.GroupService;
|
||||
import org.codelibs.fess.app.service.RoleService;
|
||||
import org.codelibs.fess.app.service.UserService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.User;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -91,7 +91,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse search(final UserSearchForm form) {
|
||||
clearStoredPassword();
|
||||
copyBeanToBean(form.searchParams, userPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, userPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminUser_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -118,7 +118,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
data.register("userItems", userService.getUserList(userPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(userPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(userPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
private void registerForms(final RenderData data) {
|
||||
|
@ -137,7 +137,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
public HtmlResponse createpage(final UserEditForm form) {
|
||||
clearStoredPassword();
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminUser_EditJsp).renderWith(data -> {
|
||||
registerForms(data);
|
||||
});
|
||||
|
@ -149,7 +149,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
clearStoredPassword();
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadUser(form, false);
|
||||
return asHtml(path_AdminUser_EditJsp).renderWith(data -> {
|
||||
registerForms(data);
|
||||
|
@ -169,7 +169,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse editfromconfirm(final UserEditForm form) {
|
||||
clearStoredPassword();
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadUser(form, false);
|
||||
return asHtml(path_AdminUser_EditJsp).renderWith(data -> {
|
||||
registerForms(data);
|
||||
|
@ -182,7 +182,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
clearStoredPassword();
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadUser(form, false);
|
||||
return asHtml(path_AdminUser_ConfirmJsp).renderWith(data -> {
|
||||
registerForms(data);
|
||||
|
@ -193,7 +193,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final UserEditForm form) {
|
||||
clearStoredPassword();
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadUser(form, false);
|
||||
return asHtml(path_AdminUser_ConfirmJsp).renderWith(data -> {
|
||||
registerForms(data);
|
||||
|
@ -207,7 +207,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final UserEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
verifyPassword(form);
|
||||
loadUser(form, false);
|
||||
return asHtml(path_AdminUser_ConfirmJsp).renderWith(data -> {
|
||||
|
@ -262,7 +262,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final UserEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
userService.delete(getUser(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -289,7 +289,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
|
||||
protected User createUser(final UserEditForm form) {
|
||||
User user;
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
user = getUser(form);
|
||||
} else {
|
||||
user = new User();
|
||||
|
@ -320,7 +320,7 @@ public class AdminUserAction extends FessAdminAction {
|
|||
}
|
||||
|
||||
protected void verifyPassword(final UserEditForm form) {
|
||||
if (form.crudMode == CommonConstants.CREATE_MODE && StringUtil.isBlank(form.password)) {
|
||||
if (form.crudMode == CrudMode.CREATE && StringUtil.isBlank(form.password)) {
|
||||
throwValidationError(messages -> {
|
||||
messages.addErrorsBlankPassword(GLOBAL);
|
||||
}, toEditHtml());
|
||||
|
|
|
@ -29,8 +29,8 @@ import org.codelibs.fess.annotation.Token;
|
|||
import org.codelibs.fess.app.pager.WebAuthenticationPager;
|
||||
import org.codelibs.fess.app.service.WebAuthenticationService;
|
||||
import org.codelibs.fess.app.service.WebConfigService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.WebAuthentication;
|
||||
import org.codelibs.fess.es.exentity.WebConfig;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
|
@ -90,7 +90,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final WebAuthenticationSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, webAuthenticationPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, webAuthenticationPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminWebauthentication_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -115,7 +115,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
data.register("webAuthenticationItems", webAuthenticationService.getWebAuthenticationList(webAuthenticationPager)); // page navi
|
||||
data.register("displayCreateLink", !webConfigService.getAllWebConfigList(false, false, false, null).isEmpty());
|
||||
// restore from pager
|
||||
copyBeanToBean(webAuthenticationPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(webAuthenticationPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -128,7 +128,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final WebAuthenticationEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminWebauthentication_EditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
registerWebConfigItems(data);
|
||||
|
@ -140,7 +140,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final WebAuthenticationEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadWebAuthentication(form);
|
||||
return asHtml(path_AdminWebauthentication_EditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -160,7 +160,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final WebAuthenticationEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadWebAuthentication(form);
|
||||
return asHtml(path_AdminWebauthentication_EditJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -173,7 +173,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final WebAuthenticationEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadWebAuthentication(form);
|
||||
return asHtml(path_AdminWebauthentication_ConfirmJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -184,7 +184,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final WebAuthenticationEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadWebAuthentication(form);
|
||||
return asHtml(path_AdminWebauthentication_ConfirmJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -199,7 +199,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
public HtmlResponse confirmpage(final int crudMode, final String id, final WebAuthenticationEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadWebAuthentication(form);
|
||||
return asHtml(path_AdminWebauthentication_ConfirmJsp).renderWith(data -> {
|
||||
registerProtocolSchemeItems(data);
|
||||
|
@ -250,7 +250,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final WebAuthenticationEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
webAuthenticationService.delete(getWebAuthentication(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -275,7 +275,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
WebAuthentication webAuthentication;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
webAuthentication = getWebAuthentication(form);
|
||||
} else {
|
||||
webAuthentication = new WebAuthentication();
|
||||
|
@ -284,7 +284,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
}
|
||||
webAuthentication.setUpdatedBy(username);
|
||||
webAuthentication.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, webAuthentication, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, webAuthentication, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return webAuthentication;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,13 +21,14 @@ import java.util.Map;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.annotation.Token;
|
||||
import org.codelibs.fess.app.pager.WebConfigPager;
|
||||
import org.codelibs.fess.app.service.LabelTypeService;
|
||||
import org.codelibs.fess.app.service.RoleTypeService;
|
||||
import org.codelibs.fess.app.service.WebConfigService;
|
||||
import org.codelibs.fess.app.web.CrudMode;
|
||||
import org.codelibs.fess.app.web.base.FessAdminAction;
|
||||
import org.codelibs.fess.crud.CommonConstants;
|
||||
import org.codelibs.fess.es.exentity.WebConfig;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.lastaflute.web.Execute;
|
||||
|
@ -85,7 +86,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse search(final WebConfigSearchForm form) {
|
||||
copyBeanToBean(form.searchParams, webConfigPager, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(form.searchParams, webConfigPager, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
return asHtml(path_AdminWebconfig_IndexJsp).renderWith(data -> {
|
||||
searchPaging(data, form);
|
||||
});
|
||||
|
@ -110,7 +111,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
data.register("webConfigItems", webConfigService.getWebConfigList(webConfigPager)); // page navi
|
||||
|
||||
// restore from pager
|
||||
copyBeanToBean(webConfigPager, form.searchParams, op -> op.exclude(CommonConstants.PAGER_CONVERSION_RULE));
|
||||
copyBeanToBean(webConfigPager, form.searchParams, op -> op.exclude(Constants.PAGER_CONVERSION_RULE));
|
||||
}
|
||||
|
||||
// ===================================================================================
|
||||
|
@ -123,7 +124,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
@Execute
|
||||
public HtmlResponse createpage(final WebConfigEditForm form) {
|
||||
form.initialize();
|
||||
form.crudMode = CommonConstants.CREATE_MODE;
|
||||
form.crudMode = CrudMode.CREATE;
|
||||
return asHtml(path_AdminWebconfig_EditJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
});
|
||||
|
@ -134,7 +135,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
public HtmlResponse editpage(final int crudMode, final String id, final WebConfigEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.EDIT_MODE);
|
||||
verifyCrudMode(form, CrudMode.EDIT);
|
||||
loadWebConfig(form);
|
||||
return asHtml(path_AdminWebconfig_EditJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -152,7 +153,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse editfromconfirm(final WebConfigEditForm form) {
|
||||
form.crudMode = CommonConstants.EDIT_MODE;
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
loadWebConfig(form);
|
||||
return asHtml(path_AdminWebconfig_EditJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -164,7 +165,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
public HtmlResponse deletepage(final int crudMode, final String id, final WebConfigEditForm form) {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
loadWebConfig(form);
|
||||
return asHtml(path_AdminWebconfig_ConfirmJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -174,7 +175,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
@Token(save = true, validate = false)
|
||||
@Execute
|
||||
public HtmlResponse deletefromconfirm(final WebConfigEditForm form) {
|
||||
form.crudMode = CommonConstants.DELETE_MODE;
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
loadWebConfig(form);
|
||||
return asHtml(path_AdminWebconfig_ConfirmJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -189,7 +190,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
try {
|
||||
form.crudMode = crudMode;
|
||||
form.id = id;
|
||||
verifyCrudMode(form, CommonConstants.CONFIRM_MODE);
|
||||
verifyCrudMode(form, CrudMode.CONFIRM);
|
||||
loadWebConfig(form);
|
||||
return asHtml(path_AdminWebconfig_ConfirmJsp).renderWith(data -> {
|
||||
registerRolesAndLabels(data);
|
||||
|
@ -242,7 +243,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
|
||||
@Execute
|
||||
public HtmlResponse delete(final WebConfigEditForm form) {
|
||||
verifyCrudMode(form, CommonConstants.DELETE_MODE);
|
||||
verifyCrudMode(form, CrudMode.DELETE);
|
||||
webConfigService.delete(getWebConfig(form));
|
||||
saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));
|
||||
return redirect(getClass());
|
||||
|
@ -267,7 +268,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
WebConfig webConfig;
|
||||
final String username = systemHelper.getUsername();
|
||||
final long currentTime = systemHelper.getCurrentTimeAsLong();
|
||||
if (form.crudMode == CommonConstants.EDIT_MODE) {
|
||||
if (form.crudMode == CrudMode.EDIT) {
|
||||
webConfig = getWebConfig(form);
|
||||
} else {
|
||||
webConfig = new WebConfig();
|
||||
|
@ -276,7 +277,7 @@ public class AdminWebconfigAction extends FessAdminAction {
|
|||
}
|
||||
webConfig.setUpdatedBy(username);
|
||||
webConfig.setUpdatedTime(currentTime);
|
||||
copyBeanToBean(form, webConfig, op -> op.exclude(CommonConstants.COMMON_CONVERSION_RULE));
|
||||
copyBeanToBean(form, webConfig, op -> op.exclude(Constants.COMMON_CONVERSION_RULE));
|
||||
return webConfig;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,12 +50,12 @@ public class AdminWizardAction extends FessAdminAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
private static final Logger logger = LoggerFactory.getLogger(AdminWizardAction.class);
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
@Resource
|
||||
protected DynamicProperties crawlerProperties;
|
||||
|
||||
|
@ -100,7 +100,7 @@ public class AdminWizardAction extends FessAdminAction {
|
|||
|
||||
@Token(save = false, validate = true)
|
||||
@Execute
|
||||
public HtmlResponse crawlingConfig(CrawlingConfigForm form) {
|
||||
public HtmlResponse crawlingConfig(final CrawlingConfigForm form) {
|
||||
validate(form, messages -> {}, () -> {
|
||||
return asHtml(path_AdminWizard_CrawlingConfigJsp);
|
||||
});
|
||||
|
@ -111,7 +111,7 @@ public class AdminWizardAction extends FessAdminAction {
|
|||
|
||||
@Token(save = false, validate = true)
|
||||
@Execute
|
||||
public HtmlResponse crawlingConfigNext(CrawlingConfigForm form) {
|
||||
public HtmlResponse crawlingConfigNext(final CrawlingConfigForm form) {
|
||||
validate(form, messages -> {}, () -> {
|
||||
return asHtml(path_AdminWizard_CrawlingConfigJsp);
|
||||
});
|
||||
|
@ -278,7 +278,7 @@ public class AdminWizardAction extends FessAdminAction {
|
|||
|
||||
@Token(save = false, validate = true)
|
||||
@Execute
|
||||
public HtmlResponse startCrawling(StartCrawlingForm form) {
|
||||
public HtmlResponse startCrawling(final StartCrawlingForm form) {
|
||||
if (!jobHelper.isCrawlProcessRunning()) {
|
||||
final List<ScheduledJob> scheduledJobList = scheduledJobService.getCrawloerJobList();
|
||||
for (final ScheduledJob scheduledJob : scheduledJobList) {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
* 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,
|
||||
* 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.
|
||||
*/
|
||||
|
@ -107,7 +107,7 @@ public abstract class FessBaseAction extends TypicalAction // has several interf
|
|||
// ==============
|
||||
@Override
|
||||
protected AccessContextArranger newAccessContextArranger() { // for framework
|
||||
// fess does not use DBFlute, and this is unneeded so dummy
|
||||
// fess does not use DBFlute, and this is unneeded so dummy
|
||||
return resource -> {
|
||||
final AccessContext context = new AccessContext();
|
||||
context.setAccessLocalDateTimeProvider(() -> currentDateTime());
|
||||
|
|
|
@ -30,10 +30,9 @@ import org.codelibs.core.lang.StringUtil;
|
|||
import org.codelibs.core.misc.DynamicProperties;
|
||||
import org.codelibs.core.net.URLUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.SSCConstants;
|
||||
import org.codelibs.fess.UnsupportedSearchException;
|
||||
import org.codelibs.fess.client.FessEsClient;
|
||||
import org.codelibs.fess.entity.LoginInfo;
|
||||
import org.codelibs.fess.es.client.FessEsClient;
|
||||
import org.codelibs.fess.exception.UnsupportedSearchException;
|
||||
import org.codelibs.fess.helper.FieldHelper;
|
||||
import org.codelibs.fess.helper.LabelTypeHelper;
|
||||
import org.codelibs.fess.helper.OpenSearchHelper;
|
||||
|
@ -125,7 +124,7 @@ public abstract class FessSearchAction extends FessBaseAction {
|
|||
|
||||
final HttpSession session = request.getSession(false);
|
||||
if (session != null) {
|
||||
final Object obj = session.getAttribute(SSCConstants.USER_INFO);
|
||||
final Object obj = session.getAttribute(Constants.USER_INFO);
|
||||
if (obj instanceof LoginInfo) {
|
||||
final LoginInfo loginInfo = (LoginInfo) obj;
|
||||
runtime.registerData("username", loginInfo.getUsername());
|
||||
|
|
|
@ -121,7 +121,7 @@ public class FessLoginAssist extends TypicalLoginAssist<String, FessUserBean, Us
|
|||
}
|
||||
|
||||
@Override
|
||||
protected String toTypedUserId(String userKey) {
|
||||
protected String toTypedUserId(final String userKey) {
|
||||
return userKey;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,12 +32,12 @@ public class CacheAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
private static final Logger logger = LoggerFactory.getLogger(CacheAction.class);
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Hook
|
||||
|
|
|
@ -24,11 +24,11 @@ public class ErrorAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Search Execute
|
||||
|
|
|
@ -47,12 +47,12 @@ public class GoAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
private static final Logger logger = LoggerFactory.getLogger(GoAction.class);
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Hook
|
||||
|
|
|
@ -24,11 +24,11 @@ public class HelpAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Hook
|
||||
|
|
|
@ -25,11 +25,11 @@ public class LoginAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Hook
|
||||
|
@ -54,8 +54,8 @@ public class LoginAction extends FessSearchAction {
|
|||
form.clearSecurityInfo();
|
||||
return asHtml(path_Login_IndexJsp);
|
||||
});
|
||||
String email = form.username;
|
||||
String password = form.password;
|
||||
final String email = form.username;
|
||||
final String password = form.password;
|
||||
return fessLoginAssist.loginRedirect(email, password, op -> {}, () -> getHtmlResponse());
|
||||
}
|
||||
|
||||
|
|
|
@ -25,11 +25,11 @@ public class LogoutAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Hook
|
||||
|
|
|
@ -25,11 +25,11 @@ public class OsddAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Hook
|
||||
|
|
|
@ -42,12 +42,12 @@ public class ScreenshotAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
private static final Logger logger = LoggerFactory.getLogger(ScreenshotAction.class);
|
||||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
@Resource
|
||||
protected HttpServletResponse response;
|
||||
|
||||
|
|
|
@ -33,14 +33,14 @@ import javax.servlet.http.HttpSession;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.InvalidQueryException;
|
||||
import org.codelibs.fess.ResultOffsetExceededException;
|
||||
import org.codelibs.fess.app.web.RootAction;
|
||||
import org.codelibs.fess.app.web.RootForm;
|
||||
import org.codelibs.fess.app.web.base.FessSearchAction;
|
||||
import org.codelibs.fess.client.FessEsClient.SearchConditionBuilder;
|
||||
import org.codelibs.fess.es.client.FessEsClient.SearchConditionBuilder;
|
||||
import org.codelibs.fess.es.exentity.SearchLog;
|
||||
import org.codelibs.fess.es.exentity.UserInfo;
|
||||
import org.codelibs.fess.exception.InvalidQueryException;
|
||||
import org.codelibs.fess.exception.ResultOffsetExceededException;
|
||||
import org.codelibs.fess.helper.SearchLogHelper;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.codelibs.fess.util.QueryResponseList;
|
||||
|
@ -57,7 +57,7 @@ public class SearchAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Constant
|
||||
//
|
||||
//
|
||||
private static final Logger logger = LoggerFactory.getLogger(SearchAction.class);
|
||||
|
||||
protected static final long DEFAULT_START_COUNT = 0;
|
||||
|
@ -70,7 +70,7 @@ public class SearchAction extends FessSearchAction {
|
|||
|
||||
// ===================================================================================
|
||||
// Attribute
|
||||
//
|
||||
//
|
||||
|
||||
// ===================================================================================
|
||||
// Hook
|
||||
|
@ -361,7 +361,6 @@ public class SearchAction extends FessSearchAction {
|
|||
searchLog.setResponseTime(Integer.valueOf((int) queryResponseList.getExecTime()));
|
||||
searchLog.setSearchWord(StringUtils.abbreviate(query, 1000));
|
||||
searchLog.setSearchQuery(StringUtils.abbreviate(queryResponseList.getSearchQuery(), 1000));
|
||||
searchLog.setSolrQuery(StringUtils.abbreviate(queryResponseList.getSolrQuery(), 1000));
|
||||
searchLog.setRequestedTime(now);
|
||||
searchLog.setQueryOffset(pageStart);
|
||||
searchLog.setQueryPageSize(pageNum);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.codelibs.fess.robot;
|
||||
package org.codelibs.fess.crawler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
@ -28,7 +28,7 @@ import java.util.Set;
|
|||
import org.apache.commons.io.IOUtils;
|
||||
import org.codelibs.core.misc.DynamicProperties;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.client.FessEsClient;
|
||||
import org.codelibs.fess.es.client.FessEsClient;
|
||||
import org.codelibs.fess.es.exentity.CrawlingConfig;
|
||||
import org.codelibs.fess.helper.CrawlingConfigHelper;
|
||||
import org.codelibs.fess.helper.CrawlingSessionHelper;
|
||||
|
@ -100,25 +100,25 @@ public class FessS2RobotThread extends S2RobotThread {
|
|||
dataMap.put(fieldHelper.roleField, roleTypeList);
|
||||
final String id = crawlingSessionHelper.generateId(dataMap);
|
||||
|
||||
final Map<String, Object> solrDocument =
|
||||
final Map<String, Object> document =
|
||||
indexingHelper.getDocument(fessEsClient, id, new String[] { fieldHelper.idField, fieldHelper.lastModifiedField,
|
||||
fieldHelper.anchorField, fieldHelper.segmentField, fieldHelper.expiresField, fieldHelper.clickCountField,
|
||||
fieldHelper.favoriteCountField });
|
||||
if (solrDocument == null) {
|
||||
if (document == null) {
|
||||
storeChildUrlsToQueue(urlQueue, getChildUrlSet(fessEsClient, id));
|
||||
return true;
|
||||
}
|
||||
|
||||
final Date expires = (Date) solrDocument.get(fieldHelper.expiresField);
|
||||
final Date expires = (Date) document.get(fieldHelper.expiresField);
|
||||
if (expires != null && expires.getTime() < System.currentTimeMillis()) {
|
||||
final Object idValue = solrDocument.get(fieldHelper.idField);
|
||||
final Object idValue = document.get(fieldHelper.idField);
|
||||
if (idValue != null) {
|
||||
indexingHelper.deleteDocument(fessEsClient, idValue.toString());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
final Date lastModified = (Date) solrDocument.get(fieldHelper.lastModifiedField);
|
||||
final Date lastModified = (Date) document.get(fieldHelper.lastModifiedField);
|
||||
if (lastModified == null) {
|
||||
return true;
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public class FessS2RobotThread extends S2RobotThread {
|
|||
|
||||
final int httpStatusCode = responseData.getHttpStatusCode();
|
||||
if (httpStatusCode == 404) {
|
||||
storeChildUrlsToQueue(urlQueue, getAnchorSet(solrDocument.get(fieldHelper.anchorField)));
|
||||
storeChildUrlsToQueue(urlQueue, getAnchorSet(document.get(fieldHelper.anchorField)));
|
||||
indexingHelper.deleteDocument(fessEsClient, id);
|
||||
return false;
|
||||
} else if (responseData.getLastModified() == null) {
|
||||
|
@ -148,7 +148,7 @@ public class FessS2RobotThread extends S2RobotThread {
|
|||
responseData.setHttpStatusCode(org.codelibs.robot.Constants.NOT_MODIFIED_STATUS);
|
||||
processResponse(urlQueue, responseData);
|
||||
|
||||
storeChildUrlsToQueue(urlQueue, getAnchorSet(solrDocument.get(fieldHelper.anchorField)));
|
||||
storeChildUrlsToQueue(urlQueue, getAnchorSet(document.get(fieldHelper.anchorField)));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ public class FessS2RobotThread extends S2RobotThread {
|
|||
return null;
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Found solr documents: " + docList);
|
||||
logger.debug("Found documents: " + docList);
|
||||
}
|
||||
final Set<RequestData> urlSet = new HashSet<>(docList.size());
|
||||
for (final Map<String, Object> doc : docList) {
|
|
@ -14,7 +14,7 @@
|
|||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.codelibs.fess.interval;
|
||||
package org.codelibs.fess.crawler.interval;
|
||||
|
||||
import org.codelibs.fess.helper.IntervalControlHelper;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
|
@ -14,7 +14,7 @@
|
|||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.codelibs.fess.transformer;
|
||||
package org.codelibs.fess.crawler.transformer;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
@ -47,7 +47,6 @@ import org.codelibs.fess.helper.LabelTypeHelper;
|
|||
import org.codelibs.fess.helper.PathMappingHelper;
|
||||
import org.codelibs.fess.helper.SambaHelper;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.codelibs.fess.taglib.FessFunctions;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.codelibs.robot.client.smb.SmbClient;
|
||||
import org.codelibs.robot.entity.AccessResult;
|
||||
|
@ -132,12 +131,12 @@ public abstract class AbstractFessFileTransformer extends AbstractFessXpathTrans
|
|||
if (StringUtil.isNotBlank(joinValue)) {
|
||||
contentMetaBuf.append(joinValue);
|
||||
if (metaContentMapping != null) {
|
||||
final String solrField = metaContentMapping.get(key);
|
||||
if (StringUtil.isNotBlank(solrField)) {
|
||||
if (solrField.endsWith("_m")) {
|
||||
dataMap.put(solrField, values);
|
||||
final String dynamicField = metaContentMapping.get(key);
|
||||
if (StringUtil.isNotBlank(dynamicField)) {
|
||||
if (dynamicField.endsWith("_m")) {
|
||||
dataMap.put(dynamicField, values);
|
||||
} else {
|
||||
dataMap.put(solrField, joinValue);
|
||||
dataMap.put(dynamicField, joinValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -247,7 +246,7 @@ public abstract class AbstractFessFileTransformer extends AbstractFessXpathTrans
|
|||
// url
|
||||
putResultDataBody(dataMap, fieldHelper.urlField, url);
|
||||
// created
|
||||
putResultDataBody(dataMap, fieldHelper.createdField, systemHelper.getCurrentTimeAsLong());
|
||||
putResultDataBody(dataMap, fieldHelper.createdField, systemHelper.getCurrentTime());
|
||||
// TODO anchor
|
||||
putResultDataBody(dataMap, fieldHelper.anchorField, StringUtil.EMPTY);
|
||||
// mimetype
|
||||
|
@ -260,7 +259,7 @@ public abstract class AbstractFessFileTransformer extends AbstractFessXpathTrans
|
|||
putResultDataBody(dataMap, fieldHelper.contentLengthField, Long.toString(responseData.getContentLength()));
|
||||
// lastModified
|
||||
if (responseData.getLastModified() != null) {
|
||||
putResultDataBody(dataMap, fieldHelper.lastModifiedField, FessFunctions.formatDate(responseData.getLastModified()));
|
||||
putResultDataBody(dataMap, fieldHelper.lastModifiedField, responseData.getLastModified());
|
||||
}
|
||||
// indexingTarget
|
||||
putResultDataBody(dataMap, Constants.INDEXING_TARGET, indexingTarget);
|
||||
|
@ -473,10 +472,10 @@ public abstract class AbstractFessFileTransformer extends AbstractFessXpathTrans
|
|||
return new HashMap<String, Object>();
|
||||
}
|
||||
|
||||
public void addMetaContentMapping(final String metaname, final String solrField) {
|
||||
public void addMetaContentMapping(final String metaname, final String dynamicField) {
|
||||
if (metaContentMapping == null) {
|
||||
metaContentMapping = new HashMap<String, String>();
|
||||
}
|
||||
metaContentMapping.put(metaname, solrField);
|
||||
metaContentMapping.put(metaname, dynamicField);
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@
|
|||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.codelibs.fess.transformer;
|
||||
package org.codelibs.fess.crawler.transformer;
|
||||
|
||||
import java.net.URLDecoder;
|
||||
import java.util.Arrays;
|
|
@ -14,9 +14,9 @@
|
|||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.codelibs.fess.transformer;
|
||||
package org.codelibs.fess.crawler.transformer;
|
||||
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.codelibs.robot.entity.ResponseData;
|
||||
import org.codelibs.robot.extractor.Extractor;
|
|
@ -14,9 +14,9 @@
|
|||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.codelibs.fess.transformer;
|
||||
package org.codelibs.fess.crawler.transformer;
|
||||
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
import org.codelibs.robot.entity.ResponseData;
|
||||
import org.codelibs.robot.extractor.Extractor;
|
||||
import org.lastaflute.di.core.SingletonLaContainer;
|
|
@ -14,7 +14,7 @@
|
|||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.codelibs.fess.transformer;
|
||||
package org.codelibs.fess.crawler.transformer;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
|
@ -49,7 +49,6 @@ import org.codelibs.fess.helper.LabelTypeHelper;
|
|||
import org.codelibs.fess.helper.OverlappingHostHelper;
|
||||
import org.codelibs.fess.helper.PathMappingHelper;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.codelibs.fess.taglib.FessFunctions;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.codelibs.robot.builder.RequestDataBuilder;
|
||||
import org.codelibs.robot.entity.AccessResultData;
|
||||
|
@ -259,7 +258,7 @@ public class FessXpathTransformer extends AbstractFessXpathTransformer {
|
|||
// url
|
||||
putResultDataBody(dataMap, fieldHelper.urlField, url);
|
||||
// created
|
||||
putResultDataBody(dataMap, fieldHelper.createdField, systemHelper.getCurrentTimeAsLong());
|
||||
putResultDataBody(dataMap, fieldHelper.createdField, systemHelper.getCurrentTime());
|
||||
// anchor
|
||||
putResultDataBody(dataMap, fieldHelper.anchorField, getAnchorList(document, responseData));
|
||||
// mimetype
|
||||
|
@ -273,7 +272,7 @@ public class FessXpathTransformer extends AbstractFessXpathTransformer {
|
|||
putResultDataBody(dataMap, fieldHelper.contentLengthField, Long.toString(responseData.getContentLength()));
|
||||
// lastModified
|
||||
if (responseData.getLastModified() != null) {
|
||||
putResultDataBody(dataMap, fieldHelper.lastModifiedField, FessFunctions.formatDate(responseData.getLastModified()));
|
||||
putResultDataBody(dataMap, fieldHelper.lastModifiedField, responseData.getLastModified());
|
||||
}
|
||||
// indexingTarget
|
||||
putResultDataBody(dataMap, Constants.INDEXING_TARGET, indexingTarget);
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* 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.crud;
|
||||
|
||||
public class CommonConstants {
|
||||
public static final int LIST_MODE = 0;
|
||||
|
||||
public static final int CREATE_MODE = 1;
|
||||
|
||||
public static final int EDIT_MODE = 2;
|
||||
|
||||
public static final int DELETE_MODE = 3;
|
||||
|
||||
public static final int CONFIRM_MODE = 4;
|
||||
|
||||
public static final String TIMESTAMP_PATTERN = "yyyy/MM/dd HH:mm:ss";
|
||||
|
||||
public static final String TRUE = "T";
|
||||
|
||||
public static final String FALSE = "F";
|
||||
|
||||
public static final String[] PAGER_CONVERSION_RULE = { "allRecordCount", "pageSize", "currentPageNumber", "allPageCount",
|
||||
"existPrePage", "existNextPage" };
|
||||
|
||||
// TODO remove searchParams
|
||||
public static final String[] COMMON_CONVERSION_RULE = new String[] { "searchParams", "crudMode", "createdBy", "createdTime",
|
||||
"updatedBy", "updatedTime" };
|
||||
|
||||
protected CommonConstants() {
|
||||
// nothing
|
||||
}
|
||||
}
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
* 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.crud;
|
||||
|
||||
/**
|
||||
* @author shinsuke
|
||||
*/
|
||||
public class CrudMessageException extends RuntimeException {
|
||||
|
||||
/**
|
||||
* Serial Version UID
|
||||
*/
|
||||
private static final long serialVersionUID = 4564000116499132363L;
|
||||
|
||||
private final String messageId;
|
||||
|
||||
private final Object[] args;
|
||||
|
||||
/**
|
||||
* @return Returns the messageId.
|
||||
*/
|
||||
public String getMessageId() {
|
||||
return messageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the args.
|
||||
*/
|
||||
public Object[] getArgs() {
|
||||
return args;
|
||||
}
|
||||
|
||||
public CrudMessageException(final String messageId) {
|
||||
super(messageId);
|
||||
this.messageId = messageId;
|
||||
args = null;
|
||||
}
|
||||
|
||||
public CrudMessageException(final String messageId, final Object[] args) {
|
||||
super(messageId);
|
||||
this.messageId = messageId;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
public CrudMessageException(final String messageId, final String message, final Throwable cause) {
|
||||
super(message, cause);
|
||||
this.messageId = messageId;
|
||||
args = null;
|
||||
}
|
||||
|
||||
public CrudMessageException(final String messageId, final Object[] args, final String message, final Throwable cause) {
|
||||
super(message, cause);
|
||||
this.messageId = messageId;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
public CrudMessageException(final String messageId, final String message) {
|
||||
super(message);
|
||||
this.messageId = messageId;
|
||||
args = null;
|
||||
}
|
||||
|
||||
public CrudMessageException(final String messageId, final Object[] args, final String message) {
|
||||
super(message);
|
||||
this.messageId = messageId;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
public CrudMessageException(final String messageId, final Throwable cause) {
|
||||
super(cause);
|
||||
this.messageId = messageId;
|
||||
args = null;
|
||||
}
|
||||
|
||||
public CrudMessageException(final String messageId, final Object[] args, final Throwable cause) {
|
||||
super(cause);
|
||||
this.messageId = messageId;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
}
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package org.codelibs.fess.dict;
|
||||
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
|
||||
public class DictionaryException extends FessSystemException {
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package org.codelibs.fess.ds;
|
||||
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
|
||||
public class DataStoreException extends FessSystemException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.codelibs.fess.ds;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import org.codelibs.fess.client.FessEsClient;
|
||||
import org.codelibs.fess.es.client.FessEsClient;
|
||||
|
||||
public interface IndexUpdateCallback {
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.codelibs.fess.ds.IndexUpdateCallback;
|
|||
import org.codelibs.fess.es.exentity.DataConfig;
|
||||
import org.codelibs.fess.helper.CrawlingSessionHelper;
|
||||
import org.codelibs.fess.helper.FieldHelper;
|
||||
import org.codelibs.fess.helper.SystemHelper;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -54,6 +55,7 @@ public abstract class AbstractDataStoreImpl implements DataStore {
|
|||
final Map<String, String> configParamMap = config.getHandlerParameterMap();
|
||||
final Map<String, String> configScriptMap = config.getHandlerScriptMap();
|
||||
final CrawlingSessionHelper crawlingSessionHelper = ComponentUtil.getCrawlingSessionHelper();
|
||||
final SystemHelper systemHelper = ComponentUtil.getSystemHelper();
|
||||
final Long documentExpires = crawlingSessionHelper.getDocumentExpires();
|
||||
final FieldHelper fieldHelper = ComponentUtil.getFieldHelper();
|
||||
|
||||
|
@ -75,7 +77,7 @@ public abstract class AbstractDataStoreImpl implements DataStore {
|
|||
// segment
|
||||
defaultDataMap.put(fieldHelper.segmentField, initParamMap.get(Constants.SESSION_ID));
|
||||
// created
|
||||
defaultDataMap.put(fieldHelper.createdField, "NOW");
|
||||
defaultDataMap.put(fieldHelper.createdField, systemHelper.getCurrentTime());
|
||||
// boost
|
||||
defaultDataMap.put(fieldHelper.boostField, config.getBoost().toString());
|
||||
// label: labelType
|
||||
|
|
|
@ -28,10 +28,10 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import org.codelibs.core.lang.StringUtil;
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.ds.DataStoreException;
|
||||
import org.codelibs.fess.ds.IndexUpdateCallback;
|
||||
import org.codelibs.fess.es.exentity.DataConfig;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@ import java.util.Map;
|
|||
import org.codelibs.core.collection.LruHashMap;
|
||||
import org.codelibs.core.io.SerializeUtil;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.client.FessEsClient;
|
||||
import org.codelibs.fess.ds.DataStoreCrawlingException;
|
||||
import org.codelibs.fess.ds.DataStoreException;
|
||||
import org.codelibs.fess.ds.IndexUpdateCallback;
|
||||
import org.codelibs.fess.es.client.FessEsClient;
|
||||
import org.codelibs.fess.es.exentity.DataConfig;
|
||||
import org.codelibs.fess.helper.CrawlingSessionHelper;
|
||||
import org.codelibs.fess.helper.FieldHelper;
|
||||
|
|
|
@ -23,9 +23,9 @@ import java.util.concurrent.atomic.AtomicLong;
|
|||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.client.FessEsClient;
|
||||
import org.codelibs.fess.ds.IndexUpdateCallback;
|
||||
import org.codelibs.fess.es.client.FessEsClient;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
import org.codelibs.fess.helper.CrawlingSessionHelper;
|
||||
import org.codelibs.fess.helper.FieldHelper;
|
||||
import org.codelibs.fess.helper.IndexingHelper;
|
||||
|
|
|
@ -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(toStringArray(source.get("groups")));
|
||||
result.setGroups(DfTypeUtil.toString(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(toStringArray(source.get("roles")));
|
||||
result.setRoles(DfTypeUtil.toString(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((String[]) vl), "groups");
|
||||
setupEpg(_epgMap, et -> ((User) et).getGroups(), (et, vl) -> ((User) et).setGroups(DfTypeUtil.toString(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((String[]) vl), "roles");
|
||||
setupEpg(_epgMap, et -> ((User) et).getRoles(), (et, vl) -> ((User) et).setRoles(DfTypeUtil.toString(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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.codelibs.fess.client;
|
||||
package org.codelibs.fess.es.client;
|
||||
|
||||
import static org.codelibs.elasticsearch.runner.ElasticsearchClusterRunner.newConfigs;
|
||||
|
||||
|
@ -27,14 +27,14 @@ import org.codelibs.elasticsearch.runner.ElasticsearchClusterRunner.Configs;
|
|||
import org.codelibs.elasticsearch.runner.net.Curl;
|
||||
import org.codelibs.elasticsearch.runner.net.CurlResponse;
|
||||
import org.codelibs.fess.Constants;
|
||||
import org.codelibs.fess.ResultOffsetExceededException;
|
||||
import org.codelibs.fess.entity.FacetInfo;
|
||||
import org.codelibs.fess.entity.GeoInfo;
|
||||
import org.codelibs.fess.entity.PingResponse;
|
||||
import org.codelibs.fess.entity.SearchQuery;
|
||||
import org.codelibs.fess.entity.SearchQuery.SortField;
|
||||
import org.codelibs.fess.exception.ResultOffsetExceededException;
|
||||
import org.codelibs.fess.helper.QueryHelper;
|
||||
import org.codelibs.fess.solr.FessSolrQueryException;
|
||||
import org.codelibs.fess.indexer.FessSearchQueryException;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.action.Action;
|
||||
|
@ -242,7 +242,7 @@ public class FessEsClient implements Client {
|
|||
config.basePath(esDir);
|
||||
}
|
||||
runner.onBuild((number, settingsBuilder) -> {
|
||||
File pluginDir = new File(esDir, "plugins");
|
||||
final File pluginDir = new File(esDir, "plugins");
|
||||
if (pluginDir.isDirectory()) {
|
||||
settingsBuilder.put("path.plugins", pluginDir.getAbsolutePath());
|
||||
} else {
|
||||
|
@ -510,11 +510,11 @@ public class FessEsClient implements Client {
|
|||
public Optional<Map<String, Object>> getDocument(final String index, final String type,
|
||||
final SearchCondition<SearchRequestBuilder> condition) {
|
||||
return getDocument(index, type, condition, (response, hit) -> {
|
||||
Map<String, Object> source = hit.getSource();
|
||||
final Map<String, Object> source = hit.getSource();
|
||||
if (source != null) {
|
||||
return source;
|
||||
}
|
||||
Map<String, SearchHitField> fields = hit.getFields();
|
||||
final Map<String, SearchHitField> fields = hit.getFields();
|
||||
if (fields != null) {
|
||||
return fields.entrySet().stream().collect(Collectors.toMap(e -> e.getKey(), e -> (Object) e.getValue().getValues()));
|
||||
}
|
||||
|
@ -538,11 +538,11 @@ public class FessEsClient implements Client {
|
|||
public Optional<Map<String, Object>> getDocument(final String index, final String type, final String id,
|
||||
final SearchCondition<GetRequestBuilder> condition) {
|
||||
return getDocument(index, type, id, condition, (response, result) -> {
|
||||
Map<String, Object> source = response.getSource();
|
||||
final Map<String, Object> source = response.getSource();
|
||||
if (source != null) {
|
||||
return source;
|
||||
}
|
||||
Map<String, GetField> fields = response.getFields();
|
||||
final Map<String, GetField> fields = response.getFields();
|
||||
if (fields != null) {
|
||||
return fields.entrySet().stream().collect(Collectors.toMap(e -> e.getKey(), e -> (Object) e.getValue().getValues()));
|
||||
}
|
||||
|
@ -775,7 +775,7 @@ public class FessEsClient implements Client {
|
|||
}
|
||||
searchRequestBuilder.addAggregation(termsBuilder);
|
||||
} else {
|
||||
throw new FessSolrQueryException("Invalid facet field: " + f);
|
||||
throw new FessSearchQueryException("Invalid facet field: " + f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -794,7 +794,7 @@ public class FessEsClient implements Client {
|
|||
}
|
||||
searchRequestBuilder.addAggregation(filterBuilder);
|
||||
} else {
|
||||
throw new FessSolrQueryException("Invalid facet query: " + facetQuery);
|
||||
throw new FessSearchQueryException("Invalid facet query: " + facetQuery);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package org.codelibs.fess.client;
|
||||
package org.codelibs.fess.es.client;
|
||||
|
||||
import org.codelibs.fess.FessSystemException;
|
||||
import org.codelibs.fess.exception.FessSystemException;
|
||||
|
||||
public class FessEsClientException extends FessSystemException {
|
||||
|
|
@ -73,10 +73,6 @@ public class SearchLog extends BsSearchLog {
|
|||
addSearchFieldLogValue(Constants.SEARCH_FIELD_LOG_SEARCH_QUERY, query);
|
||||
}
|
||||
|
||||
public void setSolrQuery(final String solrQuery) {
|
||||
addSearchFieldLogValue(Constants.SEARCH_FIELD_LOG_SOLR_QUERY, solrQuery);
|
||||
}
|
||||
|
||||
public OptionalEntity<UserInfo> getUserInfo() {
|
||||
if (userInfo == null) {
|
||||
final UserInfoBhv userInfoBhv = ComponentUtil.getComponent(UserInfoBhv.class);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.codelibs.fess;
|
||||
package org.codelibs.fess.exception;
|
||||
|
||||
public class FessSystemException extends RuntimeException {
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue