Repository: incubator-unomi Updated Branches: refs/heads/unomi-1.3.x b71269408 -> c06620437
UNOMI-186 clean @Deprecated documentation, add version of deprecation, add missing tag Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/c0662043 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/c0662043 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/c0662043 Branch: refs/heads/unomi-1.3.x Commit: c06620437bd67eaa16434641cdb0d512300fa5c9 Parents: b712694 Author: dgaillard <[email protected]> Authored: Fri Jun 29 11:17:42 2018 +0200 Committer: dgaillard <[email protected]> Committed: Fri Jun 29 11:17:42 2018 +0200 ---------------------------------------------------------------------- api/src/main/java/org/apache/unomi/api/Parameter.java | 2 +- .../org/apache/unomi/api/services/DefinitionsService.java | 1 + .../apache/unomi/api/services/PersonalizationService.java | 2 +- .../java/org/apache/unomi/api/services/PrivacyService.java | 8 ++++---- .../java/org/apache/unomi/api/services/QueryService.java | 1 + .../elasticsearch/ElasticSearchPersistenceServiceImpl.java | 1 + .../org/apache/unomi/persistence/spi/PersistenceService.java | 1 + .../java/org/apache/unomi/rest/RulesServiceEndPoint.java | 2 +- .../java/org/apache/unomi/rest/ScoringServiceEndPoint.java | 2 +- .../java/org/apache/unomi/rest/SegmentServiceEndPoint.java | 2 +- .../unomi/services/services/DefinitionsServiceImpl.java | 2 +- .../org/apache/unomi/services/services/QueryServiceImpl.java | 3 ++- 12 files changed, 16 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/Parameter.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/unomi/api/Parameter.java b/api/src/main/java/org/apache/unomi/api/Parameter.java index c4d7d99..c8a1f9e 100644 --- a/api/src/main/java/org/apache/unomi/api/Parameter.java +++ b/api/src/main/java/org/apache/unomi/api/Parameter.java @@ -47,7 +47,7 @@ public class Parameter implements Serializable { return multivalued; } - @Deprecated + @Deprecated // As of version 1.1.0-incubating public void setChoiceListInitializerFilter(String choiceListInitializerFilter) { // Avoid errors when deploying old definitions } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java b/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java index 4b1a141..25ec40b 100644 --- a/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java +++ b/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java @@ -181,6 +181,7 @@ public interface DefinitionsService { * @param rootCondition the root condition where to start the extraction by class * @param tag the tag to use to extract the condition * @return Condition the condition that has been found matching the tag, or null if none matched + * @deprecated As of 1.2.0-incubating, please use {@link #extractConditionBySystemTag(Condition, String)} instead */ @Deprecated Condition extractConditionByTag(Condition rootCondition, String tag); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java index 5cff730..d8df08c 100644 --- a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java +++ b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java @@ -131,7 +131,7 @@ public interface PersonalizationService { * Sets the filter identifier associated with this content filtering definition. * * @param filterid the filter identifier associated with this content filtering definition - * @deprecated this method is deprecated use the setId method instead + * @deprecated As of version 1.3.0-incubating, please use {@link #setId(String)} instead */ public void setFilterid(String filterid) { this.id = filterid; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java b/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java index 4dc7def..4b67caf 100644 --- a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java +++ b/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java @@ -146,14 +146,14 @@ public interface PrivacyService { * @param profileId the profile for which to see the denied properties * @param propertyNames the property names to be denied * @return null all the time, this method is not used and is marked as deprecated - * @deprecated don't use this method, instead mark properties with the personal identifier tag which will mark them - * as denied by the getDeniedProperties method + * @deprecated As of version 1.3.0-incubating, do not use this method, instead mark properties with the personal identifier tag which + * will mark them as denied by the getDeniedProperties method */ Boolean setDeniedProperties(String profileId, List<String> propertyNames); /** * This method doesn't do anything anymore please don't use it - * @deprecated do not use + * @deprecated As of version 1.3.0-incubating, do not use this method * @param profileId the identifier of the profile * @return do not use */ @@ -161,7 +161,7 @@ public interface PrivacyService { /** * This method doesn't do anything anymore please don't use it - * @deprecated do not use + * @deprecated As of version 1.3.0-incubating, do not use this method * @param profileId the identifier of the profile * @param propertyNames do not use * @return do not use http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/QueryService.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java index 6ff5cc3..208277b 100644 --- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java +++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java @@ -51,6 +51,7 @@ public interface QueryService { * @param query the {@link AggregateQuery} specifying the aggregation that should be perfomed * @return a Map associating a specific value of the property to the cardinality of items with that value * @see Item Item for a discussion of {@code ITEM_TYPE} + * @deprecated As of 1.3.0-incubating, please use {@link #getAggregateWithOptimizedQuery(String, String, AggregateQuery)} instead */ Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java ---------------------------------------------------------------------- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index 0f527db..e63f928 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -1481,6 +1481,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, }.catchingExecuteInClassLoader(true); } + @Deprecated // As of version 1.3.0-incubating @Override public Map<String, Long> aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType) { return aggregateQuery(filter, aggregate, itemType, false); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java ---------------------------------------------------------------------- diff --git a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java index ec22654..1b673be 100644 --- a/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java +++ b/persistence-spi/src/main/java/org/apache/unomi/persistence/spi/PersistenceService.java @@ -419,6 +419,7 @@ public interface PersistenceService { * @param aggregate an aggregate specifying how matching items must be bundled * @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field * @return a Map associating aggregation dimension name as key and cardinality for that dimension as value + * @deprecated As of 1.3.0-incubating, please use {@link #aggregateWithOptimizedQuery(Condition, BaseAggregate, String)} instead */ Map<String, Long> aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java ---------------------------------------------------------------------- diff --git a/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java index 8ed3bbe..1e7e37c 100644 --- a/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java +++ b/rest/src/main/java/org/apache/unomi/rest/RulesServiceEndPoint.java @@ -163,7 +163,7 @@ public class RulesServiceEndPoint { /** * TODO: remove * - * @deprecated not needed anymore + * @deprecated As of version 1.1.0-incubating, not needed anymore */ @GET @Path("/resetQueries") http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java ---------------------------------------------------------------------- diff --git a/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java index bc60f9d..6001c97 100644 --- a/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java +++ b/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java @@ -153,7 +153,7 @@ public class ScoringServiceEndPoint { /** * TODO: remove * - * @deprecated not needed anymore + * @deprecated As of version 1.1.0-incubating, not needed anymore */ @GET @Path("/resetQueries") http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java ---------------------------------------------------------------------- diff --git a/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java index 169a946..33da462 100644 --- a/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java +++ b/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java @@ -181,7 +181,7 @@ public class SegmentServiceEndPoint { /** * TODO: remove * - * @deprecated not needed anymore + * @deprecated As of version 1.1.0-incubating, not needed anymore */ @GET @Path("/resetQueries") http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java ---------------------------------------------------------------------- diff --git a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java index 3392522..62be8bb 100644 --- a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java @@ -379,7 +379,7 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu } } - @Deprecated + @Deprecated // As of version 1.2.0-incubating public Condition extractConditionByTag(Condition rootCondition, String tag) { if (rootCondition.containsParameter("subConditions")) { @SuppressWarnings("unchecked") http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java ---------------------------------------------------------------------- diff --git a/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java index bdbc9d1..d5aa81a 100644 --- a/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/QueryServiceImpl.java @@ -53,9 +53,10 @@ public class QueryServiceImpl implements QueryService { @Override public Map<String, Long> getAggregate(String itemType, String property) { - return persistenceService.aggregateQuery(null, new TermsAggregate(property), itemType); + return persistenceService.aggregateWithOptimizedQuery(null, new TermsAggregate(property), itemType); } + @Deprecated // As of version 1.3.0-incubating @Override public Map<String, Long> getAggregate(String itemType, String property, AggregateQuery query) { return getAggregate(itemType, property, query, false);
