This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch opensearch-persistence
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/opensearch-persistence by this 
push:
     new 88d5aefb5 - Removed non OpenSearch specific changes - Added missing 
Javadoc comments - Minor whitespace cleanups
88d5aefb5 is described below

commit 88d5aefb5fdb3694ee3a7eb936cda4aa6446b9a5
Author: Serge Huber <[email protected]>
AuthorDate: Tue Oct 14 12:00:00 2025 +0200

    - Removed non OpenSearch specific changes
    - Added missing Javadoc comments
    - Minor whitespace cleanups
---
 .../SegmentProfileEventsConditionParser.java       | 11 ++--------
 .../org/apache/unomi/lifecycle/BundleWatcher.java  | 24 ++++++++++++++++++++++
 .../rest/service/impl/RestServiceUtilsImpl.java    | 10 +++------
 setenv.sh                                          |  2 +-
 4 files changed, 30 insertions(+), 17 deletions(-)

diff --git 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/condition/parsers/SegmentProfileEventsConditionParser.java
 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/condition/parsers/SegmentProfileEventsConditionParser.java
index 0f0aad0f2..2c59276f4 100644
--- 
a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/condition/parsers/SegmentProfileEventsConditionParser.java
+++ 
b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/condition/parsers/SegmentProfileEventsConditionParser.java
@@ -184,16 +184,9 @@ public class SegmentProfileEventsConditionParser {
                 tuple.put("fieldName", "cdp_timestamp_gte");
             }
 
-            Object propertyValueDate = 
condition.getParameter("propertyValueDate");
-            if (propertyValueDate == null) {
-                tuple.put("fieldValue", null);
-            } else if (propertyValueDate instanceof Map){
-                // This shouldn't be needed since Jackson was upgraded to > 
2.13, but we keep it for backwards compatibility with older data sets
-                final OffsetDateTime fieldValue = 
OffsetDateTime.parse((String) propertyValueDate); //With jackson JSR, 
OffsetDateTime are well serialized.
+            final OffsetDateTime fieldValue = OffsetDateTime.parse((String) 
condition.getParameter("propertyValueDate")); //With jackson JSR, 
OffsetDateTime are well serialized.
+
                 tuple.put("fieldValue", fieldValue != null ? 
fieldValue.toString() : null);
-            } else {
-                tuple.put("fieldValue", propertyValueDate.toString());
-            }
         } else {
             if ("source.itemId".equals(propertyName)) {
                 tuple.put("fieldName", "cdp_sourceID_equals");
diff --git 
a/lifecycle-watcher/src/main/java/org/apache/unomi/lifecycle/BundleWatcher.java 
b/lifecycle-watcher/src/main/java/org/apache/unomi/lifecycle/BundleWatcher.java
index de6fb6ba2..6e8ef96da 100644
--- 
a/lifecycle-watcher/src/main/java/org/apache/unomi/lifecycle/BundleWatcher.java
+++ 
b/lifecycle-watcher/src/main/java/org/apache/unomi/lifecycle/BundleWatcher.java
@@ -35,11 +35,35 @@ public interface BundleWatcher {
      */
     List<ServerInfo> getServerInfos();
 
+    /**
+     * Indicates whether Unomi startup has completed. Implementations 
typically track
+     * required bundles and initialization tasks to decide when the system is 
fully ready.
+     *
+     * @return {@code true} if startup is complete; {@code false} otherwise
+     */
     boolean isStartupComplete();
 
+    /**
+     * Indicates whether all additional (optional) bundles configured as 
required have
+     * started successfully.
+     *
+     * @return {@code true} if all additional required bundles have started; 
{@code false} otherwise
+     */
     boolean allAdditionalBundleStarted();
 
+    /**
+     * Registers a bundle symbolic name as required for startup completion. 
Implementations
+     * should monitor its lifecycle and include it in readiness checks.
+     *
+     * @param bundleName the bundle symbolic name to add as required
+     */
     public void addRequiredBundle(String bundleName);
 
+    /**
+     * Unregisters a previously required bundle symbolic name from startup 
checks.
+     *
+     * @param bundleName the bundle symbolic name to remove
+     * @return {@code true} if the bundle was previously registered and got 
removed; {@code false} otherwise
+     */
     public boolean removeRequiredBundle(String bundleName);
 }
diff --git 
a/rest/src/main/java/org/apache/unomi/rest/service/impl/RestServiceUtilsImpl.java
 
b/rest/src/main/java/org/apache/unomi/rest/service/impl/RestServiceUtilsImpl.java
index 0cb7b4704..33b30941b 100644
--- 
a/rest/src/main/java/org/apache/unomi/rest/service/impl/RestServiceUtilsImpl.java
+++ 
b/rest/src/main/java/org/apache/unomi/rest/service/impl/RestServiceUtilsImpl.java
@@ -165,14 +165,10 @@ public class RestServiceUtilsImpl implements 
RestServiceUtils {
                     } else if (!requireAnonymousBrowsing && 
!anonymousSessionProfile) {
                         // User does not want to browse anonymously, use the 
real profile. Check that session contains the current profile.
                         sessionProfile = eventsRequestContext.getProfile();
-                        if (sessionProfile != null) {
-                            if 
(!eventsRequestContext.getSession().getProfileId().equals(sessionProfile.getItemId()))
 {
-                                
eventsRequestContext.addChanges(EventService.SESSION_UPDATED);
-                            }
-                            
eventsRequestContext.getSession().setProfile(sessionProfile);
-                        } else {
-                            LOGGER.warn("Null profile in event request 
context");
+                        if 
(!eventsRequestContext.getSession().getProfileId().equals(sessionProfile.getItemId()))
 {
+                            
eventsRequestContext.addChanges(EventService.SESSION_UPDATED);
                         }
+                        
eventsRequestContext.getSession().setProfile(sessionProfile);
                     }
                 }
             }
diff --git a/setenv.sh b/setenv.sh
index 8018b9d98..dd042c07f 100755
--- a/setenv.sh
+++ b/setenv.sh
@@ -21,4 +21,4 @@ export UNOMI_VERSION=`mvn 
org.apache.maven.plugins:maven-help-plugin:2.1.1:evalu
 echo Detected project version=$UNOMI_VERSION
 export KARAF_VERSION=4.4.8
 # Uncomment the following line if you need Apache Unomi to start automatically 
at the first start
-# export KARAF_OPTS="-Dunomi.autoStart=true"
\ No newline at end of file
+# export KARAF_OPTS="-Dunomi.autoStart=true"

Reply via email to