Skip to content

Commit

Permalink
Move JMAP settings APIs to jmap-extensions-api
Browse files Browse the repository at this point in the history
  • Loading branch information
HoussemNasri committed Nov 30, 2024
1 parent 5b1d651 commit 881c63e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -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]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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._
Expand Down

0 comments on commit 881c63e

Please sign in to comment.