diff --git a/src/main/java/org/codelibs/fess/api/es/EsApiManager.java b/src/main/java/org/codelibs/fess/api/es/EsApiManager.java index ad8e7319c465075ba2aafc6a025b7dce3240ba32..b0305880551e19d71b2f91c085fa6d8506c8fca3 100644 --- a/src/main/java/org/codelibs/fess/api/es/EsApiManager.java +++ b/src/main/java/org/codelibs/fess/api/es/EsApiManager.java @@ -53,7 +53,7 @@ public class EsApiManager extends BaseApiManager { private static final Logger logger = LoggerFactory.getLogger(EsApiManager.class); @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; protected String[] acceptedRoles = new String[] { "admin" }; diff --git a/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java b/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java index b0fe824099ed9ae206c4593f9d5b8d3a5cef4a27..a8fb86e9504cae8f62e6568cda2683278582d774 100644 --- a/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java +++ b/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java @@ -65,7 +65,7 @@ public class JsonApiManager extends BaseApiManager { private static final Logger logger = LoggerFactory.getLogger(JsonApiManager.class); @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; public JsonApiManager() { setPathPrefix("/json"); @@ -311,7 +311,7 @@ public class JsonApiManager extends BaseApiManager { } protected void processPopularWordRequest(final HttpServletRequest request, final HttpServletResponse response, final FilterChain chain) { - if (Constants.FALSE.equals(crawlerProperties.getProperty(Constants.WEB_API_POPULAR_WORD_PROPERTY, Constants.TRUE))) { + if (Constants.FALSE.equals(systemProperties.getProperty(Constants.WEB_API_POPULAR_WORD_PROPERTY, Constants.TRUE))) { writeJsonResponse(9, null, "Unsupported operation."); return; } @@ -357,7 +357,7 @@ public class JsonApiManager extends BaseApiManager { } protected void processFavoriteRequest(final HttpServletRequest request, final HttpServletResponse response, final FilterChain chain) { - if (Constants.FALSE.equals(crawlerProperties.getProperty(Constants.USER_FAVORITE_PROPERTY, Constants.FALSE))) { + if (Constants.FALSE.equals(systemProperties.getProperty(Constants.USER_FAVORITE_PROPERTY, Constants.FALSE))) { writeJsonResponse(9, null, "Unsupported operation."); return; } @@ -440,7 +440,7 @@ public class JsonApiManager extends BaseApiManager { } protected void processFavoritesRequest(final HttpServletRequest request, final HttpServletResponse response, final FilterChain chain) { - if (Constants.FALSE.equals(crawlerProperties.getProperty(Constants.USER_FAVORITE_PROPERTY, Constants.FALSE))) { + if (Constants.FALSE.equals(systemProperties.getProperty(Constants.USER_FAVORITE_PROPERTY, Constants.FALSE))) { writeJsonResponse(9, null, "Unsupported operation."); return; } diff --git a/src/main/java/org/codelibs/fess/api/suggest/SuggestApiManager.java b/src/main/java/org/codelibs/fess/api/suggest/SuggestApiManager.java index 4df9fe2ef39d73974e52e533f64e6c978974526b..09bbfa8842ea5c35032041c947f9d205d0566917 100644 --- a/src/main/java/org/codelibs/fess/api/suggest/SuggestApiManager.java +++ b/src/main/java/org/codelibs/fess/api/suggest/SuggestApiManager.java @@ -47,7 +47,7 @@ public class SuggestApiManager extends BaseApiManager { } @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Override public boolean matches(final HttpServletRequest request) { @@ -75,10 +75,10 @@ public class SuggestApiManager extends BaseApiManager { builder.setSize(parameter.getNum()); builder.addKind(SuggestItem.Kind.USER.toString()); - if (Constants.TRUE.equals(crawlerProperties.getProperty(Constants.SUGGEST_SEARCH_LOG_PROPERTY, Constants.TRUE))) { + if (Constants.TRUE.equals(systemProperties.getProperty(Constants.SUGGEST_SEARCH_LOG_PROPERTY, Constants.TRUE))) { builder.addKind(SuggestItem.Kind.QUERY.toString()); } - if (Constants.TRUE.equals(crawlerProperties.getProperty(Constants.SUGGEST_DOCUMENTS_PROPERTY, Constants.TRUE))) { + if (Constants.TRUE.equals(systemProperties.getProperty(Constants.SUGGEST_DOCUMENTS_PROPERTY, Constants.TRUE))) { builder.addKind(SuggestItem.Kind.DOCUMENT.toString()); } diff --git a/src/main/java/org/codelibs/fess/app/service/FailureUrlService.java b/src/main/java/org/codelibs/fess/app/service/FailureUrlService.java index 83369362fc2ddc37b9d9a722a6e571172b8039c6..8dc13444faffcd7370e2666afad2ddccea9da6ef 100644 --- a/src/main/java/org/codelibs/fess/app/service/FailureUrlService.java +++ b/src/main/java/org/codelibs/fess/app/service/FailureUrlService.java @@ -46,7 +46,7 @@ public class FailureUrlService implements Serializable { private static final long serialVersionUID = 1L; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Resource protected FailureUrlBhv failureUrlBhv; @@ -125,9 +125,9 @@ public class FailureUrlService implements Serializable { } public List getExcludedUrlList(final String configId) { - final String failureCountStr = crawlerProperties.getProperty(Constants.FAILURE_COUNT_THRESHOLD_PROPERTY); + final String failureCountStr = systemProperties.getProperty(Constants.FAILURE_COUNT_THRESHOLD_PROPERTY); final String ignoreFailureType = - crawlerProperties.getProperty(Constants.IGNORE_FAILURE_TYPE_PROPERTY, Constants.DEFAULT_IGNORE_FAILURE_TYPE); + systemProperties.getProperty(Constants.IGNORE_FAILURE_TYPE_PROPERTY, Constants.DEFAULT_IGNORE_FAILURE_TYPE); int failureCount = Constants.DEFAULT_FAILURE_COUNT; if (failureCountStr != null) { try { diff --git a/src/main/java/org/codelibs/fess/app/service/SearchService.java b/src/main/java/org/codelibs/fess/app/service/SearchService.java index e63eefaa9016612a64a1fd2fabf32a5ea65d44c1..6fbc98e8cf1431bc209372e38fb17a1b605d298a 100644 --- a/src/main/java/org/codelibs/fess/app/service/SearchService.java +++ b/src/main/java/org/codelibs/fess/app/service/SearchService.java @@ -72,7 +72,7 @@ public class SearchService { // Attribute // @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Resource protected FessEsClient fessEsClient; @@ -97,8 +97,7 @@ public class SearchService { final long requestedTime = systemHelper.getCurrentTimeAsLong(); final long startTime = System.currentTimeMillis(); - final boolean searchLogSupport = - Constants.TRUE.equals(crawlerProperties.getProperty(Constants.SEARCH_LOG_PROPERTY, Constants.TRUE)); + final boolean searchLogSupport = Constants.TRUE.equals(systemProperties.getProperty(Constants.SEARCH_LOG_PROPERTY, Constants.TRUE)); final String query = QueryStringBuilder.query(params.getQuery()).extraQueries(params.getExtraQueries()).fields(params.getFields()).build(); @@ -200,7 +199,7 @@ public class SearchService { final RoleQueryHelper roleQueryHelper = ComponentUtil.getRoleQueryHelper(); final SearchLog searchLog = new SearchLog(); - if (Constants.TRUE.equals(crawlerProperties.getProperty(Constants.USER_INFO_PROPERTY, Constants.TRUE))) { + if (Constants.TRUE.equals(systemProperties.getProperty(Constants.USER_INFO_PROPERTY, Constants.TRUE))) { final String userCode = userInfoHelper.getUserCode(); if (userCode != null) { searchLog.setUserSessionId(userCode); @@ -269,7 +268,7 @@ public class SearchService { langSet.remove(Constants.ALL_LANGUAGES); } return langSet.toArray(new String[langSet.size()]); - } else if (Constants.TRUE.equals(crawlerProperties.getProperty(Constants.USE_BROWSER_LOCALE_FOR_SEARCH_PROPERTY, Constants.FALSE))) { + } else if (Constants.TRUE.equals(systemProperties.getProperty(Constants.USE_BROWSER_LOCALE_FOR_SEARCH_PROPERTY, Constants.FALSE))) { final Set langSet = new HashSet<>(); final Enumeration locales = request.getLocales(); if (locales != null) { diff --git a/src/main/java/org/codelibs/fess/app/web/admin/badword/AdminBadwordAction.java b/src/main/java/org/codelibs/fess/app/web/admin/badword/AdminBadwordAction.java index 39deb754a943eafea9e5b80f6c81dab16edabe37..8e373568ad99481617c45e6b48025aac44d3886a 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/badword/AdminBadwordAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/badword/AdminBadwordAction.java @@ -61,7 +61,7 @@ public class AdminBadwordAction extends FessAdminAction { @Resource private SystemHelper systemHelper; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Resource protected SuggestHelper suggestHelper; @@ -327,7 +327,7 @@ public class AdminBadwordAction extends FessAdminAction { } private String getCsvEncoding() { - return crawlerProperties.getProperty(Constants.CSV_FILE_ENCODING_PROPERTY, Constants.UTF_8); + return systemProperties.getProperty(Constants.CSV_FILE_ENCODING_PROPERTY, Constants.UTF_8); } // =================================================================================== diff --git a/src/main/java/org/codelibs/fess/app/web/admin/design/AdminDesignAction.java b/src/main/java/org/codelibs/fess/app/web/admin/design/AdminDesignAction.java index e1af555dbc8d28275951d5ed80ab3b6f21474113..11a8223e52bd871039c524f837f73075b833651c 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/design/AdminDesignAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/design/AdminDesignAction.java @@ -55,7 +55,7 @@ public class AdminDesignAction extends FessAdminAction implements Serializable { // Attribute // ========= @Resource - private DynamicProperties crawlerProperties; + private DynamicProperties systemProperties; @Resource private SystemHelper systemHelper; @@ -83,7 +83,7 @@ public class AdminDesignAction extends FessAdminAction implements Serializable { } private boolean editable() { - return Constants.TRUE.equals(crawlerProperties.getProperty(Constants.WEB_DESIGN_EDITOR_PROPERTY, Constants.TRUE)); + return Constants.TRUE.equals(systemProperties.getProperty(Constants.WEB_DESIGN_EDITOR_PROPERTY, Constants.TRUE)); } private List loadFileNameItems() { diff --git a/src/main/java/org/codelibs/fess/app/web/admin/dict/kuromoji/AdminDictKuromojiAction.java b/src/main/java/org/codelibs/fess/app/web/admin/dict/kuromoji/AdminDictKuromojiAction.java index 8aacfe40e689aae5e07abe4c4029db7d297a48c2..ec1641bb26c3b4c9803ba592b6ee81c6b915fd67 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/dict/kuromoji/AdminDictKuromojiAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/dict/kuromoji/AdminDictKuromojiAction.java @@ -57,7 +57,7 @@ public class AdminDictKuromojiAction extends FessAdminAction { @Resource private SystemHelper systemHelper; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; // =================================================================================== // Hook diff --git a/src/main/java/org/codelibs/fess/app/web/admin/dict/synonym/AdminDictSynonymAction.java b/src/main/java/org/codelibs/fess/app/web/admin/dict/synonym/AdminDictSynonymAction.java index 41462c719a66d94006355375004cc9645203dca8..ce36580fdb23dbbd60ab7d1c267c06458b8d2299 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/dict/synonym/AdminDictSynonymAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/dict/synonym/AdminDictSynonymAction.java @@ -60,7 +60,7 @@ public class AdminDictSynonymAction extends FessAdminAction { @Resource private SystemHelper systemHelper; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; // =================================================================================== // Hook diff --git a/src/main/java/org/codelibs/fess/app/web/admin/elevateword/AdminElevatewordAction.java b/src/main/java/org/codelibs/fess/app/web/admin/elevateword/AdminElevatewordAction.java index 510c7ab9631376837dff82a72bddb13a51e5c12d..2935c1e616ed08ed960925f269acc3cac51037b3 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/elevateword/AdminElevatewordAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/elevateword/AdminElevatewordAction.java @@ -62,7 +62,7 @@ public class AdminElevatewordAction extends FessAdminAction { @Resource private SystemHelper systemHelper; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Resource protected SuggestHelper suggestHelper; @Resource @@ -342,7 +342,7 @@ public class AdminElevatewordAction extends FessAdminAction { } private String getCsvEncoding() { - return crawlerProperties.getProperty(Constants.CSV_FILE_ENCODING_PROPERTY, Constants.UTF_8); + return systemProperties.getProperty(Constants.CSV_FILE_ENCODING_PROPERTY, Constants.UTF_8); } // =================================================================================== diff --git a/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java b/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java index 242f95eed6e6beb9743a9a037027540d6d7421ec..b884ef8c1310d582b61b952c7b7a4f728270e6a3 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java @@ -53,7 +53,7 @@ public class AdminGeneralAction extends FessAdminAction { // Attribute // ========= @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Resource protected SystemHelper systemHelper; @@ -107,7 +107,7 @@ public class AdminGeneralAction extends FessAdminAction { }); saveInfo(messages -> messages.addSuccessSendTestmail(GLOBAL)); updateProperty(Constants.NOTIFICATION_TO_PROPERTY, form.notificationTo); - crawlerProperties.store(); + systemProperties.store(); } catch (final Exception e) { logger.warn("Failed to send a test mail.", e); saveError(messages -> messages.addErrorsFailedToSendTestmail(GLOBAL)); @@ -152,7 +152,7 @@ public class AdminGeneralAction extends FessAdminAction { updateProperty(Constants.LDAP_BASE_DN, form.ldapBaseDn); updateProperty(Constants.LDAP_ACCOUNT_FILTER, form.ldapAccountFilter); - crawlerProperties.store(); + systemProperties.store(); saveInfo(messages -> messages.addSuccessUpdateCrawlerParams(GLOBAL)); return redirect(getClass()); } @@ -163,45 +163,45 @@ public class AdminGeneralAction extends FessAdminAction { protected void updateForm(final EditForm form) { form.loginRequired = fessConfig.isLoginRequired() ? Constants.TRUE : Constants.FALSE; - form.incrementalCrawling = crawlerProperties.getProperty(Constants.INCREMENTAL_CRAWLING_PROPERTY, Constants.TRUE); + form.incrementalCrawling = systemProperties.getProperty(Constants.INCREMENTAL_CRAWLING_PROPERTY, Constants.TRUE); form.dayForCleanup = getPropertyAsInteger(Constants.DAY_FOR_CLEANUP_PROPERTY, Constants.DEFAULT_DAY_FOR_CLEANUP); - form.crawlingThreadCount = Integer.parseInt(crawlerProperties.getProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY, "5")); - form.searchLog = crawlerProperties.getProperty(Constants.SEARCH_LOG_PROPERTY, Constants.TRUE); - form.userInfo = crawlerProperties.getProperty(Constants.USER_INFO_PROPERTY, Constants.TRUE); - form.userFavorite = crawlerProperties.getProperty(Constants.USER_FAVORITE_PROPERTY, Constants.FALSE); - form.webApiJson = crawlerProperties.getProperty(Constants.WEB_API_JSON_PROPERTY, Constants.TRUE); - form.defaultLabelValue = crawlerProperties.getProperty(Constants.DEFAULT_LABEL_VALUE_PROPERTY, StringUtil.EMPTY); - form.appendQueryParameter = crawlerProperties.getProperty(Constants.APPEND_QUERY_PARAMETER_PROPERTY, Constants.FALSE); + form.crawlingThreadCount = Integer.parseInt(systemProperties.getProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY, "5")); + form.searchLog = systemProperties.getProperty(Constants.SEARCH_LOG_PROPERTY, Constants.TRUE); + form.userInfo = systemProperties.getProperty(Constants.USER_INFO_PROPERTY, Constants.TRUE); + form.userFavorite = systemProperties.getProperty(Constants.USER_FAVORITE_PROPERTY, Constants.FALSE); + form.webApiJson = systemProperties.getProperty(Constants.WEB_API_JSON_PROPERTY, Constants.TRUE); + form.defaultLabelValue = systemProperties.getProperty(Constants.DEFAULT_LABEL_VALUE_PROPERTY, StringUtil.EMPTY); + form.appendQueryParameter = systemProperties.getProperty(Constants.APPEND_QUERY_PARAMETER_PROPERTY, Constants.FALSE); form.ignoreFailureType = - crawlerProperties.getProperty(Constants.IGNORE_FAILURE_TYPE_PROPERTY, Constants.DEFAULT_IGNORE_FAILURE_TYPE); + systemProperties.getProperty(Constants.IGNORE_FAILURE_TYPE_PROPERTY, Constants.DEFAULT_IGNORE_FAILURE_TYPE); form.failureCountThreshold = getPropertyAsInteger(Constants.FAILURE_COUNT_THRESHOLD_PROPERTY, Constants.DEFAULT_FAILURE_COUNT); form.popularWord = fessConfig.isWebApiPopularWord() ? Constants.TRUE : Constants.FALSE; - form.csvFileEncoding = crawlerProperties.getProperty(Constants.CSV_FILE_ENCODING_PROPERTY, Constants.UTF_8); + form.csvFileEncoding = systemProperties.getProperty(Constants.CSV_FILE_ENCODING_PROPERTY, Constants.UTF_8); form.purgeSearchLogDay = - Integer.parseInt(crawlerProperties.getProperty(Constants.PURGE_SEARCH_LOG_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY)); + Integer.parseInt(systemProperties.getProperty(Constants.PURGE_SEARCH_LOG_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY)); form.purgeJobLogDay = - Integer.parseInt(crawlerProperties.getProperty(Constants.PURGE_JOB_LOG_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY)); + Integer.parseInt(systemProperties.getProperty(Constants.PURGE_JOB_LOG_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY)); form.purgeUserInfoDay = - Integer.parseInt(crawlerProperties.getProperty(Constants.PURGE_USER_INFO_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY)); - form.purgeByBots = crawlerProperties.getProperty(Constants.PURGE_BY_BOTS_PROPERTY, Constants.DEFAULT_PURGE_BY_BOTS); - form.notificationTo = crawlerProperties.getProperty(Constants.NOTIFICATION_TO_PROPERTY, StringUtil.EMPTY); - form.suggestSearchLog = crawlerProperties.getProperty(Constants.SUGGEST_SEARCH_LOG_PROPERTY, Constants.TRUE); - form.suggestDocuments = crawlerProperties.getProperty(Constants.SUGGEST_DOCUMENTS_PROPERTY, Constants.TRUE); + Integer.parseInt(systemProperties.getProperty(Constants.PURGE_USER_INFO_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY)); + form.purgeByBots = systemProperties.getProperty(Constants.PURGE_BY_BOTS_PROPERTY, Constants.DEFAULT_PURGE_BY_BOTS); + form.notificationTo = systemProperties.getProperty(Constants.NOTIFICATION_TO_PROPERTY, StringUtil.EMPTY); + form.suggestSearchLog = systemProperties.getProperty(Constants.SUGGEST_SEARCH_LOG_PROPERTY, Constants.TRUE); + form.suggestDocuments = systemProperties.getProperty(Constants.SUGGEST_DOCUMENTS_PROPERTY, Constants.TRUE); form.purgeSuggestSearchLogDay = - Integer.parseInt(crawlerProperties.getProperty(Constants.PURGE_SUGGEST_SEARCH_LOG_DAY_PROPERTY, + Integer.parseInt(systemProperties.getProperty(Constants.PURGE_SUGGEST_SEARCH_LOG_DAY_PROPERTY, Constants.DEFAULT_SUGGEST_PURGE_DAY)); - form.ldapProviderUrl = crawlerProperties.getProperty(Constants.LDAP_PROVIDER_URL, StringUtil.EMPTY); - form.ldapSecurityPrincipal = crawlerProperties.getProperty(Constants.LDAP_SECURITY_PRINCIPAL, StringUtil.EMPTY); - form.ldapBaseDn = crawlerProperties.getProperty(Constants.LDAP_BASE_DN, StringUtil.EMPTY); - form.ldapAccountFilter = crawlerProperties.getProperty(Constants.LDAP_ACCOUNT_FILTER, StringUtil.EMPTY); + form.ldapProviderUrl = systemProperties.getProperty(Constants.LDAP_PROVIDER_URL, StringUtil.EMPTY); + form.ldapSecurityPrincipal = systemProperties.getProperty(Constants.LDAP_SECURITY_PRINCIPAL, StringUtil.EMPTY); + form.ldapBaseDn = systemProperties.getProperty(Constants.LDAP_BASE_DN, StringUtil.EMPTY); + form.ldapAccountFilter = systemProperties.getProperty(Constants.LDAP_ACCOUNT_FILTER, StringUtil.EMPTY); } private void updateProperty(final String key, final String value) { - crawlerProperties.setProperty(key, value == null ? StringUtil.EMPTY : value); + systemProperties.setProperty(key, value == null ? StringUtil.EMPTY : value); } private Integer getPropertyAsInteger(final String key, final int defaultValue) { - final String value = crawlerProperties.getProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY); + final String value = systemProperties.getProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY); if (value != null) { try { return Integer.valueOf(value); diff --git a/src/main/java/org/codelibs/fess/app/web/admin/systeminfo/AdminSysteminfoAction.java b/src/main/java/org/codelibs/fess/app/web/admin/systeminfo/AdminSysteminfoAction.java index 4ad233eed301c5deed0ad3f5740b35648d59c739..0d3dcd7c70c4ab0bbffa73c9ea1914f6e75125bd 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/systeminfo/AdminSysteminfoAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/systeminfo/AdminSysteminfoAction.java @@ -44,7 +44,7 @@ public class AdminSysteminfoAction extends FessAdminAction { @Resource private SystemHelper systemHelper; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; private static final String[] bugReportLabels = { "file.separator", "file.encoding", "java.runtime.version", "java.vm.info", "java.vm.name", "java.vm.vendor", "java.vm.version", "os.arch", "os.name", "os.version", "user.country", "user.language", @@ -94,7 +94,7 @@ public class AdminSysteminfoAction extends FessAdminAction { protected void registerFessPropItems(final RenderData data) { final List> itemList = new ArrayList>(); - for (final Map.Entry entry : crawlerProperties.entrySet()) { + for (final Map.Entry entry : systemProperties.entrySet()) { itemList.add(createItem(entry.getKey(), entry.getValue())); } RenderDataUtil.register(data, "fessPropItems", itemList); @@ -106,7 +106,7 @@ public class AdminSysteminfoAction extends FessAdminAction { itemList.add(createPropItem(label)); } - for (final Map.Entry entry : crawlerProperties.entrySet()) { + for (final Map.Entry entry : systemProperties.entrySet()) { if (isBugReportTarget(entry.getKey())) { itemList.add(createItem(entry.getKey(), entry.getValue())); } diff --git a/src/main/java/org/codelibs/fess/app/web/admin/wizard/AdminWizardAction.java b/src/main/java/org/codelibs/fess/app/web/admin/wizard/AdminWizardAction.java index f76cdc95cea194da7920a9280eeec84634edca6e..0004c55e21fa8bbd94be58f0bdc436924a39293e 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/wizard/AdminWizardAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/wizard/AdminWizardAction.java @@ -55,7 +55,7 @@ public class AdminWizardAction extends FessAdminAction { // Attribute // @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Resource protected WebConfigService webConfigService; @@ -226,7 +226,7 @@ public class AdminWizardAction extends FessAdminAction { } protected Integer getDefaultInteger(final String key, final Integer defaultValue) { - final String value = crawlerProperties.getProperty(key); + final String value = systemProperties.getProperty(key); if (value != null) { try { return Integer.parseInt(value); @@ -236,7 +236,7 @@ public class AdminWizardAction extends FessAdminAction { } protected Long getDefaultLong(final String key, final Long defaultValue) { - final String value = crawlerProperties.getProperty(key); + final String value = systemProperties.getProperty(key); if (value != null) { try { return Long.parseLong(value); @@ -246,7 +246,7 @@ public class AdminWizardAction extends FessAdminAction { } protected String getDefaultString(final String key, final String defaultValue) { - final String value = crawlerProperties.getProperty(key); + final String value = systemProperties.getProperty(key); if (value != null) { return value; } diff --git a/src/main/java/org/codelibs/fess/app/web/base/FessSearchAction.java b/src/main/java/org/codelibs/fess/app/web/base/FessSearchAction.java index 3d59e3c615bddf26d7e7f0335a6d02ee89f2ad36..a4ce3a31d9068880ed606e3e2dc002e92a46f941 100644 --- a/src/main/java/org/codelibs/fess/app/web/base/FessSearchAction.java +++ b/src/main/java/org/codelibs/fess/app/web/base/FessSearchAction.java @@ -81,7 +81,7 @@ public abstract class FessSearchAction extends FessBaseAction { protected PopularWordHelper popularWordHelper; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Resource protected HttpServletRequest request; @@ -92,8 +92,8 @@ public abstract class FessSearchAction extends FessBaseAction { @Override public ActionResponse hookBefore(final ActionRuntime runtime) { // application may override - searchLogSupport = Constants.TRUE.equals(crawlerProperties.getProperty(Constants.SEARCH_LOG_PROPERTY, Constants.TRUE)); - favoriteSupport = Constants.TRUE.equals(crawlerProperties.getProperty(Constants.USER_FAVORITE_PROPERTY, Constants.FALSE)); + searchLogSupport = Constants.TRUE.equals(systemProperties.getProperty(Constants.SEARCH_LOG_PROPERTY, Constants.TRUE)); + favoriteSupport = Constants.TRUE.equals(systemProperties.getProperty(Constants.USER_FAVORITE_PROPERTY, Constants.FALSE)); runtime.registerData("searchLogSupport", searchLogSupport); runtime.registerData("favoriteSupport", favoriteSupport); if (fessConfig.isWebApiPopularWord()) { @@ -139,7 +139,7 @@ public abstract class FessSearchAction extends FessBaseAction { final List> labelTypeItems = labelTypeHelper.getLabelTypeItemList(); if (!labelTypeItems.isEmpty() && !fields.containsKey(FessSearchAction.LABEL_FIELD)) { - final String defaultLabelValue = crawlerProperties.getProperty(Constants.DEFAULT_LABEL_VALUE_PROPERTY, StringUtil.EMPTY); + final String defaultLabelValue = systemProperties.getProperty(Constants.DEFAULT_LABEL_VALUE_PROPERTY, StringUtil.EMPTY); if (StringUtil.isNotBlank(defaultLabelValue)) { final String[] values = defaultLabelValue.split("\n"); if (values != null && values.length > 0) { diff --git a/src/main/java/org/codelibs/fess/app/web/go/GoAction.java b/src/main/java/org/codelibs/fess/app/web/go/GoAction.java index cb6a9ae0f65d46472bd699adaeadbd557df113dd..60fd4e0f0a396e4f9dcb50579812cdacbe2cd937 100644 --- a/src/main/java/org/codelibs/fess/app/web/go/GoAction.java +++ b/src/main/java/org/codelibs/fess/app/web/go/GoAction.java @@ -88,7 +88,7 @@ public class GoAction extends FessSearchAction { return redirect(ErrorAction.class); } - if (Constants.TRUE.equals(crawlerProperties.getProperty(Constants.SEARCH_LOG_PROPERTY, Constants.TRUE))) { + if (Constants.TRUE.equals(systemProperties.getProperty(Constants.SEARCH_LOG_PROPERTY, Constants.TRUE))) { final String userSessionId = userInfoHelper.getUserCode(); if (userSessionId != null) { final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper(); @@ -127,7 +127,7 @@ public class GoAction extends FessSearchAction { } if (isFileSystemPath(url)) { - if (Constants.TRUE.equals(crawlerProperties.getProperty(Constants.SEARCH_FILE_PROXY_PROPERTY, Constants.TRUE))) { + if (Constants.TRUE.equals(systemProperties.getProperty(Constants.SEARCH_FILE_PROXY_PROPERTY, Constants.TRUE))) { final ViewHelper viewHelper = ComponentUtil.getViewHelper(); try { return viewHelper.asContentResponse(doc); diff --git a/src/main/java/org/codelibs/fess/crawler/FessCrawlerThread.java b/src/main/java/org/codelibs/fess/crawler/FessCrawlerThread.java index 662f05d61a0c88e2b987aee619957bd621f1ad2e..c56b6b861ce65a7251fa27114e37a3bd302ac101 100644 --- a/src/main/java/org/codelibs/fess/crawler/FessCrawlerThread.java +++ b/src/main/java/org/codelibs/fess/crawler/FessCrawlerThread.java @@ -56,8 +56,8 @@ public class FessCrawlerThread extends CrawlerThread { @Override protected boolean isContentUpdated(final CrawlerClient client, final UrlQueue urlQueue) { - final DynamicProperties crawlerProperties = ComponentUtil.getSystemProperties(); - if (crawlerProperties.getProperty(Constants.INCREMENTAL_CRAWLING_PROPERTY, Constants.TRUE).equals(Constants.TRUE)) { + final DynamicProperties systemProperties = ComponentUtil.getSystemProperties(); + if (systemProperties.getProperty(Constants.INCREMENTAL_CRAWLING_PROPERTY, Constants.TRUE).equals(Constants.TRUE)) { log(logHelper, LogType.CHECK_LAST_MODIFIED, crawlerContext, urlQueue); final long startTime = System.currentTimeMillis(); diff --git a/src/main/java/org/codelibs/fess/dict/DictionaryManager.java b/src/main/java/org/codelibs/fess/dict/DictionaryManager.java index 03256cc3cc56736662b0db73c0a2ed092f34e971..3a596138ae8c484a3093598fc3f3dced44301ad4 100644 --- a/src/main/java/org/codelibs/fess/dict/DictionaryManager.java +++ b/src/main/java/org/codelibs/fess/dict/DictionaryManager.java @@ -41,7 +41,7 @@ public class DictionaryManager { private static final Logger logger = LoggerFactory.getLogger(DictionaryManager.class); @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; protected List creatorList = new ArrayList<>(); diff --git a/src/main/java/org/codelibs/fess/exec/Crawler.java b/src/main/java/org/codelibs/fess/exec/Crawler.java index be2fa4434b24c2e03b689110fe1a4af4b279407e..acdf933c809271eb3895807e4c5f9cbb4813c64f 100644 --- a/src/main/java/org/codelibs/fess/exec/Crawler.java +++ b/src/main/java/org/codelibs/fess/exec/Crawler.java @@ -81,7 +81,7 @@ public class Crawler implements Serializable { protected CrawlingInfoService crawlingInfoService; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; protected static class Options { @@ -206,17 +206,17 @@ public class Crawler implements Serializable { } final CrawlingInfoHelper crawlingInfoHelper = ComponentUtil.getCrawlingInfoHelper(); - final DynamicProperties crawlerProperties = ComponentUtil.getSystemProperties(); + final DynamicProperties systemProperties = ComponentUtil.getSystemProperties(); if (StringUtil.isNotBlank(options.propertiesPath)) { - crawlerProperties.reload(options.propertiesPath); + systemProperties.reload(options.propertiesPath); } else { try { final File propFile = File.createTempFile("crawler_", ".properties"); if (propFile.delete() && logger.isDebugEnabled()) { logger.debug("Deleted a temp file: " + propFile.getAbsolutePath()); } - crawlerProperties.reload(propFile.getAbsolutePath()); + systemProperties.reload(propFile.getAbsolutePath()); propFile.deleteOnExit(); // NOSONAR } catch (final IOException e) { logger.warn("Failed to create system properties file.", e); @@ -230,7 +230,7 @@ public class Crawler implements Serializable { dayForCleanupStr = options.expires; } else { dayForCleanupStr = - crawlerProperties.getProperty(Constants.DAY_FOR_CLEANUP_PROPERTY, Constants.DEFAULT_DAY_FOR_CLEANUP.toString()); + systemProperties.getProperty(Constants.DAY_FOR_CLEANUP_PROPERTY, Constants.DEFAULT_DAY_FOR_CLEANUP.toString()); } int dayForCleanup = -1; try { @@ -272,7 +272,7 @@ public class Crawler implements Serializable { } protected void sendMail(final Map infoMap) { - final String toStrs = (String) crawlerProperties.get(Constants.NOTIFICATION_TO_PROPERTY); + final String toStrs = (String) systemProperties.get(Constants.NOTIFICATION_TO_PROPERTY); if (StringUtil.isNotBlank(toStrs)) { final String[] toAddresses = toStrs.split(","); final Map dataMap = new HashMap<>(); diff --git a/src/main/java/org/codelibs/fess/exec/SuggestCreator.java b/src/main/java/org/codelibs/fess/exec/SuggestCreator.java index 4bf9d9fc038d7be6c810d4da91f285338e93270f..d421d2e8aa5d86b7a6f857fa5f988171b009cb00 100644 --- a/src/main/java/org/codelibs/fess/exec/SuggestCreator.java +++ b/src/main/java/org/codelibs/fess/exec/SuggestCreator.java @@ -113,17 +113,17 @@ public class SuggestCreator implements Serializable { } private static int process(final Options options) { - final DynamicProperties crawlerProperties = ComponentUtil.getSystemProperties(); + final DynamicProperties systemProperties = ComponentUtil.getSystemProperties(); if (StringUtil.isNotBlank(options.propertiesPath)) { - crawlerProperties.reload(options.propertiesPath); + systemProperties.reload(options.propertiesPath); } else { try { final File propFile = File.createTempFile("suggest_", ".properties"); if (propFile.delete() && logger.isDebugEnabled()) { logger.debug("Deleted a temp file: " + propFile.getAbsolutePath()); } - crawlerProperties.reload(propFile.getAbsolutePath()); + systemProperties.reload(propFile.getAbsolutePath()); propFile.deleteOnExit(); // NOSONAR } catch (final IOException e) { logger.warn("Failed to create system properties file.", e); @@ -140,8 +140,8 @@ public class SuggestCreator implements Serializable { } private int create() { - final DynamicProperties crawlerProperties = ComponentUtil.getSystemProperties(); - if (!Constants.TRUE.equals(crawlerProperties.getProperty(Constants.SUGGEST_DOCUMENTS_PROPERTY, Constants.TRUE))) { + final DynamicProperties systemProperties = ComponentUtil.getSystemProperties(); + if (!Constants.TRUE.equals(systemProperties.getProperty(Constants.SUGGEST_DOCUMENTS_PROPERTY, Constants.TRUE))) { logger.info("Skip create suggest document."); return 0; } @@ -171,12 +171,12 @@ public class SuggestCreator implements Serializable { private int purge(final LocalDateTime time) { final SuggestHelper suggestHelper = ComponentUtil.getSuggestHelper(); - final DynamicProperties crawlerProperties = ComponentUtil.getSystemProperties(); + final DynamicProperties systemProperties = ComponentUtil.getSystemProperties(); try { suggestHelper.purgeDocumentSuggest(time); final long cleanupDay = - Long.parseLong(crawlerProperties.getProperty(Constants.PURGE_SUGGEST_SEARCH_LOG_DAY_PROPERTY, + Long.parseLong(systemProperties.getProperty(Constants.PURGE_SUGGEST_SEARCH_LOG_DAY_PROPERTY, Constants.DEFAULT_SUGGEST_PURGE_DAY)); if (cleanupDay > 0) { suggestHelper.purgeSearchlogSuggest(time.minusDays(cleanupDay)); diff --git a/src/main/java/org/codelibs/fess/helper/DataIndexHelper.java b/src/main/java/org/codelibs/fess/helper/DataIndexHelper.java index 2778f7094e1e5f5ede51baf31246db5555b6b603..6712fb1b3e6016ad9100e0ff86fa5117937cf63a 100644 --- a/src/main/java/org/codelibs/fess/helper/DataIndexHelper.java +++ b/src/main/java/org/codelibs/fess/helper/DataIndexHelper.java @@ -50,7 +50,7 @@ public class DataIndexHelper implements Serializable { private static final String DELETE_OLD_DOCS = "delete_old_docs"; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Resource public DataConfigService dataConfigService; @@ -94,7 +94,7 @@ public class DataIndexHelper implements Serializable { protected void doCrawl(final String sessionId, final List configList) { int multiprocessCrawlingCount = 5; - final String value = crawlerProperties.getProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY, "5"); + final String value = systemProperties.getProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY, "5"); try { multiprocessCrawlingCount = Integer.parseInt(value); } catch (final NumberFormatException e) { diff --git a/src/main/java/org/codelibs/fess/helper/QueryHelper.java b/src/main/java/org/codelibs/fess/helper/QueryHelper.java index 299c7491844364b6fae39582501e0b55f5a6cdc4..4de72e74968aa5c0469a0e00c63ad542498852e5 100644 --- a/src/main/java/org/codelibs/fess/helper/QueryHelper.java +++ b/src/main/java/org/codelibs/fess/helper/QueryHelper.java @@ -79,7 +79,7 @@ public class QueryHelper implements Serializable { protected static final String INURL_FIELD = "inurl"; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Resource protected FessConfig fessConfig; diff --git a/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java b/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java index b2cc58a06ecf7e610f21b46e0f28f2bd8c70ca35..f9e03a8a6e728fa0bf9c0f4bf20dc840ce587246 100644 --- a/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java +++ b/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java @@ -54,7 +54,7 @@ public class SearchLogHelper { private static final Logger logger = LoggerFactory.getLogger(SearchLogHelper.class); @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; public long userCheckInterval = 5 * 60 * 1000;// 5 min @@ -132,7 +132,7 @@ public class SearchLogHelper { } protected void processSearchLogQueue(final Queue queue) { - final String value = crawlerProperties.getProperty(Constants.PURGE_BY_BOTS_PROPERTY, StringUtil.EMPTY); + final String value = systemProperties.getProperty(Constants.PURGE_BY_BOTS_PROPERTY, StringUtil.EMPTY); String[] botNames; if (StringUtil.isBlank(value)) { botNames = StringUtil.EMPTY_STRINGS; diff --git a/src/main/java/org/codelibs/fess/helper/ViewHelper.java b/src/main/java/org/codelibs/fess/helper/ViewHelper.java index 3de46746ffb5fbedde42ce5c920d866940d263d5..4603e22b3e0d47558348f0e8275a12e8f7778122 100644 --- a/src/main/java/org/codelibs/fess/helper/ViewHelper.java +++ b/src/main/java/org/codelibs/fess/helper/ViewHelper.java @@ -90,7 +90,7 @@ public class ViewHelper implements Serializable { protected UserAgentHelper userAgentHelper; @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; public int descriptionLength = 200; @@ -247,44 +247,44 @@ public class ViewHelper implements Serializable { switch (ua) { case IE: if (isLocalFile) { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.winlocal.ie", "file://")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.winlocal.ie", "file://")); } else { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.ie", "file://")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.ie", "file://")); } break; case FIREFOX: if (isLocalFile) { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.winlocal.firefox", "file://")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.winlocal.firefox", "file://")); } else { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.firefox", "file://///")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.firefox", "file://///")); } break; case CHROME: if (isLocalFile) { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.winlocal.chrome", "file://")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.winlocal.chrome", "file://")); } else { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.chrome", "file://")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.chrome", "file://")); } break; case SAFARI: if (isLocalFile) { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.winlocal.safari", "file://")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.winlocal.safari", "file://")); } else { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.safari", "file:////")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.safari", "file:////")); } break; case OPERA: if (isLocalFile) { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.winlocal.opera", "file://")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.winlocal.opera", "file://")); } else { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.opera", "file://")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.opera", "file://")); } break; default: if (isLocalFile) { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.winlocal.other", "file://")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.winlocal.other", "file://")); } else { - url = url.replaceFirst("file:/+", crawlerProperties.getProperty("file.protocol.other", "file://")); + url = url.replaceFirst("file:/+", systemProperties.getProperty("file.protocol.other", "file://")); } break; } @@ -305,7 +305,7 @@ public class ViewHelper implements Serializable { } protected String appendQueryParameter(final Map document, final String url) { - if (Constants.TRUE.equals(crawlerProperties.get(Constants.APPEND_QUERY_PARAMETER_PROPERTY))) { + if (Constants.TRUE.equals(systemProperties.get(Constants.APPEND_QUERY_PARAMETER_PROPERTY))) { final FessConfig fessConfig = ComponentUtil.getFessConfig(); final String mimetype = getString(document, fessConfig.getIndexFieldMimetype()); if (StringUtil.isNotBlank(mimetype)) { diff --git a/src/main/java/org/codelibs/fess/helper/WebFsIndexHelper.java b/src/main/java/org/codelibs/fess/helper/WebFsIndexHelper.java index 783ea5f07763bd46fee7b77352bea8558db528a1..a4705c1d4aeeea074fa6efb08908689a5652c5ee 100644 --- a/src/main/java/org/codelibs/fess/helper/WebFsIndexHelper.java +++ b/src/main/java/org/codelibs/fess/helper/WebFsIndexHelper.java @@ -51,7 +51,7 @@ public class WebFsIndexHelper implements Serializable { private static final Logger logger = LoggerFactory.getLogger(WebFsIndexHelper.class); @Resource - protected DynamicProperties crawlerProperties; + protected DynamicProperties systemProperties; @Resource public WebConfigService webConfigService; @@ -126,7 +126,7 @@ public class WebFsIndexHelper implements Serializable { protected void doCrawl(final String sessionId, final List webConfigList, final List fileConfigList) { int multiprocessCrawlingCount = 5; - final String value = crawlerProperties.getProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY, "5"); + final String value = systemProperties.getProperty(Constants.CRAWLING_THREAD_COUNT_PROPERTY, "5"); try { multiprocessCrawlingCount = Integer.parseInt(value); } catch (final NumberFormatException e) { diff --git a/src/main/java/org/codelibs/fess/job/PurgeLogJob.java b/src/main/java/org/codelibs/fess/job/PurgeLogJob.java index 32d82c81792db18c8715151034076052e7e4f528..525300eb332e79a764fb98434f8faf988f8c06de 100644 --- a/src/main/java/org/codelibs/fess/job/PurgeLogJob.java +++ b/src/main/java/org/codelibs/fess/job/PurgeLogJob.java @@ -35,7 +35,7 @@ public class PurgeLogJob { final SearchLogService searchLogService = ComponentUtil.getComponent(SearchLogService.class); final JobLogService jobLogService = ComponentUtil.getComponent(JobLogService.class); final UserInfoService userInfoService = ComponentUtil.getComponent(UserInfoService.class); - final DynamicProperties crawlerProperties = ComponentUtil.getSystemProperties(); + final DynamicProperties systemProperties = ComponentUtil.getSystemProperties(); final SystemHelper systemHelper = ComponentUtil.getSystemHelper(); final StringBuilder resultBuf = new StringBuilder(); @@ -50,7 +50,7 @@ public class PurgeLogJob { // purge search logs try { - final String value = crawlerProperties.getProperty(Constants.PURGE_SEARCH_LOG_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY); + final String value = systemProperties.getProperty(Constants.PURGE_SEARCH_LOG_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY); final int days = Integer.parseInt(value); if (days >= 0) { searchLogService.deleteBefore(days); @@ -64,7 +64,7 @@ public class PurgeLogJob { // purge job logs try { - final String value = crawlerProperties.getProperty(Constants.PURGE_JOB_LOG_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY); + final String value = systemProperties.getProperty(Constants.PURGE_JOB_LOG_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY); final int days = Integer.parseInt(value); if (days >= 0) { jobLogService.deleteBefore(days); @@ -78,7 +78,7 @@ public class PurgeLogJob { // purge user info try { - final String value = crawlerProperties.getProperty(Constants.PURGE_USER_INFO_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY); + final String value = systemProperties.getProperty(Constants.PURGE_USER_INFO_DAY_PROPERTY, Constants.DEFAULT_PURGE_DAY); final int days = Integer.parseInt(value); if (days >= 0) { userInfoService.deleteBefore(days); diff --git a/src/main/java/org/codelibs/fess/util/ComponentUtil.java b/src/main/java/org/codelibs/fess/util/ComponentUtil.java index 48879e5e12e31691ee6b989040feb89662f2aee7..62d3333a21a298736b3cf179d3339ded86be5390 100644 --- a/src/main/java/org/codelibs/fess/util/ComponentUtil.java +++ b/src/main/java/org/codelibs/fess/util/ComponentUtil.java @@ -110,7 +110,7 @@ public final class ComponentUtil { private static final String SYSTEM_HELPER = "systemHelper"; - private static final String CRAWLER_PROPERTIES = "crawlerProperties"; + private static final String CRAWLER_PROPERTIES = "systemProperties"; private static final String PROPERTIES_SUFFIX = "Properties"; diff --git a/src/main/resources/fess_config.xml b/src/main/resources/fess_config.xml index 04a27b904f4d6f5c754b1b6b48d1569f7ec4197f..ff43e0132d403f1cb30653ec2c81fabe8cc5612f 100644 --- a/src/main/resources/fess_config.xml +++ b/src/main/resources/fess_config.xml @@ -2,7 +2,7 @@ - + org.codelibs.fess.util.ResourceUtil.getConfPath("system.properties")