-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(clearinghouse): add auto retrigger for END_CLEARINGHOUSE
enable maintenance worker to retrigger the clearinghouse process Refs: #810
- Loading branch information
Showing
28 changed files
with
679 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...inistration/Administration.Service/Extensions/CompanyApplicationStatusFilterExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models; | ||
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums; | ||
|
||
namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Extensions; | ||
|
||
public static class CompanyApplicationStatusFilterExtensions | ||
{ | ||
public static IEnumerable<CompanyApplicationStatusId> GetCompanyApplicationStatusIds(this CompanyApplicationStatusFilter? companyApplicationStatusFilter) => | ||
companyApplicationStatusFilter switch | ||
{ | ||
CompanyApplicationStatusFilter.Closed => | ||
[ | ||
CompanyApplicationStatusId.CONFIRMED, CompanyApplicationStatusId.DECLINED | ||
], | ||
CompanyApplicationStatusFilter.InReview => [CompanyApplicationStatusId.SUBMITTED], | ||
_ => | ||
[ | ||
CompanyApplicationStatusId.SUBMITTED, CompanyApplicationStatusId.CONFIRMED, | ||
CompanyApplicationStatusId.DECLINED | ||
] | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
src/maintenance/Maintenance.App/DependencyInjection/BatchDeleteServiceSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Org.Eclipse.TractusX.Portal.Backend.Maintenance.App.Services; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Org.Eclipse.TractusX.Portal.Backend.Maintenance.App.DependencyInjection; | ||
|
||
/// <summary> | ||
/// Settings for the <see cref="BatchDeleteService"/> | ||
/// </summary> | ||
public class BatchDeleteServiceSettings | ||
{ | ||
/// <summary> | ||
/// Documents older than this configured value will be deleted | ||
/// </summary> | ||
[Required] | ||
public int DeleteIntervalInDays { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// Extensions for the <see cref="BatchDeleteService"/> | ||
/// </summary> | ||
public static class BatchDeleteServiceExtensions | ||
{ | ||
/// <summary> | ||
/// Adds the <see cref="BatchDeleteService"/> to the service collection | ||
/// </summary> | ||
/// <param name="services">The service collection used for di</param> | ||
/// <param name="section">The configuration section to get the settings from</param> | ||
/// <returns>The enhanced service collection</returns> | ||
public static IServiceCollection AddBatchDelete(this IServiceCollection services, IConfigurationSection section) | ||
{ | ||
services.AddOptions<BatchDeleteServiceSettings>().Bind(section); | ||
services | ||
.AddTransient<IBatchDeleteService, BatchDeleteService>(); | ||
return services; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/maintenance/Maintenance.App/DependencyInjection/MaintenanceServiceExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider; | ||
using Org.Eclipse.TractusX.Portal.Backend.Maintenance.App.Services; | ||
|
||
namespace Org.Eclipse.TractusX.Portal.Backend.Maintenance.App.DependencyInjection; | ||
|
||
/// <summary> | ||
/// Extension methods to register the necessary services for the maintenance job | ||
/// </summary> | ||
public static class MaintenanceServiceExtensions | ||
{ | ||
/// <summary> | ||
/// Adds the dependencies for the maintenance service | ||
/// </summary> | ||
/// <param name="services">The service collection</param> | ||
/// <returns>The enhanced service collection</returns> | ||
public static IServiceCollection AddMaintenanceService(this IServiceCollection services) => | ||
services | ||
.AddTransient<MaintenanceService>() | ||
.AddTransient<IDateTimeProvider, UtcDateTimeProvider>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.