diff --git a/tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettings.scala b/tmail-backend/jmap/extensions-api/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettings.scala similarity index 100% rename from tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettings.scala rename to tmail-backend/jmap/extensions-api/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettings.scala diff --git a/tmail-backend/jmap/extensions-api/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsRepository.scala b/tmail-backend/jmap/extensions-api/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsRepository.scala new file mode 100644 index 0000000000..581da104cb --- /dev/null +++ b/tmail-backend/jmap/extensions-api/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsRepository.scala @@ -0,0 +1,17 @@ +package com.linagora.tmail.james.jmap.settings + +import org.apache.james.core.Username +import org.apache.james.jmap.core.UuidState +import org.reactivestreams.Publisher + +trait JmapSettingsRepository { + def get(username: Username): Publisher[JmapSettings] + + def getLatestState(username: Username): Publisher[UuidState] + + def reset(username: Username, settings: JmapSettingsUpsertRequest): Publisher[SettingsStateUpdate] + + def updatePartial(username: Username, settingsPatch: JmapSettingsPatch): Publisher[SettingsStateUpdate] + + def delete(username: Username): Publisher[Void] +} diff --git a/tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsUserDeletionTaskStep.scala b/tmail-backend/jmap/extensions-api/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsUserDeletionTaskStep.scala similarity index 100% rename from tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsUserDeletionTaskStep.scala rename to tmail-backend/jmap/extensions-api/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsUserDeletionTaskStep.scala diff --git a/tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsUsernameChangeTaskStep.scala b/tmail-backend/jmap/extensions-api/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsUsernameChangeTaskStep.scala similarity index 100% rename from tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsUsernameChangeTaskStep.scala rename to tmail-backend/jmap/extensions-api/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsUsernameChangeTaskStep.scala diff --git a/tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsRepository.scala b/tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/MemoryJmapSettingsRepository.scala similarity index 89% rename from tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsRepository.scala rename to tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/MemoryJmapSettingsRepository.scala index 14d6170c9e..313bee5ae1 100644 --- a/tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/JmapSettingsRepository.scala +++ b/tmail-backend/jmap/extensions/src/main/scala/com/linagora/tmail/james/jmap/settings/MemoryJmapSettingsRepository.scala @@ -14,18 +14,6 @@ import reactor.core.scala.publisher.SMono import scala.collection.mutable -trait JmapSettingsRepository { - def get(username: Username): Publisher[JmapSettings] - - def getLatestState(username: Username): Publisher[UuidState] - - def reset(username: Username, settings: JmapSettingsUpsertRequest): Publisher[SettingsStateUpdate] - - def updatePartial(username: Username, settingsPatch: JmapSettingsPatch): Publisher[SettingsStateUpdate] - - def delete(username: Username): Publisher[Void] -} - case class MemoryJmapSettingsRepository @Inject()() extends JmapSettingsRepository { import scala.jdk.CollectionConverters._