diff --git a/duniter4j-core-client/pom.xml b/duniter4j-core-client/pom.xml index 0909b3eda5d095beba97ad5bce95ae4d088d2f68..6c2b2846feb457cee754aad45d56a28232943a41 100644 --- a/duniter4j-core-client/pom.xml +++ b/duniter4j-core-client/pom.xml @@ -60,10 +60,6 @@ <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore</artifactId> - </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpmime</artifactId> diff --git a/duniter4j-core-client/src/main/java/org/duniter/core/client/model/bma/util/BlockchainBlockUtils.java b/duniter4j-core-client/src/main/java/org/duniter/core/client/model/bma/util/BlockchainBlockUtils.java index 8ad5793a5f55dd1fcef31358448610c820b9a9ad..2fb098fe0da374b54c1026a93a97d096a1defd14 100644 --- a/duniter4j-core-client/src/main/java/org/duniter/core/client/model/bma/util/BlockchainBlockUtils.java +++ b/duniter4j-core-client/src/main/java/org/duniter/core/client/model/bma/util/BlockchainBlockUtils.java @@ -1,5 +1,27 @@ package org.duniter.core.client.model.bma.util; +/*- + * #%L + * Duniter4j :: Core Client API + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.collect.Lists; import com.google.common.collect.Maps; import jnr.ffi.annotations.In; diff --git a/duniter4j-core-shared/pom.xml b/duniter4j-core-shared/pom.xml index 389bc8678285b12d21d9671b9b72c00af7c986d8..9888384815fcaa796aa81403b674bc358f3d1ecc 100644 --- a/duniter4j-core-shared/pom.xml +++ b/duniter4j-core-shared/pom.xml @@ -45,10 +45,6 @@ <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore</artifactId> - </dependency> <dependency> <groupId>javax.websocket</groupId> diff --git a/duniter4j-es-assembly/src/main/assembly/config/logging.yml b/duniter4j-es-assembly/src/main/assembly/config/logging.yml index 1218c97d7b571db79ac3d0510811680e7020c1de..808683b68e0fcc6f350197831ba83736d2feea05 100644 --- a/duniter4j-es-assembly/src/main/assembly/config/logging.yml +++ b/duniter4j-es-assembly/src/main/assembly/config/logging.yml @@ -2,7 +2,7 @@ es.logger.level: INFO rootLogger: ${es.logger.level}, console, file logger: - # log rest execution errors for easier debugging + # log action execution errors for easier debugging action: DEBUG # deprecation logging, turn to DEBUG to see them @@ -14,17 +14,15 @@ logger: com.amazonaws.jmx.SdkMBeanRegistrySupport: ERROR com.amazonaws.metrics.AwsSdkMetrics: ERROR - org.apache.http: INFO - org.apache.http.client: ERROR + duniter: INFO + security: INFO org.duniter: INFO - - #org.duniter.elasticsearch: DEBUG - org.nuiton.i18n: WARN org.nuiton.config: ERROR org.nuiton.converter: WARN org.glassfish.tyrus: WARN + org.apache.http: INFO org.apache.http.client: ERROR # gateway diff --git a/duniter4j-es-core/src/main/filtered-resources/plugin-descriptor.properties b/duniter4j-es-core/src/main/filtered-resources/plugin-descriptor.properties index 5db9f0fedd321dc671c25946a715762ee38ecc9e..df06d1c95dd152f6c39ec8330469f40e81cbf256 100644 --- a/duniter4j-es-core/src/main/filtered-resources/plugin-descriptor.properties +++ b/duniter4j-es-core/src/main/filtered-resources/plugin-descriptor.properties @@ -5,5 +5,5 @@ site=false jvm=true classname=org.duniter.elasticsearch.Plugin java.version=1.7 -elasticsearch.version=2.3.3 +elasticsearch.version=2.4.5 isolated=false diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/PluginSettings.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/PluginSettings.java index 354900634615dd6bdea766d686e99c8df953e9e6..7955ebbe3087426be8c5e608a240aea827d085bf 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/PluginSettings.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/PluginSettings.java @@ -23,7 +23,6 @@ package org.duniter.elasticsearch; */ -import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import org.apache.commons.io.FileUtils; import org.duniter.core.client.config.Configuration; @@ -33,19 +32,14 @@ import org.duniter.core.client.model.local.Peer; import org.duniter.core.exception.TechnicalException; import org.duniter.core.util.StringUtils; import org.duniter.elasticsearch.i18n.I18nInitializer; -import org.duniter.elasticsearch.service.ServiceLocator; -import org.elasticsearch.common.component.*; +import org.elasticsearch.common.component.AbstractLifecycleComponent; import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.logging.ESLogger; -import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.common.settings.Settings; import org.nuiton.config.ApplicationConfig; import org.nuiton.config.ApplicationConfigHelper; import org.nuiton.config.ApplicationConfigProvider; import org.nuiton.config.ArgumentsParserException; import org.nuiton.i18n.I18n; -import org.nuiton.i18n.init.DefaultI18nInitializer; -import org.nuiton.i18n.init.UserI18nInitializer; import java.io.File; import java.io.IOException; diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/AbstractDao.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/AbstractDao.java index 08e21ed6bd847b93d2e16b2e0a8925d3be25d909..1dea70134c8b1b2751bd4c550cc43abc71d29976 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/AbstractDao.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/AbstractDao.java @@ -24,48 +24,14 @@ package org.duniter.elasticsearch.dao; import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.base.Joiner; -import org.apache.commons.collections4.MapUtils; import org.duniter.core.beans.Bean; import org.duniter.core.client.model.bma.jackson.JacksonUtils; -import org.duniter.core.exception.TechnicalException; import org.duniter.core.service.CryptoService; -import org.duniter.core.util.CollectionUtils; -import org.duniter.core.util.Preconditions; -import org.duniter.core.util.StringUtils; import org.duniter.elasticsearch.PluginSettings; import org.duniter.elasticsearch.client.Duniter4jClient; -import org.duniter.elasticsearch.dao.handler.StringReaderHandler; -import org.duniter.elasticsearch.exception.AccessDeniedException; -import org.duniter.elasticsearch.exception.NotFoundException; -import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequestBuilder; -import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder; -import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsResponse; -import org.elasticsearch.action.bulk.BulkItemResponse; -import org.elasticsearch.action.bulk.BulkRequest; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.Requests; -import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHitField; - -import java.io.*; -import java.util.*; /** * Created by Benoit on 08/04/2015. diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/PeerDao.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/PeerDao.java index d5405fcd1a6d9d2fbc374f75caf5fd196c364025..d1eee33bdf46e352208b228e32b9eaa39a7662de 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/PeerDao.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/PeerDao.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.dao; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.elasticsearch.dao.impl.PeerDaoImpl; /** diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/i18n/I18nInitializer.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/i18n/I18nInitializer.java index 9adbe5f06b548ae9eae4ebfb498e113785e1e9ef..55acfe7c94e29792228ff3fd22ddd7d663727601 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/i18n/I18nInitializer.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/i18n/I18nInitializer.java @@ -22,8 +22,6 @@ package org.duniter.elasticsearch.i18n; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.nuiton.i18n.bundle.I18nBundle; import org.nuiton.i18n.init.DefaultI18nInitializer; import org.nuiton.i18n.init.UserI18nInitializer; @@ -36,7 +34,6 @@ import java.util.List; * Created by blavenie on 10/01/17. */ public class I18nInitializer extends org.nuiton.i18n.init.I18nInitializer{ - private static final Log log = LogFactory.getLog(UserI18nInitializer.class); protected final File userDirectory; private String[] bundleNames; diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/script/BlockchainTxCountScriptFactory.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/script/BlockchainTxCountScriptFactory.java index 34774866fadc4c3b8d0cb53d7ed4630b724dec90..31176d21d5f97006c2265a312843b2cf5ca68420 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/script/BlockchainTxCountScriptFactory.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/script/BlockchainTxCountScriptFactory.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.script; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.elasticsearch.common.Nullable; import org.elasticsearch.script.AbstractFloatSearchScript; import org.elasticsearch.script.ExecutableScript; diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/service/changes/ChangeService.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/service/changes/ChangeService.java index 9539228844621ecad41b168975e5ad5af6064e03..8c77d5c37e11fc4b0b6c61b211d6d78e4e7339cc 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/service/changes/ChangeService.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/service/changes/ChangeService.java @@ -127,7 +127,7 @@ public class ChangeService { } @Override - public void postIndex(Engine.Index index) { + public void postIndex(Engine.Index index, boolean created) { if (!hasListener(indexName, index.type(), index.id())) { return; } @@ -137,7 +137,7 @@ public class ChangeService { index.type(), index.id(), new DateTime(), - ChangeEvent.Operation.INDEX, + created ? ChangeEvent.Operation.CREATE : ChangeEvent.Operation.INDEX, index.version(), index.source() ); diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/threadpool/LoggingScheduledThreadPoolExecutor.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/threadpool/LoggingScheduledThreadPoolExecutor.java index ebd4c9c4ecb657f3cbf826a9dab5d4ea1bb407ce..4fb5efd9bc6cd49c9d6158b333d48d38bc79166b 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/threadpool/LoggingScheduledThreadPoolExecutor.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/threadpool/LoggingScheduledThreadPoolExecutor.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.threadpool; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.elasticsearch.common.logging.ESLogger; import java.util.concurrent.*; diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/threadpool/RetryPolicy.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/threadpool/RetryPolicy.java index e8a792f2e6c8f3589916ed08436866c742a62158..04ed708df0d2a5bb3346b8352cf7629cd18678dd 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/threadpool/RetryPolicy.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/threadpool/RetryPolicy.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.threadpool; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.util.concurrent.EsAbortPolicy; diff --git a/duniter4j-es-subscription/src/main/filtered-resources/plugin-descriptor.properties b/duniter4j-es-subscription/src/main/filtered-resources/plugin-descriptor.properties index 78fb7eb1b62a95a65b96bca22b9aebe4e24a7d04..77759b1c81ac4db87835accdd9b00fbe398bc5f9 100644 --- a/duniter4j-es-subscription/src/main/filtered-resources/plugin-descriptor.properties +++ b/duniter4j-es-subscription/src/main/filtered-resources/plugin-descriptor.properties @@ -1,9 +1,9 @@ -name=gchange +name=subscription description=Plugin for Gchange API version=${project.version} site=false jvm=true classname=org.duniter.elasticsearch.subscription.Plugin java.version=1.7 -elasticsearch.version=2.3.3 +elasticsearch.version=2.4.5 isolated=false diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/SubscriptionIndexDao.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/SubscriptionIndexDao.java index f252212c742aee5b7ff7befb95650dbe6465efb1..ecdcded3b0de9d28963c769f15e3abf6043a2234 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/SubscriptionIndexDao.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/SubscriptionIndexDao.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.dao; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.elasticsearch.dao.IndexDao; import org.duniter.elasticsearch.dao.IndexTypeDao; diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/SubscriptionIndexDaoImpl.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/SubscriptionIndexDaoImpl.java index a3494113948d677a3939cbe87dc0c90800a59ff3..b93ec9437bc19b40432727690edc14cb2bed3ad7 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/SubscriptionIndexDaoImpl.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/SubscriptionIndexDaoImpl.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.dao; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.core.JsonProcessingException; import org.duniter.core.exception.TechnicalException; import org.duniter.elasticsearch.dao.AbstractIndexDao; diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/execution/SubscriptionExecutionDao.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/execution/SubscriptionExecutionDao.java index f957532ceaa4f6f91e184ec78bdc1f0ed104e21b..2ea19c36c847303570e74abb91aa3a45b2f817c3 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/execution/SubscriptionExecutionDao.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/execution/SubscriptionExecutionDao.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.dao.execution; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.elasticsearch.subscription.dao.SubscriptionIndexTypeDao; import org.duniter.elasticsearch.subscription.model.SubscriptionExecution; import org.duniter.elasticsearch.subscription.model.SubscriptionRecord; diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/execution/SubscriptionExecutionDaoImpl.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/execution/SubscriptionExecutionDaoImpl.java index f38d6d28292b50825d11161b836ef4fe716db2f8..d21bf52eb6c51771f4a03afd7725662e76047e67 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/execution/SubscriptionExecutionDaoImpl.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/execution/SubscriptionExecutionDaoImpl.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.dao.execution; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.core.JsonProcessingException; import org.duniter.core.client.model.bma.BlockchainBlock; import org.duniter.core.exception.TechnicalException; diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/record/SubscriptionRecordDao.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/record/SubscriptionRecordDao.java index d1fa0b8051b9120dd67febe31821a11e7e8a55ce..6b414bfed93287aad3f73472e756fd8b0522d428 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/record/SubscriptionRecordDao.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/record/SubscriptionRecordDao.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.dao.record; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.elasticsearch.subscription.dao.SubscriptionIndexTypeDao; import org.duniter.elasticsearch.subscription.model.SubscriptionRecord; diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/record/SubscriptionRecordDaoImpl.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/record/SubscriptionRecordDaoImpl.java index f3682afcb25bd851764e2648958fd5c24df07eb0..e5fa09ddc96ce44b70e9ff677302818b69c0bbec 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/record/SubscriptionRecordDaoImpl.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/dao/record/SubscriptionRecordDaoImpl.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.dao.record; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.exception.TechnicalException; import org.duniter.core.util.CollectionUtils; import org.duniter.elasticsearch.subscription.PluginSettings; diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/DateUtils.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/DateUtils.java index a67fecb2d4feee9137289340fa0a6766092a9d92..d6264c7074cfb3d04be8620e7818f2b14155cb56 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/DateUtils.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/DateUtils.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.util; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/stringtemplate/DateRenderer.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/stringtemplate/DateRenderer.java index eb84ec8d3e5a9c10b48a9683c89e8451eb0ed964..9fb695d17a0636af3a21bfc5d6fc1bb43bca2ad9 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/stringtemplate/DateRenderer.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/stringtemplate/DateRenderer.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.util.stringtemplate; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.stringtemplate.v4.AttributeRenderer; import java.text.DateFormat; diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/stringtemplate/StringRenderer.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/stringtemplate/StringRenderer.java index 92b638ba57ae97d53ddb1b1916e0d4164595c06f..fdbda8bdad3ba14d55f3e2bc0dc31f4cb20e4288 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/stringtemplate/StringRenderer.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/util/stringtemplate/StringRenderer.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.util.stringtemplate; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.client.model.ModelUtils; import org.duniter.core.util.CollectionUtils; import org.duniter.core.util.StringUtils; diff --git a/duniter4j-es-subscription/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties b/duniter4j-es-subscription/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties index b2ab35861924ba3083a3a6626bfa64c7dfef06e0..241c0434ad7f63c5eb38de4a55f9921cbfc24548 100644 --- a/duniter4j-es-subscription/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties +++ b/duniter4j-es-subscription/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties @@ -68,7 +68,7 @@ java.version=1.7 # elasticsearch release. This version is checked when the plugin # is loaded so Elasticsearch will refuse to start in the presence of # plugins with the incorrect elasticsearch.version. -elasticsearch.version=2.3.3 +elasticsearch.version=2.4.5 # ### deprecated elements for jvm plugins : # diff --git a/duniter4j-es-user/src/main/filtered-resources/plugin-descriptor.properties b/duniter4j-es-user/src/main/filtered-resources/plugin-descriptor.properties index 0d42d562512c654e2bcf99e2935d41e19fe95c05..e29af830f74af774d0a6d2a802b552dc4a841de5 100644 --- a/duniter4j-es-user/src/main/filtered-resources/plugin-descriptor.properties +++ b/duniter4j-es-user/src/main/filtered-resources/plugin-descriptor.properties @@ -5,5 +5,5 @@ site=false jvm=true classname=org.duniter.elasticsearch.user.Plugin java.version=1.7 -elasticsearch.version=2.3.3 +elasticsearch.version=2.4.5 isolated=false diff --git a/pom.xml b/pom.xml index b0e4eebffa2f92a0a39c361e471fcd313751e5f6..b16002f602c48bee43fad7f2845f3466a1510208 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ <xml-apis.version>2.0.2</xml-apis.version> <kalium.version>0.5.0_blavenie</kalium.version> <scrypt.version>1.4.0</scrypt.version> - <elasticsearch.version>2.3.3</elasticsearch.version> + <elasticsearch.version>2.4.5</elasticsearch.version> <jna.version>4.1.0</jna.version> <tyrus.version>1.13</tyrus.version> @@ -188,11 +188,6 @@ <artifactId>nuiton-i18n</artifactId> <version>${nuitonI18nVersion}</version> </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore</artifactId> - <version>4.3.2</version> - </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId>