Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Rename Analytics Artifacts - MEED-6999 - Meeds-io/meeds#2097 #390

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<properties>
<org.exoplatform.social.version>7.0.x-SNAPSHOT</org.exoplatform.social.version>
<addon.exo.gamification.version>7.0.x-SNAPSHOT</addon.exo.gamification.version>
<addon.exo.analytics.version>7.0.x-SNAPSHOT</addon.exo.analytics.version>
<addon.meeds.analytics.version>7.0.x-SNAPSHOT</addon.meeds.analytics.version>

<!-- Sonar properties -->
<sonar.organization>meeds-io</sonar.organization>
Expand All @@ -68,9 +68,9 @@
</dependency>
<!-- Import versions from analytics project -->
<dependency>
<groupId>org.exoplatform.addons.analytics</groupId>
<groupId>io.meeds.analytics</groupId>
<artifactId>analytics-parent</artifactId>
<version>${addon.exo.analytics.version}</version>
<version>${addon.meeds.analytics.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@

<!--Analytics API -->
<dependency>
<groupId>org.exoplatform.addons.analytics</groupId>
<groupId>io.meeds.analytics</groupId>
<artifactId>analytics-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.exoplatform.addons.analytics</groupId>
<groupId>io.meeds.analytics</groupId>
<artifactId>analytics-listeners</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,36 @@
*/
package org.exoplatform.tasks.listener.analytics;

import org.exoplatform.analytics.model.StatisticData;
import java.util.List;

import org.exoplatform.container.xml.InitParams;
import org.exoplatform.services.listener.Asynchronous;
import org.exoplatform.social.attachment.AttachmentService;
import org.exoplatform.social.attachment.model.ObjectAttachmentId;
import org.exoplatform.social.core.space.spi.SpaceService;
import org.exoplatform.analytics.listener.social.BaseAttachmentAnalyticsListener;

import io.meeds.analytics.listener.social.BaseAttachmentAnalyticsListener;

import lombok.Getter;

@Asynchronous
public class TaskAttachmentAnalyticsListener extends BaseAttachmentAnalyticsListener {
public TaskAttachmentAnalyticsListener(AttachmentService attachmentService, SpaceService spaceService, InitParams initParam) {
super(attachmentService, spaceService, initParam);

@Getter
private AttachmentService attachmentService;

@Getter
private SpaceService spaceService;

@Getter
private List<String> supportedObjectType;

public TaskAttachmentAnalyticsListener(AttachmentService attachmentService,
SpaceService spaceService,
InitParams initParam) {
this.attachmentService = attachmentService;
this.spaceService = spaceService;
this.supportedObjectType = initParam.getValuesParam("supported-type").getValues();
}

@Override
Expand All @@ -40,9 +58,9 @@ protected String getModule(ObjectAttachmentId objectAttachment) {
@Override
protected String getSubModule(ObjectAttachmentId objectAttachment) {
return switch (objectAttachment.getObjectType()) {
case "task" -> "taskDescription";
case "taskComment" -> "taskComment";
default -> "task";
case "task" -> "taskDescription";
case "taskComment" -> "taskComment";
default -> "task";
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
*/
package org.exoplatform.tasks.listener.analytics;

import static org.exoplatform.analytics.utils.AnalyticsUtils.addSpaceStatistics;
import static io.meeds.analytics.utils.AnalyticsUtils.addSpaceStatistics;

import java.util.*;
import java.util.concurrent.CompletableFuture;

import org.apache.commons.lang3.StringUtils;

import org.exoplatform.analytics.model.StatisticData;
import org.exoplatform.analytics.utils.AnalyticsUtils;
import io.meeds.analytics.model.StatisticData;
import io.meeds.analytics.utils.AnalyticsUtils;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.component.RequestLifeCycle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/
package org.exoplatform.tasks.listener.analytics;

import org.exoplatform.analytics.model.StatisticData;
import org.exoplatform.analytics.utils.AnalyticsUtils;
import io.meeds.analytics.model.StatisticData;
import io.meeds.analytics.utils.AnalyticsUtils;
import org.exoplatform.commons.api.persistence.ExoTransactional;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.PortalContainer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
*/
package org.exoplatform.tasks.listener.analytics;

import static org.exoplatform.analytics.utils.AnalyticsUtils.addSpaceStatistics;
import static io.meeds.analytics.utils.AnalyticsUtils.addSpaceStatistics;

import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;

import org.apache.commons.lang3.StringUtils;

import org.exoplatform.analytics.model.StatisticData;
import org.exoplatform.analytics.utils.AnalyticsUtils;
import io.meeds.analytics.model.StatisticData;
import io.meeds.analytics.utils.AnalyticsUtils;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.component.RequestLifeCycle;
Expand Down
Loading