You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by dr...@apache.org on 2018/10/01 14:22:46 UTC

[1/3] incubator-unomi git commit: UNOMI-187 rename feature entry

Repository: incubator-unomi
Updated Branches:
  refs/heads/patch b72678c86 -> b4a7dda39


UNOMI-187 rename feature entry


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

Branch: refs/heads/patch
Commit: 3c5f79d49483ea98119c75d463cb3d406277c158
Parents: efeacd7
Author: dgaillard <dg...@jahia.com>
Authored: Wed Sep 26 14:12:51 2018 +0200
Committer: tdraier <dr...@apache.org>
Committed: Mon Oct 1 15:10:05 2018 +0200

----------------------------------------------------------------------
 kar/src/main/feature/feature.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3c5f79d4/kar/src/main/feature/feature.xml
----------------------------------------------------------------------
diff --git a/kar/src/main/feature/feature.xml b/kar/src/main/feature/feature.xml
index e6abcf4..4301c38 100644
--- a/kar/src/main/feature/feature.xml
+++ b/kar/src/main/feature/feature.xml
@@ -68,7 +68,7 @@
         <bundle start-level="85" start="false">mvn:org.apache.unomi/unomi-plugins-optimization-test/${project.version}</bundle>
         <bundle start-level="85" start="false">mvn:org.apache.unomi/cxs-lists-extension-actions/${project.version}</bundle>
         <bundle start-level="85" start="false">mvn:org.apache.unomi/shell-dev-commands/${project.version}</bundle>
-        <bundle start-level="85" start="false">mvn:org.apache.unomi/unomi-web-tracker-core/${project.version}</bundle>
+        <bundle start-level="85" start="false">mvn:org.apache.unomi/unomi-web-tracker-wab/${project.version}</bundle>
 
         <bundle start-level="99">mvn:org.apache.unomi/shell-commands/${project.version}</bundle>
     </feature>


[3/3] incubator-unomi git commit: UNOMI-202 : Simplified and centralize patch files handling

Posted by dr...@apache.org.
UNOMI-202 : Simplified and centralize patch files handling


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

Branch: refs/heads/patch
Commit: b4a7dda39b4df9dcedd0c02463b20ef8fd8ddc81
Parents: 3c5f79d
Author: tdraier <dr...@apache.org>
Authored: Mon Oct 1 16:22:17 2018 +0200
Committer: tdraier <dr...@apache.org>
Committed: Mon Oct 1 16:22:17 2018 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/unomi/api/Patch.java   | 10 +++
 .../apache/unomi/api/services/PatchService.java |  6 +-
 .../apache/unomi/rest/PatchServiceEndPoint.java |  8 +-
 .../services/DefinitionsServiceImpl.java        | 58 ++++++--------
 .../services/services/GoalsServiceImpl.java     | 64 +++++++---------
 .../services/services/PatchServiceImpl.java     | 80 +++++++++++++++-----
 .../services/services/ProfileServiceImpl.java   | 69 +++++++----------
 .../services/services/RulesServiceImpl.java     | 29 +++----
 .../services/services/SegmentServiceImpl.java   | 66 +++++++---------
 .../resources/OSGI-INF/blueprint/blueprint.xml  |  3 +-
 .../shell/commands/DeployDefinitionCommand.java | 37 +++------
 11 files changed, 206 insertions(+), 224 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/api/src/main/java/org/apache/unomi/api/Patch.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/Patch.java b/api/src/main/java/org/apache/unomi/api/Patch.java
index 9380ef8..77d25b8 100644
--- a/api/src/main/java/org/apache/unomi/api/Patch.java
+++ b/api/src/main/java/org/apache/unomi/api/Patch.java
@@ -50,6 +50,8 @@ public class Patch extends Item {
 
     private String patchedItemId;
 
+    private String patchedItemType;
+
     private String operation;
 
     private Object data;
@@ -64,6 +66,14 @@ public class Patch extends Item {
         this.patchedItemId = patchedItemId;
     }
 
+    public String getPatchedItemType() {
+        return patchedItemType;
+    }
+
+    public void setPatchedItemType(String patchedItemType) {
+        this.patchedItemType = patchedItemType;
+    }
+
     public String getOperation() {
         return operation;
     }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/api/src/main/java/org/apache/unomi/api/services/PatchService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/PatchService.java b/api/src/main/java/org/apache/unomi/api/services/PatchService.java
index 47f53ca..a9261e8 100644
--- a/api/src/main/java/org/apache/unomi/api/services/PatchService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/PatchService.java
@@ -25,10 +25,6 @@ import java.util.Enumeration;
 public interface PatchService {
     Patch load(String id);
 
-    void patch(Enumeration<URL> urls, Class<? extends Item> type);
-
-    void patch(URL patchUrl, Class<? extends Item> type);
-
-    <T extends Item> T patch(Patch patch, Class<T> type) ;
+    Item patch(Patch patch) ;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/rest/src/main/java/org/apache/unomi/rest/PatchServiceEndPoint.java
----------------------------------------------------------------------
diff --git a/rest/src/main/java/org/apache/unomi/rest/PatchServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/PatchServiceEndPoint.java
index 20f7cd8..b7d7a9c 100644
--- a/rest/src/main/java/org/apache/unomi/rest/PatchServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/PatchServiceEndPoint.java
@@ -45,15 +45,13 @@ public class PatchServiceEndPoint {
 
     /**
      * Apply a patch on an item
-     *
-     * @param type the type of item to patch
      */
     @POST
-    @Path("/apply/{type}")
-    public void setPatch(Patch patch, @PathParam("type") String type, @QueryParam("force") Boolean force) {
+    @Path("/apply")
+    public void setPatch(Patch patch, @QueryParam("force") Boolean force) {
         Patch previous = (force == null || !force) ? patchService.load(patch.getItemId()) : null;
         if (previous == null) {
-            patchService.patch(patch, Patch.PATCHABLE_TYPES.get(type));
+            patchService.patch(patch);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/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 0daaf5b..a6c2e15 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
@@ -133,26 +133,21 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu
             return;
         }
 
-        // First apply patches on existing items
-        patchService.patch(bundleContext.getBundle().findEntries("META-INF/cxs/conditions", "*-patch.json", true), ConditionType.class);
-
         while (predefinedConditionEntries.hasMoreElements()) {
             URL predefinedConditionURL = predefinedConditionEntries.nextElement();
-            if (!predefinedConditionURL.getFile().endsWith("-patch.json")) {
-                logger.debug("Found predefined condition at " + predefinedConditionURL + ", loading... ");
-
-                try {
-                    ConditionType conditionType = CustomObjectMapper.getObjectMapper().readValue(predefinedConditionURL, ConditionType.class);
-                    // Register only if condition type does not exist yet
-                    if (getConditionType(conditionType.getMetadata().getId()) == null) {
-                        setConditionType(conditionType);
-                        logger.info("Predefined condition type with id {} registered", conditionType.getMetadata().getId());
-                    } else {
-                        logger.info("The predefined condition type with id {} is already registered, this condition type will be skipped", conditionType.getMetadata().getId());
-                    }
-                } catch (IOException e) {
-                    logger.error("Error while loading condition definition " + predefinedConditionURL, e);
+            logger.debug("Found predefined condition at " + predefinedConditionURL + ", loading... ");
+
+            try {
+                ConditionType conditionType = CustomObjectMapper.getObjectMapper().readValue(predefinedConditionURL, ConditionType.class);
+                // Register only if condition type does not exist yet
+                if (getConditionType(conditionType.getMetadata().getId()) == null) {
+                    setConditionType(conditionType);
+                    logger.info("Predefined condition type with id {} registered", conditionType.getMetadata().getId());
+                } else {
+                    logger.info("The predefined condition type with id {} is already registered, this condition type will be skipped", conditionType.getMetadata().getId());
                 }
+            } catch (IOException e) {
+                logger.error("Error while loading condition definition " + predefinedConditionURL, e);
             }
         }
     }
@@ -163,27 +158,22 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu
             return;
         }
 
-        // First apply patches on existing items
-        patchService.patch(bundleContext.getBundle().findEntries("META-INF/cxs/actions", "*-patch.json", true), ActionType.class);
-
         ArrayList<PluginType> pluginTypeArrayList = (ArrayList<PluginType>) pluginTypes.get(bundleContext.getBundle().getBundleId());
         while (predefinedActionsEntries.hasMoreElements()) {
             URL predefinedActionURL = predefinedActionsEntries.nextElement();
-            if (!predefinedActionURL.getFile().endsWith("-patch.json")) {
-                logger.debug("Found predefined action at " + predefinedActionURL + ", loading... ");
-
-                try {
-                    ActionType actionType = CustomObjectMapper.getObjectMapper().readValue(predefinedActionURL, ActionType.class);
-                    // Register only if action type does not exist yet
-                    if (getActionType(actionType.getMetadata().getId()) == null) {
-                        setActionType(actionType);
-                        logger.info("Predefined action type with id {} registered", actionType.getMetadata().getId());
-                    } else {
-                        logger.info("The predefined action type with id {} is already registered, this action type will be skipped", actionType.getMetadata().getId());
-                    }
-                } catch (Exception e) {
-                    logger.error("Error while loading action definition " + predefinedActionURL, e);
+            logger.debug("Found predefined action at " + predefinedActionURL + ", loading... ");
+
+            try {
+                ActionType actionType = CustomObjectMapper.getObjectMapper().readValue(predefinedActionURL, ActionType.class);
+                // Register only if action type does not exist yet
+                if (getActionType(actionType.getMetadata().getId()) == null) {
+                    setActionType(actionType);
+                    logger.info("Predefined action type with id {} registered", actionType.getMetadata().getId());
+                } else {
+                    logger.info("The predefined action type with id {} is already registered, this action type will be skipped", actionType.getMetadata().getId());
                 }
+            } catch (Exception e) {
+                logger.error("Error while loading action definition " + predefinedActionURL, e);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java
index 0de6c64..f7d8ba7 100644
--- a/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java
@@ -117,29 +117,24 @@ public class GoalsServiceImpl implements GoalsService, SynchronousBundleListener
             return;
         }
 
-        // First apply patches on existing items
-        patchService.patch(bundleContext.getBundle().findEntries("META-INF/cxs/goals", "*-patch.json", true), Goal.class);
-
         while (predefinedRuleEntries.hasMoreElements()) {
             URL predefinedGoalURL = predefinedRuleEntries.nextElement();
-            if (!predefinedGoalURL.getFile().endsWith("-patch.json")) {
-                logger.debug("Found predefined goals at " + predefinedGoalURL + ", loading... ");
-
-                try {
-                    Goal goal = CustomObjectMapper.getObjectMapper().readValue(predefinedGoalURL, Goal.class);
-                    if (goal.getMetadata().getScope() == null) {
-                        goal.getMetadata().setScope("systemscope");
-                    }
-                    // Register only if goal does not exist yet
-                    if (getGoal(goal.getMetadata().getId()) == null) {
-                        setGoal(goal);
-                        logger.info("Predefined goal with id {} registered", goal.getMetadata().getId());
-                    } else {
-                        logger.info("The predefined goal with id {} is already registered, this goal will be skipped", goal.getMetadata().getId());
-                    }
-                } catch (IOException e) {
-                    logger.error("Error while loading segment definition " + predefinedGoalURL, e);
+            logger.debug("Found predefined goals at " + predefinedGoalURL + ", loading... ");
+
+            try {
+                Goal goal = CustomObjectMapper.getObjectMapper().readValue(predefinedGoalURL, Goal.class);
+                if (goal.getMetadata().getScope() == null) {
+                    goal.getMetadata().setScope("systemscope");
                 }
+                // Register only if goal does not exist yet
+                if (getGoal(goal.getMetadata().getId()) == null) {
+                    setGoal(goal);
+                    logger.info("Predefined goal with id {} registered", goal.getMetadata().getId());
+                } else {
+                    logger.info("The predefined goal with id {} is already registered, this goal will be skipped", goal.getMetadata().getId());
+                }
+            } catch (IOException e) {
+                logger.error("Error while loading segment definition " + predefinedGoalURL, e);
             }
         }
     }
@@ -271,26 +266,21 @@ public class GoalsServiceImpl implements GoalsService, SynchronousBundleListener
             return;
         }
 
-        // First apply patches on existing items
-        patchService.patch(bundleContext.getBundle().findEntries("META-INF/cxs/campaigns", "*-patch.json", true), Campaign.class);
-
         while (predefinedRuleEntries.hasMoreElements()) {
             URL predefinedCampaignURL = predefinedRuleEntries.nextElement();
-            if (!predefinedCampaignURL.getFile().endsWith("-patch.json")) {
-                logger.debug("Found predefined campaigns at " + predefinedCampaignURL + ", loading... ");
-
-                try {
-                    Campaign campaign = CustomObjectMapper.getObjectMapper().readValue(predefinedCampaignURL, Campaign.class);
-                    // Register only if campaign does not exist yet
-                    if (getCampaign(campaign.getMetadata().getId()) == null) {
-                        setCampaign(campaign);
-                        logger.info("Predefined campaign with id {} registered", campaign.getMetadata().getId());
-                    } else {
-                        logger.info("The predefined campaign with id {} is already registered, this campaign will be skipped", campaign.getMetadata().getId());
-                    }
-                } catch (IOException e) {
-                    logger.error("Error while loading segment definition " + predefinedCampaignURL, e);
+            logger.debug("Found predefined campaigns at " + predefinedCampaignURL + ", loading... ");
+
+            try {
+                Campaign campaign = CustomObjectMapper.getObjectMapper().readValue(predefinedCampaignURL, Campaign.class);
+                // Register only if campaign does not exist yet
+                if (getCampaign(campaign.getMetadata().getId()) == null) {
+                    setCampaign(campaign);
+                    logger.info("Predefined campaign with id {} registered", campaign.getMetadata().getId());
+                } else {
+                    logger.info("The predefined campaign with id {} is already registered, this campaign will be skipped", campaign.getMetadata().getId());
                 }
+            } catch (IOException e) {
+                logger.error("Error while loading segment definition " + predefinedCampaignURL, e);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/services/src/main/java/org/apache/unomi/services/services/PatchServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/PatchServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/PatchServiceImpl.java
index c6a8b77..0ee58e0 100644
--- a/services/src/main/java/org/apache/unomi/services/services/PatchServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/PatchServiceImpl.java
@@ -19,13 +19,14 @@ package org.apache.unomi.services.services;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.github.fge.jsonpatch.JsonPatch;
 import com.github.fge.jsonpatch.JsonPatchException;
-import org.apache.unomi.api.Item;
-import org.apache.unomi.api.Patch;
-import org.apache.unomi.api.PropertyType;
+import org.apache.unomi.api.*;
 import org.apache.unomi.api.services.PatchService;
 import org.apache.unomi.persistence.spi.CustomObjectMapper;
 import org.apache.unomi.persistence.spi.PersistenceService;
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.SynchronousBundleListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,9 +35,9 @@ import java.net.URL;
 import java.util.Date;
 import java.util.Enumeration;
 
-public class PatchServiceImpl implements PatchService {
+public class PatchServiceImpl implements PatchService, SynchronousBundleListener {
 
-    private static final Logger logger = LoggerFactory.getLogger(ProfileServiceImpl.class.getName());
+    private static final Logger logger = LoggerFactory.getLogger(PatchServiceImpl.class.getName());
 
     private BundleContext bundleContext;
 
@@ -50,36 +51,75 @@ public class PatchServiceImpl implements PatchService {
         this.persistenceService = persistenceService;
     }
 
+    public void postConstruct() {
+        logger.debug("postConstruct {" + bundleContext.getBundle() + "}");
+
+        processBundleStartup(bundleContext);
+        for (Bundle bundle : bundleContext.getBundles()) {
+            if (bundle.getBundleContext() != null && bundle.getBundleId() != bundleContext.getBundle().getBundleId()) {
+                processBundleStartup(bundle.getBundleContext());
+            }
+        }
+        bundleContext.addBundleListener(this);
+        logger.info("Patch service initialized.");
+    }
+
+    public void preDestroy() {
+        bundleContext.removeBundleListener(this);
+        logger.info("Patch service shutdown.");
+    }
+
     @Override
-    public Patch load(String id) {
-        return persistenceService.load(id, Patch.class);
+    public void bundleChanged(BundleEvent event) {
+        switch (event.getType()) {
+            case BundleEvent.STARTED:
+                processBundleStartup(event.getBundle().getBundleContext());
+                break;
+        }
+    }
+
+    private void processBundleStartup(BundleContext bundleContext) {
+        if (bundleContext == null) {
+            return;
+        }
+        loadPredefinedPatches(bundleContext);
     }
 
-    public void patch(Enumeration<URL> urls, Class<? extends Item> type) {
+    private void loadPredefinedPatches(BundleContext bundleContext) {
+        if (bundleContext == null) {
+            return;
+        }
+
+        // First apply patches on existing items
+        Enumeration<URL> urls = bundleContext.getBundle().findEntries("META-INF/cxs/patches", "*.json", true);
         if (urls != null) {
             while (urls.hasMoreElements()) {
-                patch(urls.nextElement(), type);
+                URL patchUrl = urls.nextElement();
+                try {
+                    Patch patch = CustomObjectMapper.getObjectMapper().readValue(patchUrl, Patch.class);
+                    if (persistenceService.load(patch.getItemId(), Patch.class) == null) {
+                        patch(patch);
+                    }
+                } catch (IOException e) {
+                    logger.error("Error while loading patch " + patchUrl, e);
+                }
             }
         }
     }
 
-    public  void patch(URL patchUrl, Class<? extends Item> type) {
-        try {
-            Patch patch = CustomObjectMapper.getObjectMapper().readValue(patchUrl, Patch.class);
-            if (persistenceService.load(patch.getItemId(), Patch.class) == null) {
-                patch(patch, type);
-            }
-        } catch (IOException e) {
-            logger.error("Error while loading patch " + patchUrl, e);
-        }
+    @Override
+    public Patch load(String id) {
+        return persistenceService.load(id, Patch.class);
     }
 
-    public <T extends Item> T patch(Patch patch, Class<T> type) {
+    public Item patch(Patch patch) {
+        Class<? extends Item> type = Patch.PATCHABLE_TYPES.get(patch.getPatchedItemType());
+
         if (type == null) {
             throw new IllegalArgumentException("Must specify valid type");
         }
 
-        T item = persistenceService.load(patch.getPatchedItemId(), type);
+        Item item = persistenceService.load(patch.getPatchedItemId(), type);
 
         if (item != null && patch.getOperation() != null) {
             logger.info("Applying patch " + patch.getItemId());

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
index 57ebf94..1a5bff9 100644
--- a/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
@@ -923,34 +923,29 @@ public class ProfileServiceImpl implements ProfileService, SynchronousBundleList
             return;
         }
 
-        // First apply patches on existing items
-        patchService.patch(bundleContext.getBundle().findEntries("META-INF/cxs/personas", "*-patch.json", true), Persona.class);
-
         while (predefinedPersonaEntries.hasMoreElements()) {
             URL predefinedPersonaURL = predefinedPersonaEntries.nextElement();
-            if (!predefinedPersonaURL.getFile().endsWith("-patch.json")) {
-                logger.debug("Found predefined persona at " + predefinedPersonaURL + ", loading... ");
+            logger.debug("Found predefined persona at " + predefinedPersonaURL + ", loading... ");
 
-                try {
-                    PersonaWithSessions persona = getObjectMapper().readValue(predefinedPersonaURL, PersonaWithSessions.class);
+            try {
+                PersonaWithSessions persona = getObjectMapper().readValue(predefinedPersonaURL, PersonaWithSessions.class);
 
-                    String itemId = persona.getPersona().getItemId();
-                    // Register only if persona does not exist yet
-                    if (persistenceService.load(itemId, Persona.class) == null) {
-                        persistenceService.save(persona.getPersona());
+                String itemId = persona.getPersona().getItemId();
+                // Register only if persona does not exist yet
+                if (persistenceService.load(itemId, Persona.class) == null) {
+                    persistenceService.save(persona.getPersona());
 
-                        List<PersonaSession> sessions = persona.getSessions();
-                        for (PersonaSession session : sessions) {
-                            session.setProfile(persona.getPersona());
-                            persistenceService.save(session);
-                        }
-                        logger.info("Predefined persona with id {} registered", itemId);
-                    } else {
-                        logger.info("The predefined persona with id {} is already registered, this persona will be skipped", itemId);
+                    List<PersonaSession> sessions = persona.getSessions();
+                    for (PersonaSession session : sessions) {
+                        session.setProfile(persona.getPersona());
+                        persistenceService.save(session);
                     }
-                } catch (IOException e) {
-                    logger.error("Error while loading persona " + predefinedPersonaURL, e);
+                    logger.info("Predefined persona with id {} registered", itemId);
+                } else {
+                    logger.info("The predefined persona with id {} is already registered, this persona will be skipped", itemId);
                 }
+            } catch (IOException e) {
+                logger.error("Error while loading persona " + predefinedPersonaURL, e);
             }
         }
     }
@@ -961,32 +956,26 @@ public class ProfileServiceImpl implements ProfileService, SynchronousBundleList
             return;
         }
 
-        // First apply patches on existing items
-
-        patchService.patch(bundleContext.getBundle().findEntries("META-INF/cxs/properties", "*-patch.json", true), PropertyType.class);
-
         List<PropertyType> bundlePropertyTypes = new ArrayList<>();
         while (predefinedPropertyTypeEntries.hasMoreElements()) {
             URL predefinedPropertyTypeURL = predefinedPropertyTypeEntries.nextElement();
-            if (!predefinedPropertyTypeURL.getFile().endsWith("-patch.json")) {
-                logger.debug("Found predefined property type at " + predefinedPropertyTypeURL + ", loading... ");
+            logger.debug("Found predefined property type at " + predefinedPropertyTypeURL + ", loading... ");
 
-                try {
-                    PropertyType propertyType = CustomObjectMapper.getObjectMapper().readValue(predefinedPropertyTypeURL, PropertyType.class);
-                    // Register only if property type does not exist yet
-                    if (getPropertyType(propertyType.getMetadata().getId()) == null) {
+            try {
+                PropertyType propertyType = CustomObjectMapper.getObjectMapper().readValue(predefinedPropertyTypeURL, PropertyType.class);
+                // Register only if property type does not exist yet
+                if (getPropertyType(propertyType.getMetadata().getId()) == null) {
 
-                        setPropertyTypeTarget(predefinedPropertyTypeURL, propertyType);
+                    setPropertyTypeTarget(predefinedPropertyTypeURL, propertyType);
 
-                        persistenceService.save(propertyType);
-                        bundlePropertyTypes.add(propertyType);
-                        logger.info("Predefined property type with id {} registered", propertyType.getMetadata().getId());
-                    } else {
-                        logger.info("The predefined property type with id {} is already registered, this property type will be skipped", propertyType.getMetadata().getId());
-                    }
-                } catch (IOException e) {
-                    logger.error("Error while loading properties " + predefinedPropertyTypeURL, e);
+                    persistenceService.save(propertyType);
+                    bundlePropertyTypes.add(propertyType);
+                    logger.info("Predefined property type with id {} registered", propertyType.getMetadata().getId());
+                } else {
+                    logger.info("The predefined property type with id {} is already registered, this property type will be skipped", propertyType.getMetadata().getId());
                 }
+            } catch (IOException e) {
+                logger.error("Error while loading properties " + predefinedPropertyTypeURL, e);
             }
         }
         propertyTypes = propertyTypes.with(bundlePropertyTypes);

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/services/src/main/java/org/apache/unomi/services/services/RulesServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/RulesServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/RulesServiceImpl.java
index 3f63a31..69a37ff 100644
--- a/services/src/main/java/org/apache/unomi/services/services/RulesServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/RulesServiceImpl.java
@@ -146,26 +146,21 @@ public class RulesServiceImpl implements RulesService, EventListenerService, Syn
             return;
         }
 
-        // First apply patches on existing items
-        patchService.patch(bundleContext.getBundle().findEntries("META-INF/cxs/rules", "*-patch.json", true), Rule.class);
-
         while (predefinedRuleEntries.hasMoreElements()) {
             URL predefinedRuleURL = predefinedRuleEntries.nextElement();
-            if (!predefinedRuleURL.getFile().endsWith("-patch.json")) {
-                logger.debug("Found predefined rule at " + predefinedRuleURL + ", loading... ");
-
-                try {
-                    Rule rule = CustomObjectMapper.getObjectMapper().readValue(predefinedRuleURL, Rule.class);
-                    // Register only if rule does not exist yet
-                    if (getRule(rule.getMetadata().getId()) == null) {
-                        setRule(rule);
-                        logger.info("Predefined rule with id {} registered", rule.getMetadata().getId());
-                    } else {
-                        logger.info("The predefined rule with id {} is already registered, this rule will be skipped", rule.getMetadata().getId());
-                    }
-                } catch (IOException e) {
-                    logger.error("Error while loading rule definition " + predefinedRuleURL, e);
+            logger.debug("Found predefined rule at " + predefinedRuleURL + ", loading... ");
+
+            try {
+                Rule rule = CustomObjectMapper.getObjectMapper().readValue(predefinedRuleURL, Rule.class);
+                // Register only if rule does not exist yet
+                if (getRule(rule.getMetadata().getId()) == null) {
+                    setRule(rule);
+                    logger.info("Predefined rule with id {} registered", rule.getMetadata().getId());
+                } else {
+                    logger.info("The predefined rule with id {} is already registered, this rule will be skipped", rule.getMetadata().getId());
                 }
+            } catch (IOException e) {
+                logger.error("Error while loading rule definition " + predefinedRuleURL, e);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/services/src/main/java/org/apache/unomi/services/services/SegmentServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/SegmentServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/SegmentServiceImpl.java
index 5b92a48..0fe5f2e 100644
--- a/services/src/main/java/org/apache/unomi/services/services/SegmentServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/SegmentServiceImpl.java
@@ -131,29 +131,24 @@ public class SegmentServiceImpl extends AbstractServiceImpl implements SegmentSe
             return;
         }
 
-        // First apply patches on existing items
-        patchService.patch(bundleContext.getBundle().findEntries("META-INF/cxs/segments", "*-patch.json", true), Segment.class);
-
         while (predefinedSegmentEntries.hasMoreElements()) {
             URL predefinedSegmentURL = predefinedSegmentEntries.nextElement();
-            if (!predefinedSegmentURL.getFile().endsWith("-patch.json")) {
-                logger.debug("Found predefined segment at " + predefinedSegmentURL + ", loading... ");
+            logger.debug("Found predefined segment at " + predefinedSegmentURL + ", loading... ");
 
-                try {
-                    Segment segment = CustomObjectMapper.getObjectMapper().readValue(predefinedSegmentURL, Segment.class);
-                    if (segment.getMetadata().getScope() == null) {
-                        segment.getMetadata().setScope("systemscope");
-                    }
-                    // Register only if segment does not exist yet
-                    if (getSegmentDefinition(segment.getMetadata().getId()) == null) {
-                        setSegmentDefinition(segment);
-                        logger.info("Predefined segment with id {} registered", segment.getMetadata().getId());
-                    } else {
-                        logger.info("The predefined segment with id {} is already registered, this segment will be skipped", segment.getMetadata().getId());
-                    }
-                } catch (IOException e) {
-                    logger.error("Error while loading segment definition " + predefinedSegmentURL, e);
+            try {
+                Segment segment = CustomObjectMapper.getObjectMapper().readValue(predefinedSegmentURL, Segment.class);
+                if (segment.getMetadata().getScope() == null) {
+                    segment.getMetadata().setScope("systemscope");
+                }
+                // Register only if segment does not exist yet
+                if (getSegmentDefinition(segment.getMetadata().getId()) == null) {
+                    setSegmentDefinition(segment);
+                    logger.info("Predefined segment with id {} registered", segment.getMetadata().getId());
+                } else {
+                    logger.info("The predefined segment with id {} is already registered, this segment will be skipped", segment.getMetadata().getId());
                 }
+            } catch (IOException e) {
+                logger.error("Error while loading segment definition " + predefinedSegmentURL, e);
             }
         }
     }
@@ -164,29 +159,24 @@ public class SegmentServiceImpl extends AbstractServiceImpl implements SegmentSe
             return;
         }
 
-        // First apply patches on existing items
-        patchService.patch(bundleContext.getBundle().findEntries("META-INF/cxs/scoring", "*-patch.json", true), Scoring.class);
-
         while (predefinedScoringEntries.hasMoreElements()) {
             URL predefinedScoringURL = predefinedScoringEntries.nextElement();
-            if (!predefinedScoringURL.getFile().endsWith("-patch.json")) {
-                logger.debug("Found predefined scoring at " + predefinedScoringURL + ", loading... ");
+            logger.debug("Found predefined scoring at " + predefinedScoringURL + ", loading... ");
 
-                try {
-                    Scoring scoring = CustomObjectMapper.getObjectMapper().readValue(predefinedScoringURL, Scoring.class);
-                    if (scoring.getMetadata().getScope() == null) {
-                        scoring.getMetadata().setScope("systemscope");
-                    }
-                    // Register only if scoring plan does not exist yet
-                    if (getScoringDefinition(scoring.getMetadata().getId()) == null) {
-                        setScoringDefinition(scoring);
-                        logger.info("Predefined scoring with id {} registered", scoring.getMetadata().getId());
-                    } else {
-                        logger.info("The predefined scoring with id {} is already registered, this scoring will be skipped", scoring.getMetadata().getId());
-                    }
-                } catch (IOException e) {
-                    logger.error("Error while loading segment definition " + predefinedScoringURL, e);
+            try {
+                Scoring scoring = CustomObjectMapper.getObjectMapper().readValue(predefinedScoringURL, Scoring.class);
+                if (scoring.getMetadata().getScope() == null) {
+                    scoring.getMetadata().setScope("systemscope");
+                }
+                // Register only if scoring plan does not exist yet
+                if (getScoringDefinition(scoring.getMetadata().getId()) == null) {
+                    setScoringDefinition(scoring);
+                    logger.info("Predefined scoring with id {} registered", scoring.getMetadata().getId());
+                } else {
+                    logger.info("The predefined scoring with id {} is already registered, this scoring will be skipped", scoring.getMetadata().getId());
                 }
+            } catch (IOException e) {
+                logger.error("Error while loading segment definition " + predefinedScoringURL, e);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
----------------------------------------------------------------------
diff --git a/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index 438c7d0..eed06f2 100644
--- a/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -214,7 +214,8 @@
     </bean>
     <service id="personalizationService" ref="personalizationServiceImpl" interface="org.apache.unomi.api.services.PersonalizationService" />
 
-    <bean id="patchServiceImpl" class="org.apache.unomi.services.services.PatchServiceImpl">
+    <bean id="patchServiceImpl" class="org.apache.unomi.services.services.PatchServiceImpl"
+          init-method="postConstruct" destroy-method="preDestroy">
         <property name="persistenceService" ref="persistenceService"/>
         <property name="bundleContext" ref="blueprintBundleContext"/>
     </bean>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b4a7dda3/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/DeployDefinitionCommand.java
----------------------------------------------------------------------
diff --git a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/DeployDefinitionCommand.java b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/DeployDefinitionCommand.java
index 587ec7f..e89d37d 100644
--- a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/DeployDefinitionCommand.java
+++ b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/DeployDefinitionCommand.java
@@ -24,7 +24,6 @@ import org.apache.karaf.shell.console.OsgiCommandSupport;
 import org.apache.unomi.api.*;
 import org.apache.unomi.api.actions.ActionType;
 import org.apache.unomi.api.campaigns.Campaign;
-import org.apache.unomi.api.conditions.Condition;
 import org.apache.unomi.api.conditions.ConditionType;
 import org.apache.unomi.api.goals.Goal;
 import org.apache.unomi.api.rules.Rule;
@@ -51,7 +50,7 @@ public class DeployDefinitionCommand extends OsgiCommandSupport {
     private SegmentService segmentService;
     private PatchService patchService;
 
-    private final static List<String> definitionTypes = Arrays.asList("condition", "action", "goal", "campaign", "persona", "property", "rule", "segment", "scoring");
+    private final static List<String> definitionTypes = Arrays.asList("condition", "action", "goal", "campaign", "persona", "property", "rule", "segment", "scoring", "patch");
 
 
     @Argument(index = 0, name = "bundleId", description = "The bundle identifier where to find the definition", multiValued = false)
@@ -120,9 +119,7 @@ public class DeployDefinitionCommand extends OsgiCommandSupport {
         }
         if (fileName.startsWith("*")) {
             for (URL url : values) {
-                if (!url.getFile().endsWith("-patch.json")) {
-                    updateDefinition(definitionType, url);
-                }
+                updateDefinition(definitionType, url);
             }
         } else {
             if (!fileName.contains("/")) {
@@ -135,11 +132,7 @@ public class DeployDefinitionCommand extends OsgiCommandSupport {
             Optional<URL> optionalURL = values.stream().filter(u -> u.getFile().endsWith(fileName)).findFirst();
             if (optionalURL.isPresent()) {
                 URL url = optionalURL.get();
-                if (!url.getFile().endsWith("-patch.json")) {
-                    updateDefinition(definitionType, url);
-                } else {
-                    deployPatch(definitionType, url);
-                }
+                updateDefinition(definitionType, url);
             } else {
                 System.out.println("Couldn't find file " + fileName);
                 return null;
@@ -211,6 +204,10 @@ public class DeployDefinitionCommand extends OsgiCommandSupport {
                     Scoring scoring = CustomObjectMapper.getObjectMapper().readValue(definitionURL, Scoring.class);
                     segmentService.setScoringDefinition(scoring);
                     break;
+                case "patch":
+                    Patch patch = CustomObjectMapper.getObjectMapper().readValue(definitionURL, Patch.class);
+                    patchService.patch(patch);
+                    break;
             }
             System.out.println("Predefined definition registered : "+definitionURL.getFile());
         } catch (IOException e) {
@@ -219,23 +216,6 @@ public class DeployDefinitionCommand extends OsgiCommandSupport {
         }
     }
 
-    private void deployPatch(String definitionType, URL patchURL) {
-        try {
-            Patch patch = CustomObjectMapper.getObjectMapper().readValue(patchURL, Patch.class);
-            Class<? extends Item> type = Patch.PATCHABLE_TYPES.get(definitionType);
-            if (type != null) {
-                patchService.patch(patch, type);
-            }
-
-            System.out.println("Definition patched : "+ patch.getItemId() + " by : " + patchURL.getFile());
-        } catch (IOException e) {
-            System.out.println("Error while saving definition " + patchURL);
-            System.out.println(e.getMessage());
-        }
-    }
-
-
-
     private String getDefinitionTypePath(String definitionType) {
         StringBuilder path = new StringBuilder("META-INF/cxs/");
         switch (definitionType) {
@@ -266,6 +246,9 @@ public class DeployDefinitionCommand extends OsgiCommandSupport {
             case "scoring":
                 path.append("scoring");
                 break;
+            case "patch":
+                path.append("patches");
+                break;
         }
 
         return path.toString();



[2/3] incubator-unomi git commit: add my gpg key

Posted by dr...@apache.org.
add my gpg key


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

Branch: refs/heads/patch
Commit: efeacd7ee9accfb10f49d89ba08daddea4126be7
Parents: b72678c
Author: dgaillard <dg...@jahia.com>
Authored: Wed Sep 26 13:53:23 2018 +0200
Committer: tdraier <dr...@apache.org>
Committed: Mon Oct 1 15:10:05 2018 +0200

----------------------------------------------------------------------
 KEYS    | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 pom.xml | 10 +++++++++-
 2 files changed, 68 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/efeacd7e/KEYS
----------------------------------------------------------------------
diff --git a/KEYS b/KEYS
index 3e47742..f186380 100644
--- a/KEYS
+++ b/KEYS
@@ -102,3 +102,62 @@ De85yo9XvadBg9OHT5TXk3JBunAsZicNte0+deOALvq4yvYkLVkwSCOkY0nP5cJO
 pc9yvM78hnDVnOUkITH5gpEV
 =fKcW
 -----END PGP PUBLIC KEY BLOCK-----
+pub   rsa4096 2018-09-26 [SC]
+      312043309743E6AB2D0D788AAA52D8117C01FC5A
+uid           [ultimate] Damien GAILLARD (CODE SIGNING KEY) <dg...@apache.org>
+sig 3        AA52D8117C01FC5A 2018-09-26  Damien GAILLARD (CODE SIGNING KEY) <dg...@apache.org>
+sub   rsa4096 2018-09-26 [E]
+sig          AA52D8117C01FC5A 2018-09-26  Damien GAILLARD (CODE SIGNING KEY) <dg...@apache.org>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+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
+bgf9S0HTLeNWcGmMRW+TBMVTOoi2
+=xlgh
+-----END PGP PUBLIC KEY BLOCK-----

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/efeacd7e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a355855..f4deaf6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -242,7 +242,15 @@
             <timezone>+1</timezone>
             <roles>
                 <role>committer</role>
-                <role>PPMC</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>dgaillard</id>
+            <name>Damien GAILLARD</name>
+            <email>dgaillard@apache.org</email>
+            <timezone>+1</timezone>
+            <roles>
+                <role>committer</role>
             </roles>
         </developer>
     </developers>