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

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 429f5b0348eb3fc26dbf8db6bce444f4d0cb570a
Author: RĂ©mi KOWALSKI <rkowal...@linagora.com>
AuthorDate: Wed Oct 9 15:05:05 2019 +0200

    JAMES-2813 add task type in additionalInformation dto
---
 .../migration/MigrationTaskAdditionalInformationsDTO.java | 11 +++++++++--
 ...ailboxPathV2MigrationTaskAdditionalInformationDTO.java | 12 +++++++++++-
 .../task/MailboxMergingTaskAdditionalInformationDTO.java  | 11 ++++++++++-
 ...aultGarbageCollectionTaskAdditionalInformationDTO.java | 14 ++++++++++++--
 .../MessageIdReindexingTaskAdditionalInformationDTO.java  | 13 ++++++++++---
 .../tools/indexer/ReprocessingContextInformationDTO.java  | 12 ++++++++++--
 ...ngleMailboxReindexingTaskAdditionalInformationDTO.java | 11 +++++++++--
 ...ngleMessageReindexingTaskAdditionalInformationDTO.java | 15 ++++++++++++---
 .../UserReindexingTaskAdditionalInformationDTO.java       | 11 +++++++++--
 ...pingsSourcesMigrationTaskAdditionalInformationDTO.java | 12 +++++++++++-
 ...edMessagesVaultDeleteTaskAdditionalInformationDTO.java | 13 +++++++++++--
 ...edMessagesVaultExportTaskAdditionalInformationDTO.java | 11 ++++++++++-
 ...dMessagesVaultRestoreTaskAdditionalInformationDTO.java | 11 ++++++++++-
 ...DeadLettersRedeliveryTaskAdditionalInformationDTO.java | 11 ++++++++++-
 .../ClearMailQueueTaskAdditionalInformationDTO.java       | 10 +++++++++-
 ...eteMailsFromMailQueueTaskAdditionalInformationDTO.java | 11 ++++++++++-
 .../ClearMailRepositoryTaskAdditionalInformationDTO.java  | 10 +++++++++-
 .../ReprocessingAllMailsTaskAdditionalInformationDTO.java |  9 +++++++++
 .../ReprocessingOneMailTaskAdditionalInformationDTO.java  | 11 ++++++++++-
 .../server/task/json/dto/AdditionalInformationDTO.java    |  1 +
 20 files changed, 192 insertions(+), 28 deletions(-)

diff --git 
a/backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/migration/MigrationTaskAdditionalInformationsDTO.java
 
b/backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/migration/MigrationTaskAdditionalInformationsDTO.java
index b8e8400..a8c74b2 100644
--- 
a/backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/migration/MigrationTaskAdditionalInformationsDTO.java
+++ 
b/backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/migration/MigrationTaskAdditionalInformationsDTO.java
@@ -31,16 +31,23 @@ public class MigrationTaskAdditionalInformationsDTO 
implements AdditionalInforma
         DTOModule.forDomainObject(MigrationTask.AdditionalInformations.class)
             .convertToDTO(MigrationTaskAdditionalInformationsDTO.class)
             .toDomainObjectConverter(dto -> new 
MigrationTask.AdditionalInformations(new SchemaVersion(dto.getTargetVersion())))
-            .toDTOConverter((details, type) -> new 
MigrationTaskAdditionalInformationsDTO(details.getToVersion()))
+            .toDTOConverter((details, type) -> new 
MigrationTaskAdditionalInformationsDTO(type, details.getToVersion()))
             .typeName(MigrationTask.CASSANDRA_MIGRATION.asString())
             .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final int targetVersion;
 
-    public 
MigrationTaskAdditionalInformationsDTO(@JsonProperty("targetVersion") int 
targetVersion) {
+    public MigrationTaskAdditionalInformationsDTO(@JsonProperty("type") String 
type, @JsonProperty("targetVersion") int targetVersion) {
+        this.type = type;
         this.targetVersion = targetVersion;
     }
 
+    @Override
+    public String getType() {
+        return type;
+    }
+
     public int getTargetVersion() {
         return targetVersion;
     }
diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/MailboxPathV2MigrationTaskAdditionalInformationDTO.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/MailboxPathV2MigrationTaskAdditionalInformationDTO.java
index d6c021d..dbe9890 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/MailboxPathV2MigrationTaskAdditionalInformationDTO.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/MailboxPathV2MigrationTaskAdditionalInformationDTO.java
@@ -30,6 +30,7 @@ public class 
MailboxPathV2MigrationTaskAdditionalInformationDTO implements Addit
 
     private static MailboxPathV2MigrationTaskAdditionalInformationDTO 
fromDomainObject(MailboxPathV2Migration.AdditionalInformation 
additionalInformation, String type) {
         return new MailboxPathV2MigrationTaskAdditionalInformationDTO(
+            type,
             additionalInformation.getRemainingCount(),
             additionalInformation.getInitialCount()
         );
@@ -44,10 +45,14 @@ public class 
MailboxPathV2MigrationTaskAdditionalInformationDTO implements Addit
             .typeName(MailboxPathV2Migration.TYPE.asString())
             .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final long remainingCount;
     private final long initialCount;
 
-    public 
MailboxPathV2MigrationTaskAdditionalInformationDTO(@JsonProperty("remainingCount")
 long remainingCount, @JsonProperty("initialCount") long initialCount) {
+    public 
MailboxPathV2MigrationTaskAdditionalInformationDTO(@JsonProperty("type") String 
type,
+                                                              
@JsonProperty("remainingCount") long remainingCount,
+                                                              
@JsonProperty("initialCount") long initialCount) {
+        this.type = type;
         this.remainingCount = remainingCount;
         this.initialCount = initialCount;
     }
@@ -60,6 +65,11 @@ public class 
MailboxPathV2MigrationTaskAdditionalInformationDTO implements Addit
         return initialCount;
     }
 
+    @Override
+    public String getType() {
+        return type;
+    }
+
     private MailboxPathV2Migration.AdditionalInformation toDomainObject() {
         return new MailboxPathV2Migration.AdditionalInformation(
             remainingCount,
diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/MailboxMergingTaskAdditionalInformationDTO.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/MailboxMergingTaskAdditionalInformationDTO.java
index 16a898e..1bcf8a7 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/MailboxMergingTaskAdditionalInformationDTO.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/MailboxMergingTaskAdditionalInformationDTO.java
@@ -32,6 +32,7 @@ public class MailboxMergingTaskAdditionalInformationDTO 
implements AdditionalInf
 
     private static MailboxMergingTaskAdditionalInformationDTO 
fromDomainObject(MailboxMergingTask.Details details, String type) {
         return new MailboxMergingTaskAdditionalInformationDTO(
+            type,
             details.getOldMailboxId(),
             details.getNewMailboxId(),
             details.getTotalMessageCount(),
@@ -48,17 +49,20 @@ public class MailboxMergingTaskAdditionalInformationDTO 
implements AdditionalInf
             .typeName(MailboxMergingTask.MAILBOX_MERGING.asString())
             .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final String oldMailboxId;
     private final String newMailboxId;
     private final long totalMessageCount;
     private final long messageMovedCount;
     private final long messageFailedCount;
 
-    public 
MailboxMergingTaskAdditionalInformationDTO(@JsonProperty("oldMailboxId") String 
oldMailboxId,
+    public MailboxMergingTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                      
@JsonProperty("oldMailboxId") String oldMailboxId,
                                                       
@JsonProperty("newMailboxId") String newMailboxId,
                                                       
@JsonProperty("totalMessageCount") long totalMessageCount,
                                                       
@JsonProperty("messageMovedCount") long messageMovedCount,
                                                       
@JsonProperty("messageFailedCount") long messageFailedCount) {
+        this.type = type;
         this.oldMailboxId = oldMailboxId;
         this.newMailboxId = newMailboxId;
         this.totalMessageCount = totalMessageCount;
@@ -86,6 +90,11 @@ public class MailboxMergingTaskAdditionalInformationDTO 
implements AdditionalInf
         return messageFailedCount;
     }
 
+    @Override
+    public String getType() {
+        return type;
+    }
+
     private MailboxMergingTask.Details toDomainObject() {
         return new MailboxMergingTask.Details(
             ID_FACTORY.fromString(oldMailboxId),
diff --git 
a/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/blob/BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO.java
 
b/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/blob/BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO.java
index cc68f1a..87d236c 100644
--- 
a/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/blob/BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO.java
+++ 
b/mailbox/plugin/deleted-messages-vault/src/main/java/org/apache/james/vault/blob/BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO.java
@@ -34,6 +34,7 @@ import com.github.steveash.guavate.Guavate;
 public class BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO 
implements AdditionalInformationDTO {
     static BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO 
fromDomainObject(BlobStoreVaultGarbageCollectionTask.AdditionalInformation 
additionalInformation, String type) {
         return new BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO(
+            type,
             additionalInformation.getBeginningOfRetentionPeriod().toString(),
             additionalInformation.getDeletedBuckets()
         );
@@ -50,9 +51,13 @@ public class 
BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO impleme
 
     private final String beginningOfRetentionPeriod;
     private final Collection<String> deletedBuckets;
+    private final String type;
 
-    
BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO(@JsonProperty("beginningOfRetentionPeriod")
 String beginningOfRetentionPeriod,
-                                                                
@JsonProperty("deletedBuckets") Collection<String> deletedBuckets) {
+    BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO(
+        @JsonProperty("type") String type,
+        @JsonProperty("beginningOfRetentionPeriod") String 
beginningOfRetentionPeriod,
+        @JsonProperty("deletedBuckets") Collection<String> deletedBuckets) {
+        this.type = type;
         this.beginningOfRetentionPeriod = beginningOfRetentionPeriod;
         this.deletedBuckets = deletedBuckets;
     }
@@ -73,4 +78,9 @@ public class 
BlobStoreVaultGarbageCollectionTaskAdditionalInformationDTO impleme
     public Collection<String> getDeletedBuckets() {
         return deletedBuckets;
     }
+
+    @Override
+    public String getType() {
+        return type;
+    }
 }
diff --git 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/MessageIdReindexingTaskAdditionalInformationDTO.java
 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/MessageIdReindexingTaskAdditionalInformationDTO.java
index 3d84a1c..b52d055 100644
--- 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/MessageIdReindexingTaskAdditionalInformationDTO.java
+++ 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/MessageIdReindexingTaskAdditionalInformationDTO.java
@@ -34,13 +34,15 @@ public class 
MessageIdReindexingTaskAdditionalInformationDTO implements Addition
             
DTOModule.forDomainObject(MessageIdReIndexingTask.AdditionalInformation.class)
                 
.convertToDTO(MessageIdReindexingTaskAdditionalInformationDTO.class)
                 .toDomainObjectConverter(dto -> new 
MessageIdReIndexingTask.AdditionalInformation(factory.fromString(dto.getMessageId())))
-                .toDTOConverter((details, type) -> new 
MessageIdReindexingTaskAdditionalInformationDTO(details.getMessageId()))
+                .toDTOConverter((details, type) -> new 
MessageIdReindexingTaskAdditionalInformationDTO(type, details.getMessageId()))
                 .typeName(MessageIdReIndexingTask.TYPE.asString())
                 .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final String messageId;
 
-    private 
MessageIdReindexingTaskAdditionalInformationDTO(@JsonProperty("messageId") 
String messageId) {
+    private 
MessageIdReindexingTaskAdditionalInformationDTO(@JsonProperty("type") String 
type, @JsonProperty("messageId") String messageId) {
+        this.type = type;
         this.messageId = messageId;
     }
 
@@ -48,7 +50,12 @@ public class MessageIdReindexingTaskAdditionalInformationDTO 
implements Addition
         return messageId;
     }
 
+    @Override
+    public String getType() {
+        return type;
+    }
+
     public static MessageIdReindexingTaskAdditionalInformationDTO 
of(MessageIdReIndexingTask task) {
-        return new 
MessageIdReindexingTaskAdditionalInformationDTO(task.getMessageId().serialize());
+        return new 
MessageIdReindexingTaskAdditionalInformationDTO(task.type().asString(), 
task.getMessageId().serialize());
     }
 }
diff --git 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformationDTO.java
 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformationDTO.java
index 7d5c27d..78f4aa9 100644
--- 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformationDTO.java
+++ 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformationDTO.java
@@ -63,7 +63,7 @@ public class ReprocessingContextInformationDTO implements 
AdditionalInformationD
             DTOModule.forDomainObject(ReprocessingContextInformation.class)
                 .convertToDTO(ReprocessingContextInformationDTO.class)
                 .toDomainObjectConverter(dto -> new 
ReprocessingContextInformation(dto.successfullyReprocessedMailCount, 
dto.failedReprocessedMailCount, deserializeFailures(factory, dto.failures)))
-                .toDTOConverter((details, type) -> new 
ReprocessingContextInformationDTO(details.getSuccessfullyReprocessedMailCount(),
 details.getFailedReprocessedMailCount(), 
serializeFailures(details.failures())))
+                .toDTOConverter((details, type) -> new 
ReprocessingContextInformationDTO(type, 
details.getSuccessfullyReprocessedMailCount(), 
details.getFailedReprocessedMailCount(), serializeFailures(details.failures())))
                 .typeName(taskType.asString())
                 .withFactory(AdditionalInformationDTOModule::new);
 
@@ -110,14 +110,17 @@ public class ReprocessingContextInformationDTO implements 
AdditionalInformationD
             .collect(Guavate.toImmutableList());
     }
 
+    private final String type;
     private final int successfullyReprocessedMailCount;
     private final int failedReprocessedMailCount;
     private final List<ReindexingFailureDTO> failures;
 
 
-    
ReprocessingContextInformationDTO(@JsonProperty("successfullyReprocessedMailCount")
 int successfullyReprocessedMailCount,
+    ReprocessingContextInformationDTO(@JsonProperty("type") String type,
+                                      
@JsonProperty("successfullyReprocessedMailCount") int 
successfullyReprocessedMailCount,
                                       
@JsonProperty("failedReprocessedMailCount") int failedReprocessedMailCount,
                                       @JsonProperty("failures") 
List<ReindexingFailureDTO> failures) {
+        this.type = type;
         this.successfullyReprocessedMailCount = 
successfullyReprocessedMailCount;
         this.failedReprocessedMailCount = failedReprocessedMailCount;
         this.failures = failures;
@@ -134,4 +137,9 @@ public class ReprocessingContextInformationDTO implements 
AdditionalInformationD
     public List<ReindexingFailureDTO> getFailures() {
         return failures;
     }
+
+    @Override
+    public String getType() {
+        return type;
+    }
 }
diff --git 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskAdditionalInformationDTO.java
 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskAdditionalInformationDTO.java
index c7b9efc..ee9a904 100644
--- 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskAdditionalInformationDTO.java
+++ 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskAdditionalInformationDTO.java
@@ -39,7 +39,7 @@ public class 
SingleMailboxReindexingTaskAdditionalInformationDTO implements Addi
                     dto.getSuccessfullyReprocessedMailCount(),
                     dto.getFailedReprocessedMailCount(),
                     
ReprocessingContextInformationDTO.deserializeFailures(factory, 
dto.getFailures())))
-                .toDTOConverter((details, type) -> new 
SingleMailboxReindexingTaskAdditionalInformationDTO(details.getMailboxId(), 
details.getSuccessfullyReprocessedMailCount(), 
details.getFailedReprocessedMailCount(),
+                .toDTOConverter((details, type) -> new 
SingleMailboxReindexingTaskAdditionalInformationDTO(type, 
details.getMailboxId(), details.getSuccessfullyReprocessedMailCount(), 
details.getFailedReprocessedMailCount(),
                     
ReprocessingContextInformationDTO.serializeFailures(details.failures())))
                 
.typeName(SingleMailboxReindexingTask.MAILBOX_RE_INDEXING.asString())
                 .withFactory(AdditionalInformationDTOModule::new);
@@ -48,16 +48,23 @@ public class 
SingleMailboxReindexingTaskAdditionalInformationDTO implements Addi
     private final String mailboxId;
 
     @JsonCreator
-    private 
SingleMailboxReindexingTaskAdditionalInformationDTO(@JsonProperty("mailboxId") 
String mailboxId,
+    private 
SingleMailboxReindexingTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                                
@JsonProperty("mailboxId") String mailboxId,
                                                                 
@JsonProperty("successfullyReprocessedMailCount") int 
successfullyReprocessedMailCount,
                                                                 
@JsonProperty("failedReprocessedMailCount") int failedReprocessedMailCount,
                                                                 
@JsonProperty("failures") 
List<ReprocessingContextInformationDTO.ReindexingFailureDTO> failures) {
         this.mailboxId = mailboxId;
         this.reprocessingContextInformationDTO = new 
ReprocessingContextInformationDTO(
+            type,
             successfullyReprocessedMailCount,
             failedReprocessedMailCount, failures);
     }
 
+    @Override
+    public String getType() {
+        return reprocessingContextInformationDTO.getType();
+    }
+
     public String getMailboxId() {
         return mailboxId;
     }
diff --git 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMessageReindexingTaskAdditionalInformationDTO.java
 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMessageReindexingTaskAdditionalInformationDTO.java
index b5f144b..e1d4ba6 100644
--- 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMessageReindexingTaskAdditionalInformationDTO.java
+++ 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMessageReindexingTaskAdditionalInformationDTO.java
@@ -35,14 +35,18 @@ public class 
SingleMessageReindexingTaskAdditionalInformationDTO implements Addi
             
DTOModule.forDomainObject(SingleMessageReindexingTask.AdditionalInformation.class)
                 
.convertToDTO(SingleMessageReindexingTaskAdditionalInformationDTO.class)
                 .toDomainObjectConverter(dto -> new 
SingleMessageReindexingTask.AdditionalInformation(factory.fromString(dto.mailboxId),
 MessageUid.of(dto.getUid())))
-                .toDTOConverter((details, type) -> new 
SingleMessageReindexingTaskAdditionalInformationDTO(details.getMailboxId(), 
details.getUid()))
+                .toDTOConverter((details, type) -> new 
SingleMessageReindexingTaskAdditionalInformationDTO(type, 
details.getMailboxId(), details.getUid()))
                 
.typeName(SingleMessageReindexingTask.MESSAGE_RE_INDEXING.asString())
                 .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final String mailboxId;
     private final long uid;
 
-    private 
SingleMessageReindexingTaskAdditionalInformationDTO(@JsonProperty("mailboxId") 
String mailboxId, @JsonProperty("uid") long uid) {
+    private 
SingleMessageReindexingTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                                
@JsonProperty("mailboxId") String mailboxId,
+                                                                
@JsonProperty("uid") long uid) {
+        this.type = type;
         this.mailboxId = mailboxId;
         this.uid = uid;
     }
@@ -55,7 +59,12 @@ public class 
SingleMessageReindexingTaskAdditionalInformationDTO implements Addi
         return uid;
     }
 
+    @Override
+    public String getType() {
+        return type;
+    }
+
     public static SingleMessageReindexingTaskAdditionalInformationDTO 
of(SingleMessageReindexingTask task) {
-        return new 
SingleMessageReindexingTaskAdditionalInformationDTO(task.getMailboxId().serialize(),
 task.getUid().asLong());
+        return new 
SingleMessageReindexingTaskAdditionalInformationDTO(task.type().asString(), 
task.getMailboxId().serialize(), task.getUid().asLong());
     }
 }
diff --git 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/UserReindexingTaskAdditionalInformationDTO.java
 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/UserReindexingTaskAdditionalInformationDTO.java
index 3b82156..0ea68bd 100644
--- 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/UserReindexingTaskAdditionalInformationDTO.java
+++ 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/UserReindexingTaskAdditionalInformationDTO.java
@@ -40,7 +40,7 @@ public class UserReindexingTaskAdditionalInformationDTO 
implements AdditionalInf
                     dto.getSuccessfullyReprocessedMailCount(),
                     dto.getFailedReprocessedMailCount(),
                     
ReprocessingContextInformationDTO.deserializeFailures(factory, 
dto.getFailures())))
-                .toDTOConverter((details, type) -> new 
UserReindexingTaskAdditionalInformationDTO(details.getUser(), 
details.getSuccessfullyReprocessedMailCount(), 
details.getFailedReprocessedMailCount(),
+                .toDTOConverter((details, type) -> new 
UserReindexingTaskAdditionalInformationDTO(type, details.getUser(), 
details.getSuccessfullyReprocessedMailCount(), 
details.getFailedReprocessedMailCount(),
                     
ReprocessingContextInformationDTO.serializeFailures(details.failures())))
                 .typeName(UserReindexingTask.USER_RE_INDEXING.asString())
                 .withFactory(AdditionalInformationDTOModule::new);
@@ -49,16 +49,23 @@ public class UserReindexingTaskAdditionalInformationDTO 
implements AdditionalInf
     private final String user;
 
     @JsonCreator
-    private UserReindexingTaskAdditionalInformationDTO(@JsonProperty("user") 
String user,
+    private UserReindexingTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                       @JsonProperty("user") 
String user,
                                                        
@JsonProperty("successfullyReprocessedMailCount") int 
successfullyReprocessedMailCount,
                                                        
@JsonProperty("failedReprocessedMailCount") int failedReprocessedMailCount,
                                                        
@JsonProperty("failures") 
List<ReprocessingContextInformationDTO.ReindexingFailureDTO> failures) {
         this.user = user;
         this.reprocessingContextInformationDTO = new 
ReprocessingContextInformationDTO(
+            type,
             successfullyReprocessedMailCount,
             failedReprocessedMailCount, failures);
     }
 
+    @Override
+    public String getType() {
+        return reprocessingContextInformationDTO.getType();
+    }
+
     public String getUser() {
         return user;
     }
diff --git 
a/server/data/data-cassandra/src/main/java/org/apache/james/rrt/cassandra/migration/MappingsSourcesMigrationTaskAdditionalInformationDTO.java
 
b/server/data/data-cassandra/src/main/java/org/apache/james/rrt/cassandra/migration/MappingsSourcesMigrationTaskAdditionalInformationDTO.java
index e84bc05..82697bd 100644
--- 
a/server/data/data-cassandra/src/main/java/org/apache/james/rrt/cassandra/migration/MappingsSourcesMigrationTaskAdditionalInformationDTO.java
+++ 
b/server/data/data-cassandra/src/main/java/org/apache/james/rrt/cassandra/migration/MappingsSourcesMigrationTaskAdditionalInformationDTO.java
@@ -30,6 +30,7 @@ public class 
MappingsSourcesMigrationTaskAdditionalInformationDTO implements Add
 
     private static MappingsSourcesMigrationTaskAdditionalInformationDTO 
fromDomainObject(MappingsSourcesMigration.AdditionalInformation 
additionalInformation, String type) {
         return new MappingsSourcesMigrationTaskAdditionalInformationDTO(
+            type,
             additionalInformation.getSuccessfulMappingsCount(),
             additionalInformation.getErrorMappingsCount()
         );
@@ -44,10 +45,14 @@ public class 
MappingsSourcesMigrationTaskAdditionalInformationDTO implements Add
             .typeName(MappingsSourcesMigration.TYPE.asString())
             .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final long successfulMappingsCount;
     private final long errorMappinsCount;
 
-    public 
MappingsSourcesMigrationTaskAdditionalInformationDTO(@JsonProperty("successfulMappingsCount")
 long successfulMappingsCount, @JsonProperty("errorMappinsCount") long 
errorMappinsCount) {
+    public 
MappingsSourcesMigrationTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                                
@JsonProperty("successfulMappingsCount") long successfulMappingsCount,
+                                                                
@JsonProperty("errorMappinsCount") long errorMappinsCount) {
+        this.type = type;
         this.successfulMappingsCount = successfulMappingsCount;
         this.errorMappinsCount = errorMappinsCount;
     }
@@ -60,6 +65,11 @@ public class 
MappingsSourcesMigrationTaskAdditionalInformationDTO implements Add
         return errorMappinsCount;
     }
 
+    @Override
+    public String getType() {
+        return type;
+    }
+
     private MappingsSourcesMigration.AdditionalInformation toDomainObject() {
         return new MappingsSourcesMigration.AdditionalInformation(
             successfulMappingsCount,
diff --git 
a/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultDeleteTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultDeleteTaskAdditionalInformationDTO.java
index 363e1c5..b4643d6 100644
--- 
a/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultDeleteTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultDeleteTaskAdditionalInformationDTO.java
@@ -35,14 +35,18 @@ public class 
DeletedMessagesVaultDeleteTaskAdditionalInformationDTO implements A
             
DTOModule.forDomainObject(DeletedMessagesVaultDeleteTask.AdditionalInformation.class)
                 
.convertToDTO(DeletedMessagesVaultDeleteTaskAdditionalInformationDTO.class)
                 .toDomainObjectConverter(dto -> new 
DeletedMessagesVaultDeleteTask.AdditionalInformation(User.fromUsername(dto.userName),
 factory.fromString(dto.getMessageId())))
-                .toDTOConverter((details, type) -> new 
DeletedMessagesVaultDeleteTaskAdditionalInformationDTO(details.getUser(), 
details.getDeleteMessageId()))
+                .toDTOConverter((details, type) -> new 
DeletedMessagesVaultDeleteTaskAdditionalInformationDTO(type, details.getUser(), 
details.getDeleteMessageId()))
                 .typeName(DeletedMessagesVaultDeleteTask.TYPE.asString())
                 .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final String userName;
     private final String messageId;
 
-    public 
DeletedMessagesVaultDeleteTaskAdditionalInformationDTO(@JsonProperty("userName")
 String userName, @JsonProperty("messageId") String messageId) {
+    public 
DeletedMessagesVaultDeleteTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                                  
@JsonProperty("userName") String userName,
+                                                                  
@JsonProperty("messageId") String messageId) {
+        this.type = type;
         this.userName = userName;
         this.messageId = messageId;
     }
@@ -54,4 +58,9 @@ public class 
DeletedMessagesVaultDeleteTaskAdditionalInformationDTO implements A
     public String getUserName() {
         return userName;
     }
+
+    @Override
+    public String getType() {
+        return type;
+    }
 }
diff --git 
a/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultExportTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultExportTaskAdditionalInformationDTO.java
index 27897ca..2e56836 100644
--- 
a/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultExportTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultExportTaskAdditionalInformationDTO.java
@@ -34,6 +34,7 @@ public class 
DeletedMessagesVaultExportTaskAdditionalInformationDTO implements A
 
     private static DeletedMessagesVaultExportTaskAdditionalInformationDTO 
fromDomainObject(DeletedMessagesVaultExportTask.AdditionalInformation 
additionalInformation, String type) {
         return new DeletedMessagesVaultExportTaskAdditionalInformationDTO(
+            type,
             additionalInformation.getUserExportFrom(),
             additionalInformation.getExportTo(),
             additionalInformation.getTotalExportedMessages()
@@ -49,13 +50,16 @@ public class 
DeletedMessagesVaultExportTaskAdditionalInformationDTO implements A
             .typeName(DeletedMessagesVaultExportTask.TYPE.asString())
             .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final String userExportFrom;
     private final String exportTo;
     private final Long totalExportedMessages;
 
-    public 
DeletedMessagesVaultExportTaskAdditionalInformationDTO(@JsonProperty("user") 
String userExportFrom,
+    public 
DeletedMessagesVaultExportTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                                  
@JsonProperty("user") String userExportFrom,
                                                                   
@JsonProperty("exportTo") String exportTo,
                                                                   
@JsonProperty("errorRestoreCount") Long totalExportedMessages) {
+        this.type = type;
         this.userExportFrom = userExportFrom;
         this.exportTo = exportTo;
         this.totalExportedMessages = totalExportedMessages;
@@ -84,4 +88,9 @@ public class 
DeletedMessagesVaultExportTaskAdditionalInformationDTO implements A
             throw new RuntimeException(e);
         }
     }
+
+    @Override
+    public String getType() {
+        return type;
+    }
 }
diff --git 
a/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultRestoreTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultRestoreTaskAdditionalInformationDTO.java
index 1d58b2d..6582a61 100644
--- 
a/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultRestoreTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailbox-deleted-message-vault/src/main/java/org/apache/james/webadmin/vault/routes/DeletedMessagesVaultRestoreTaskAdditionalInformationDTO.java
@@ -31,6 +31,7 @@ public class 
DeletedMessagesVaultRestoreTaskAdditionalInformationDTO implements
 
     private static DeletedMessagesVaultRestoreTaskAdditionalInformationDTO 
fromDomainObject(DeletedMessagesVaultRestoreTask.AdditionalInformation 
additionalInformation, String type) {
         return new DeletedMessagesVaultRestoreTaskAdditionalInformationDTO(
+            type,
             additionalInformation.getUser(),
             additionalInformation.getSuccessfulRestoreCount(),
             additionalInformation.getErrorRestoreCount()
@@ -46,13 +47,16 @@ public class 
DeletedMessagesVaultRestoreTaskAdditionalInformationDTO implements
             .typeName(DeletedMessagesVaultRestoreTask.TYPE.asString())
             .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final String user;
     private final Long successfulRestoreCount;
     private final Long errorRestoreCount;
 
-    public 
DeletedMessagesVaultRestoreTaskAdditionalInformationDTO(@JsonProperty("user") 
String user,
+    public 
DeletedMessagesVaultRestoreTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                                   
@JsonProperty("user") String user,
                                                                    
@JsonProperty("successfulRestoreCount") Long successfulRestoreCount,
                                                                    
@JsonProperty("errorRestoreCount") Long errorRestoreCount) {
+        this.type = type;
         this.user = user;
         this.successfulRestoreCount = successfulRestoreCount;
         this.errorRestoreCount = errorRestoreCount;
@@ -77,4 +81,9 @@ public class 
DeletedMessagesVaultRestoreTaskAdditionalInformationDTO implements
             errorRestoreCount
         );
     }
+
+    @Override
+    public String getType() {
+        return type;
+    }
 }
diff --git 
a/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/service/EventDeadLettersRedeliveryTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/service/EventDeadLettersRedeliveryTaskAdditionalInformationDTO.java
index d1ed9f5..d01c63f 100644
--- 
a/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/service/EventDeadLettersRedeliveryTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/service/EventDeadLettersRedeliveryTaskAdditionalInformationDTO.java
@@ -24,6 +24,7 @@ public class 
EventDeadLettersRedeliveryTaskAdditionalInformationDTO implements A
 
     private static EventDeadLettersRedeliveryTaskAdditionalInformationDTO 
toDTO(EventDeadLettersRedeliverTask.AdditionalInformation domainObject, String 
typeName) {
         return new EventDeadLettersRedeliveryTaskAdditionalInformationDTO(
+            typeName,
             domainObject.getSuccessfulRedeliveriesCount(),
             domainObject.getFailedRedeliveriesCount(),
             domainObject.getGroup(),
@@ -39,16 +40,19 @@ public class 
EventDeadLettersRedeliveryTaskAdditionalInformationDTO implements A
     }
 
 
+    private final String type;
     private final long successfulRedeliveriesCount;
     private final long failedRedeliveriesCount;
     private final Optional<String> group;
     private final Optional<String> insertionId;
 
-    public 
EventDeadLettersRedeliveryTaskAdditionalInformationDTO(@JsonProperty("successfulRedeliveriesCount")
 long successfulRedeliveriesCount,
+    public 
EventDeadLettersRedeliveryTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                                  
@JsonProperty("successfulRedeliveriesCount") long successfulRedeliveriesCount,
                                                                   
@JsonProperty("failedRedeliveriesCount") long failedRedeliveriesCount,
                                                                   
@JsonProperty("group") Optional<String> group,
                                                                   
@JsonProperty("insertionId") Optional<String> insertionId
     ) {
+        this.type = type;
         this.successfulRedeliveriesCount = successfulRedeliveriesCount;
         this.failedRedeliveriesCount = failedRedeliveriesCount;
         this.group = group;
@@ -71,4 +75,9 @@ public class 
EventDeadLettersRedeliveryTaskAdditionalInformationDTO implements A
     public Optional<String> getInsertionId() {
         return insertionId;
     }
+
+    @Override
+    public String getType() {
+        return type;
+    }
 }
\ No newline at end of file
diff --git 
a/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/ClearMailQueueTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/ClearMailQueueTaskAdditionalInformationDTO.java
index 4a4f5b0..3d8015d 100644
--- 
a/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/ClearMailQueueTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/ClearMailQueueTaskAdditionalInformationDTO.java
@@ -35,6 +35,7 @@ public class ClearMailQueueTaskAdditionalInformationDTO 
implements AdditionalInf
                 dto.remainingCount
             ))
             .toDTOConverter((details, type) -> new 
ClearMailQueueTaskAdditionalInformationDTO(
+                type,
                 details.getMailQueueName(),
                 details.getInitialCount(),
                 details.getRemainingCount()))
@@ -42,12 +43,15 @@ public class ClearMailQueueTaskAdditionalInformationDTO 
implements AdditionalInf
             .withFactory(AdditionalInformationDTOModule::new);
 
     private final String mailQueueName;
+    private final String type;
     private final long initialCount;
     private final long remainingCount;
 
-    public 
ClearMailQueueTaskAdditionalInformationDTO(@JsonProperty("mailQueueName") 
String mailQueueName,
+    public ClearMailQueueTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                      
@JsonProperty("mailQueueName") String mailQueueName,
                                                       
@JsonProperty("initialCount") long initialCount,
                                                       
@JsonProperty("remainingCount") long remainingCount) {
+        this.type = type;
         this.mailQueueName = mailQueueName;
         this.initialCount = initialCount;
         this.remainingCount = remainingCount;
@@ -65,4 +69,8 @@ public class ClearMailQueueTaskAdditionalInformationDTO 
implements AdditionalInf
         return remainingCount;
     }
 
+    @Override
+    public String getType() {
+        return type;
+    }
 }
diff --git 
a/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
index 53d15af..74e44c6 100644
--- 
a/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
@@ -23,6 +23,7 @@ public class 
DeleteMailsFromMailQueueTaskAdditionalInformationDTO implements Add
 
     private static DeleteMailsFromMailQueueTaskAdditionalInformationDTO 
toDTO(DeleteMailsFromMailQueueTask.AdditionalInformation domainObject, String 
typeName) {
         return new DeleteMailsFromMailQueueTaskAdditionalInformationDTO(
+            typeName,
             domainObject.getMailQueueName(),
             domainObject.getSender(),
             domainObject.getName(),
@@ -43,19 +44,22 @@ public class 
DeleteMailsFromMailQueueTaskAdditionalInformationDTO implements Add
 
 
     private final String queue;
+    private final String type;
     private final Optional<String> sender;
     private final Optional<String> name;
     private final Optional<String> recipient;
     private final long initialCount;
     private final long remainingCount;
 
-    public 
DeleteMailsFromMailQueueTaskAdditionalInformationDTO(@JsonProperty("queue") 
String queue,
+    public 
DeleteMailsFromMailQueueTaskAdditionalInformationDTO(@JsonProperty("type") 
String type,
+                                                                
@JsonProperty("queue") String queue,
                                                                 
@JsonProperty("sender") Optional<String> sender,
                                                                 
@JsonProperty("name") Optional<String> name,
                                                                 
@JsonProperty("recipient") Optional<String> recipient,
                                                                 
@JsonProperty("initialCount") long initialCount,
                                                                 
@JsonProperty("remainingCount") long remainingCount
     ) {
+        this.type = type;
         this.queue = queue;
         this.sender = sender;
         this.name = name;
@@ -88,4 +92,9 @@ public class 
DeleteMailsFromMailQueueTaskAdditionalInformationDTO implements Add
     public long getRemainingCount() {
         return remainingCount;
     }
+
+    @Override
+    public String getType() {
+        return type;
+    }
 }
\ No newline at end of file
diff --git 
a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTaskAdditionalInformationDTO.java
index d73adbc..b94042c 100644
--- 
a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTaskAdditionalInformationDTO.java
@@ -36,6 +36,7 @@ public class ClearMailRepositoryTaskAdditionalInformationDTO 
implements Addition
                 dto.remainingCount
             ))
             .toDTOConverter((details, type) -> new 
ClearMailRepositoryTaskAdditionalInformationDTO(
+                type,
                 details.getRepositoryPath(),
                 details.getInitialCount(),
                 details.getRemainingCount()))
@@ -43,12 +44,15 @@ public class 
ClearMailRepositoryTaskAdditionalInformationDTO implements Addition
             .withFactory(AdditionalInformationDTOModule::new);
 
     private final String mailRepositoryPath;
+    private final String type;
     private final long initialCount;
     private final long remainingCount;
 
-    public 
ClearMailRepositoryTaskAdditionalInformationDTO(@JsonProperty("mailRepositoryPath")
 String mailRepositoryPath,
+    public 
ClearMailRepositoryTaskAdditionalInformationDTO(@JsonProperty("type") String 
type,
+                                                           
@JsonProperty("mailRepositoryPath") String mailRepositoryPath,
                                                            
@JsonProperty("initialCount") long initialCount,
                                                            
@JsonProperty("remainingCount") long remainingCount) {
+        this.type = type;
         this.mailRepositoryPath = mailRepositoryPath;
         this.initialCount = initialCount;
         this.remainingCount = remainingCount;
@@ -66,4 +70,8 @@ public class ClearMailRepositoryTaskAdditionalInformationDTO 
implements Addition
         return remainingCount;
     }
 
+    @Override
+    public String getType() {
+        return type;
+    }
 }
diff --git 
a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingAllMailsTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingAllMailsTaskAdditionalInformationDTO.java
index 3b117ed..6f773c2 100644
--- 
a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingAllMailsTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingAllMailsTaskAdditionalInformationDTO.java
@@ -40,6 +40,7 @@ public class ReprocessingAllMailsTaskAdditionalInformationDTO 
implements Additio
                 dto.remainingCount
             ))
             .toDTOConverter((details, type) -> new 
ReprocessingAllMailsTaskAdditionalInformationDTO(
+                type,
                 details.getRepositoryPath(),
                 details.getTargetQueue(),
                 details.getTargetProcessor(),
@@ -48,6 +49,7 @@ public class ReprocessingAllMailsTaskAdditionalInformationDTO 
implements Additio
             .typeName(ReprocessingAllMailsTask.TYPE.asString())
             .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final String repositoryPath;
     private final String targetQueue;
     private final Optional<String> targetProcessor;
@@ -55,11 +57,13 @@ public class 
ReprocessingAllMailsTaskAdditionalInformationDTO implements Additio
     private final long remainingCount;
 
     public ReprocessingAllMailsTaskAdditionalInformationDTO(
+        @JsonProperty("type") String type,
         @JsonProperty("repositoryPath") String repositoryPath,
         @JsonProperty("targetQueue") String targetQueue,
         @JsonProperty("targetProcessor") Optional<String> targetProcessor,
         @JsonProperty("initialCount") long initialCount,
         @JsonProperty("remainingCount") long remainingCount) {
+        this.type = type;
         this.repositoryPath = repositoryPath;
         this.targetQueue = targetQueue;
         this.targetProcessor = targetProcessor;
@@ -67,6 +71,11 @@ public class 
ReprocessingAllMailsTaskAdditionalInformationDTO implements Additio
         this.remainingCount = remainingCount;
     }
 
+    @Override
+    public String getType() {
+        return type;
+    }
+
     public long getInitialCount() {
         return initialCount;
     }
diff --git 
a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingOneMailTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingOneMailTaskAdditionalInformationDTO.java
index 045ca81..c53fc00 100644
--- 
a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingOneMailTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ReprocessingOneMailTaskAdditionalInformationDTO.java
@@ -40,6 +40,7 @@ public class ReprocessingOneMailTaskAdditionalInformationDTO 
implements Addition
                 dto.targetProcessor
             ))
             .toDTOConverter((details, type) -> new 
ReprocessingOneMailTaskAdditionalInformationDTO(
+                type,
                 details.getRepositoryPath(),
                 details.getTargetQueue(),
                 details.getMailKey(),
@@ -47,21 +48,29 @@ public class 
ReprocessingOneMailTaskAdditionalInformationDTO implements Addition
             .typeName(ReprocessingOneMailTask.TYPE.asString())
             .withFactory(AdditionalInformationDTOModule::new);
 
+    private final String type;
     private final String repositoryPath;
     private final String targetQueue;
     private final String mailKey;
     private final Optional<String> targetProcessor;
 
-    public 
ReprocessingOneMailTaskAdditionalInformationDTO(@JsonProperty("repositoryPath") 
String repositoryPath,
+    public 
ReprocessingOneMailTaskAdditionalInformationDTO(@JsonProperty("type") String 
type,
+                                                           
@JsonProperty("repositoryPath") String repositoryPath,
                                                            
@JsonProperty("targetQueue") String targetQueue,
                                                            
@JsonProperty("mailKey") String mailKey,
                                                            
@JsonProperty("targetProcessor") Optional<String> targetProcessor) {
+        this.type = type;
         this.repositoryPath = repositoryPath;
         this.targetQueue = targetQueue;
         this.mailKey = mailKey;
         this.targetProcessor = targetProcessor;
     }
 
+    @Override
+    public String getType() {
+        return type;
+    }
+
     public String getRepositoryPath() {
         return repositoryPath;
     }
diff --git 
a/server/task/task-json/src/main/java/org/apache/james/server/task/json/dto/AdditionalInformationDTO.java
 
b/server/task/task-json/src/main/java/org/apache/james/server/task/json/dto/AdditionalInformationDTO.java
index 4ce0a88..548cf1c 100644
--- 
a/server/task/task-json/src/main/java/org/apache/james/server/task/json/dto/AdditionalInformationDTO.java
+++ 
b/server/task/task-json/src/main/java/org/apache/james/server/task/json/dto/AdditionalInformationDTO.java
@@ -21,4 +21,5 @@ package org.apache.james.server.task.json.dto;
 import org.apache.james.json.DTO;
 
 public interface AdditionalInformationDTO extends DTO {
+    String getType();
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to