Repository: incubator-unomi
Updated Branches:
  refs/heads/master 5f15a2692 -> c65f9897e


Add deprecations before releasing Unomi 1.2.0

Signed-off-by: Serge Huber <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/c65f9897
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/c65f9897
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/c65f9897

Branch: refs/heads/master
Commit: c65f9897ec5f31d9d22ad639738c7db9d109aa77
Parents: 5f15a26
Author: Serge Huber <[email protected]>
Authored: Wed Sep 13 17:51:07 2017 +0200
Committer: Serge Huber <[email protected]>
Committed: Wed Sep 13 17:51:07 2017 +0200

----------------------------------------------------------------------
 .../unomi/persistence/spi/PersistenceService.java |  2 ++
 .../apache/unomi/rest/ProfileServiceEndPoint.java | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c65f9897/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 332d220..b38531b 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
@@ -266,6 +266,8 @@ public interface PersistenceService {
      *                   String, considering each in turn and moving on to the 
next one in case of equality of all preceding ones. Each property name is 
optionally followed by
      *                   a column ({@code :}) and an order specifier: {@code 
asc} or {@code desc}.
      * @param clazz      the {@link Item} subclass of the items we want to 
retrieve
+     * @param offset     zero or a positive integer specifying the position of 
the first item in the total ordered collection of matching items
+     * @param size       a positive integer specifying how many matching items 
should be retrieved or {@code -1} if all of them should be retrieved
      * @return a {@link PartialList} of items matching the specified criteria
      */
     <T extends Item> PartialList<T> query(String fieldName, String fieldValue, 
String sortBy, Class<T> clazz, int offset, int size);

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c65f9897/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
----------------------------------------------------------------------
diff --git 
a/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java 
b/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
index 39e94e6..9b5ce74 100644
--- a/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
@@ -473,6 +473,7 @@ public class ProfileServiceEndPoint {
      * Retrieves all the property types associated with the specified target.
      *
      * TODO: move to a different class
+     * Deprecated : use a /properties/targets collection instead, this URI 
will be used for looking up properties by id instead.
      *
      * @param target   the target for which we want to retrieve the associated 
property types
      * @param language the value of the {@code Accept-Language} header to 
specify in which locale the properties description should be returned TODO 
unused
@@ -480,6 +481,23 @@ public class ProfileServiceEndPoint {
      */
     @GET
     @Path("/properties/{target}")
+    @Deprecated
+    public Collection<PropertyType> 
getPropertyTypesByTargetDeprecated(@PathParam("target") String target, 
@HeaderParam("Accept-Language") String language) {
+        return profileService.getAllPropertyTypes(target);
+    }
+
+    /**
+     * Retrieves all the property types associated with the specified target.
+     *
+     * TODO: move to a different class
+     *
+     * @param target   the target for which we want to retrieve the associated 
property types
+     * @param language the value of the {@code Accept-Language} header to 
specify in which locale the properties description should be returned TODO 
unused
+     * @return a collection of all the property types associated with the 
specified target
+     */
+    @GET
+    @Path("/properties/targets/{target}")
+    @Deprecated
     public Collection<PropertyType> 
getPropertyTypesByTarget(@PathParam("target") String target, 
@HeaderParam("Accept-Language") String language) {
         return profileService.getAllPropertyTypes(target);
     }

Reply via email to