diff --git a/Cps.Fct.Hk.Ui.Interfaces/Cps.Fct.Hk.Ui.Interfaces.csproj b/Cps.Fct.Hk.Ui.Interfaces/Cps.Fct.Hk.Ui.Interfaces.csproj
index 18be8d30e..8e80cd8b5 100644
--- a/Cps.Fct.Hk.Ui.Interfaces/Cps.Fct.Hk.Ui.Interfaces.csproj
+++ b/Cps.Fct.Hk.Ui.Interfaces/Cps.Fct.Hk.Ui.Interfaces.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/Cps.Fct.Hk.Ui.Interfaces/IBulkSetUnusedService.cs b/Cps.Fct.Hk.Ui.Interfaces/IBulkSetUnusedService.cs
index e73634ca9..8cec49e51 100644
--- a/Cps.Fct.Hk.Ui.Interfaces/IBulkSetUnusedService.cs
+++ b/Cps.Fct.Hk.Ui.Interfaces/IBulkSetUnusedService.cs
@@ -20,6 +20,7 @@ public interface IBulkSetUnusedService
/// The case ID.
/// The authentication values for CMS access.
/// The materials to reclassify as unused.
+ /// The cancellation token.
/// A task that returns the bulk set response.
- Task BulkSetUnusedAsync(int caseId, CmsAuthValues cmsAuthValues, IReadOnlyCollection bulkSetUnusedRequests);
+ Task BulkSetUnusedAsync(int caseId, CmsAuthValues cmsAuthValues, IReadOnlyCollection bulkSetUnusedRequests, CancellationToken cancellationToken = default);
}
diff --git a/Cps.Fct.Hk.Ui.Interfaces/ICaseActionPlanService.cs b/Cps.Fct.Hk.Ui.Interfaces/ICaseActionPlanService.cs
index b716730ce..24477d087 100644
--- a/Cps.Fct.Hk.Ui.Interfaces/ICaseActionPlanService.cs
+++ b/Cps.Fct.Hk.Ui.Interfaces/ICaseActionPlanService.cs
@@ -21,6 +21,7 @@ public interface ICaseActionPlanService
/// The unique identifier of the case for which an action plan is being created.
/// The action plan to create.
/// The authentication values used to authorize the request to retrieve communications.
+ /// The cancellation token.
/// A task that represents the asynchronous operation. The task result contains a read-only object.
- Task AddCaseActionPlanAsync(string urn, int caseId, AddCaseActionPlanRequest addCaseActionPlanRequest, CmsAuthValues cmsAuthValues);
+ Task AddCaseActionPlanAsync(string urn, int caseId, AddCaseActionPlanRequest addCaseActionPlanRequest, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
}
diff --git a/Cps.Fct.Hk.Ui.Interfaces/ICaseDefendantsService.cs b/Cps.Fct.Hk.Ui.Interfaces/ICaseDefendantsService.cs
index f2815c016..e759a9b23 100644
--- a/Cps.Fct.Hk.Ui.Interfaces/ICaseDefendantsService.cs
+++ b/Cps.Fct.Hk.Ui.Interfaces/ICaseDefendantsService.cs
@@ -18,6 +18,7 @@ public interface ICaseDefendantsService
///
/// Unique identifier of the case to retrieve defendants for.
/// The authentication values used to authorize the request to retrieve defendants.
+ /// Cancelltion token.
/// A task representing the asynchronous operation.
- Task GetCaseDefendantsAsync(int caseId, CmsAuthValues cmsAuthValues);
+ Task GetCaseDefendantsAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
}
diff --git a/Cps.Fct.Hk.Ui.Interfaces/ICaseInfoService.cs b/Cps.Fct.Hk.Ui.Interfaces/ICaseInfoService.cs
index 11ff8e172..9ef50d454 100644
--- a/Cps.Fct.Hk.Ui.Interfaces/ICaseInfoService.cs
+++ b/Cps.Fct.Hk.Ui.Interfaces/ICaseInfoService.cs
@@ -4,6 +4,7 @@
namespace Cps.Fct.Hk.Ui.Interfaces;
+using System.Threading;
using System.Threading.Tasks;
using Common.Dto.Request;
using Common.Dto.Response.HouseKeeping;
@@ -18,6 +19,7 @@ public interface ICaseInfoService
///
/// The unique identifier of the case for which communications are being retrieved.
/// The authentication values used to authorize the request to retrieve communications.
+ /// A token to cancel the asynchronous operation. Defaults to .
/// A task that represents the asynchronous operation. The task result contains a read-only object.
- Task GetCaseInfoAsync(int caseId, CmsAuthValues cmsAuthValues);
+ Task GetCaseInfoAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
}
diff --git a/Cps.Fct.Hk.Ui.Interfaces/ICaseLockService.cs b/Cps.Fct.Hk.Ui.Interfaces/ICaseLockService.cs
index dff2174f3..f8b2b5ee1 100644
--- a/Cps.Fct.Hk.Ui.Interfaces/ICaseLockService.cs
+++ b/Cps.Fct.Hk.Ui.Interfaces/ICaseLockService.cs
@@ -18,6 +18,7 @@ public interface ICaseLockService
///
/// The ID of the case to be unlocked.
/// The CMS authentication values required for the API call.
+ /// Cancellation token.
/// A task that represents the asynchronous operation. The task result contains a read-only string object.
- Task CheckCaseLockAsync(int caseId, CmsAuthValues cmsAuthValues);
+ Task CheckCaseLockAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
}
diff --git a/Cps.Fct.Hk.Ui.Interfaces/ICaseMaterialService.cs b/Cps.Fct.Hk.Ui.Interfaces/ICaseMaterialService.cs
index 5d2103fd0..9cfd3135f 100644
--- a/Cps.Fct.Hk.Ui.Interfaces/ICaseMaterialService.cs
+++ b/Cps.Fct.Hk.Ui.Interfaces/ICaseMaterialService.cs
@@ -78,7 +78,6 @@ public interface ICaseMaterialService
///
/// The containing collections of unused materials to be mapped.
///
- /// Inbox communucations.
///
/// A list of objects representing the mapped unused materials.
/// Returns an empty list if no materials are available.
@@ -90,6 +89,7 @@ public interface ICaseMaterialService
///
/// The ID of the case.
/// Authentication details for accessing the CMS.
+ /// A token to cancel the asynchronous operation. Defaults to .
///
/// A tuple containing case communications, unused materials, used statements, used exhibits, used MG forms, used other materials and exhibit producers.
///
@@ -101,7 +101,7 @@ public interface ICaseMaterialService
UsedMgFormsResponse,
UsedOtherMaterialsResponse,
ExhibitProducersResponse)>
- RetrieveCaseMaterialsAsync(int caseId, CmsAuthValues cmsAuthValues);
+ RetrieveCaseMaterialsAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
///
/// Adds materials to the list of case materials, handling duplicates by removing the existing material and adding the new one.
@@ -120,6 +120,7 @@ void AddCaseMaterials(List allCaseMaterials, IEnumerable mat
///
/// The unique ID of the case.
/// Authorization values for CMS access.
+ /// A token to cancel the asynchronous operation. Defaults to .
/// A representing the result of the asynchronous operation.
- public Task GetExhibitProducersAsync(int caseId, CmsAuthValues cmsAuthValues);
+ public Task GetExhibitProducersAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
}
diff --git a/Cps.Fct.Hk.Ui.Interfaces/ICommunicationService.cs b/Cps.Fct.Hk.Ui.Interfaces/ICommunicationService.cs
index a25d06ef5..64b8ceece 100644
--- a/Cps.Fct.Hk.Ui.Interfaces/ICommunicationService.cs
+++ b/Cps.Fct.Hk.Ui.Interfaces/ICommunicationService.cs
@@ -24,48 +24,54 @@ public interface ICommunicationService
///
/// The unique identifier of the case for which communications are being retrieved.
/// The authentication values used to authorize the request to retrieve communications.
+ /// cancellation token used to cancel the operation.
/// A task that represents the asynchronous operation. The task result contains a read-only collection of objects.
- Task> GetCommunicationsAsync(int caseId, CmsAuthValues cmsAuthValues);
+ Task> GetCommunicationsAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
///
/// Retrieves a collection of used statements for a specific case.
///
/// The unique identifier of the case for which used statements are being retrieved.
/// The authentication values used to authorize the request to retrieve the used statements.
+ /// cancellation token used to cancel the operation.
/// A task that represents the asynchronous operation. The task result contains a object, which includes details of the used statements.
- Task GetUsedStatementsAsync(int caseId, CmsAuthValues cmsAuthValues);
+ Task GetUsedStatementsAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
///
/// Retrieves a collection of used exhibits for a specific case.
///
/// The unique identifier of the case for which used exhibits are being retrieved.
/// The authentication values used to authorize the request to retrieve the used exhibits.
+ /// cancellation token used to cancel the operation.
/// A task that represents the asynchronous operation. The task result contains a object, which includes details of the used exhibits.
- Task GetUsedExhibitsAsync(int caseId, CmsAuthValues cmsAuthValues);
+ Task GetUsedExhibitsAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
///
/// Retrieves a collection of used MG forms for a specific case.
///
/// The unique identifier of the case for which used MG forms are being retrieved.
/// The authentication values used to authorize the request to retrieve the used MG forms.
+ /// cancellation token used to cancel the operation.
/// A task that represents the asynchronous operation. The task result contains a object, which includes details of the used MG forms.
- Task GetUsedMgFormsAsync(int caseId, CmsAuthValues cmsAuthValues);
+ Task GetUsedMgFormsAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
///
/// Retrieves a collection of used other materials for a specific case.
///
/// The unique identifier of the case for which used other materials are being retrieved.
/// The authentication values used to authorize the request to retrieve the used other materials.
+ /// cancellation token used to cancel the operation.
/// A task that represents the asynchronous operation. The task result contains a object, which includes details of the used other materials.
- Task GetUsedOtherMaterialsAsync(int caseId, CmsAuthValues cmsAuthValues);
+ Task GetUsedOtherMaterialsAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
///
/// Retrieves a collection of unused materials for a specific case.
///
/// The unique identifier of the case for which unused materials are being retrieved.
/// The authentication values used to authorize the request to retrieve the unused materials.
+ /// cancellation token used to cancel the operation.
/// A task that represents the asynchronous operation. The task result contains a object, which includes details of the unused materials.
- Task GetUnusedMaterialsAsync(int caseId, CmsAuthValues cmsAuthValues);
+ Task GetUnusedMaterialsAsync(int caseId, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
///
/// Retrieves a collection of attachments for a specific communication.
@@ -73,16 +79,18 @@ public interface ICommunicationService
/// The unique identifier of the communication for which attachments are being retrieved.
/// The subject of the communication for which attachments are being retrieved.
/// The authentication values used to authorize the request to retrieve the unused materials.
+ /// cancellation token used to cancel the operation.
/// A task that represents the asynchronous operation. The task result contains a object, which includes attachments of the communication.
- Task GetAttachmentsAsync(int communicationId, string communicationSubject, CmsAuthValues cmsAuthValues);
+ Task GetAttachmentsAsync(int communicationId, string communicationSubject, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
///
/// Retrieves all attachments for a collection of communications.
///
/// The collection of communications to obtain attachments from.
/// The authentication values used to authorize the request to retrieve the unused materials.
+ /// cancellation token used to cancel the operation.
/// A task that represents the asynchronous operation. The task result contains a list of objects.
- Task> RetrieveAllAttachmentsAsync(IReadOnlyCollection communications, CmsAuthValues cmsAuthValues);
+ Task> RetrieveAllAttachmentsAsync(IReadOnlyCollection communications, CmsAuthValues cmsAuthValues, CancellationToken cancellationToken = default);
///
/// Maps a list of attachments to a list of objects.
@@ -97,16 +105,18 @@ public interface ICommunicationService
/// The ID of the case from which communications are retrieved.
/// The ID of the material to find the corresponding case material document link.
/// Authorization values for CMS access.
+ /// cancellation token used to cancel the operation.
/// An object that contains the communication link if found, or a result indicating that no communication was found.
- Task