@@ -609,21 +609,24 @@
// SMTP
_smtpenabled = SettingService.GetSetting(settings, "SMTPEnabled", "False");
- _smtphost = SettingService.GetSetting(settings, "SMTPHost", string.Empty);
- _smtpport = SettingService.GetSetting(settings, "SMTPPort", string.Empty);
- _smtpssl = SettingService.GetSetting(settings, "SMTPSSL", "False");
- _smtpauthentication = SettingService.GetSetting(settings, "SMTPAuthentication", "Basic");
- _smtpusername = SettingService.GetSetting(settings, "SMTPUsername", string.Empty);
- _smtppassword = SettingService.GetSetting(settings, "SMTPPassword", string.Empty);
- _togglesmtppassword = SharedLocalizer["ShowPassword"];
- _smtpauthority = SettingService.GetSetting(settings, "SMTPAuthority", string.Empty);
- _smtpclientid = SettingService.GetSetting(settings, "SMTPClientId", string.Empty);
- _smtpclientsecret = SettingService.GetSetting(settings, "SMTPClientSecret", string.Empty);
- _togglesmtpclientsecret = SharedLocalizer["ShowPassword"];
- _smtpscopes = SettingService.GetSetting(settings, "SMTPScopes", string.Empty);
- _smtpsender = SettingService.GetSetting(settings, "SMTPSender", string.Empty);
- _smtprelay = SettingService.GetSetting(settings, "SMTPRelay", "False");
- _retention = int.Parse(SettingService.GetSetting(settings, "NotificationRetention", "30"));
+ if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
+ {
+ _smtphost = SettingService.GetSetting(settings, "SMTPHost", string.Empty);
+ _smtpport = SettingService.GetSetting(settings, "SMTPPort", string.Empty);
+ _smtpssl = SettingService.GetSetting(settings, "SMTPSSL", "False");
+ _smtpauthentication = SettingService.GetSetting(settings, "SMTPAuthentication", "Basic");
+ _smtpusername = SettingService.GetSetting(settings, "SMTPUsername", string.Empty);
+ _smtppassword = SettingService.GetSetting(settings, "SMTPPassword", string.Empty);
+ _togglesmtppassword = SharedLocalizer["ShowPassword"];
+ _smtpauthority = SettingService.GetSetting(settings, "SMTPAuthority", string.Empty);
+ _smtpclientid = SettingService.GetSetting(settings, "SMTPClientId", string.Empty);
+ _smtpclientsecret = SettingService.GetSetting(settings, "SMTPClientSecret", string.Empty);
+ _togglesmtpclientsecret = SharedLocalizer["ShowPassword"];
+ _smtpscopes = SettingService.GetSetting(settings, "SMTPScopes", string.Empty);
+ _smtpsender = SettingService.GetSetting(settings, "SMTPSender", string.Empty);
+ _smtprelay = SettingService.GetSetting(settings, "SMTPRelay", "False");
+ _retention = int.Parse(SettingService.GetSetting(settings, "NotificationRetention", "30"));
+ }
// PWA
_pwaisenabled = site.PwaIsEnabled.ToString();
@@ -800,21 +803,23 @@
// SMTP
var settings = await SettingService.GetSiteSettingsAsync(site.SiteId);
- settings = SettingService.SetSetting(settings, "SMTPHost", _smtphost, true);
- settings = SettingService.SetSetting(settings, "SMTPPort", _smtpport, true);
- settings = SettingService.SetSetting(settings, "SMTPSSL", _smtpssl, true);
- settings = SettingService.SetSetting(settings, "SMTPAuthentication", _smtpauthentication, true);
- settings = SettingService.SetSetting(settings, "SMTPUsername", _smtpusername, true);
- settings = SettingService.SetSetting(settings, "SMTPPassword", _smtppassword, true);
- settings = SettingService.SetSetting(settings, "SMTPAuthority", _smtpauthority, true);
- settings = SettingService.SetSetting(settings, "SMTPClientId", _smtpclientid, true);
- settings = SettingService.SetSetting(settings, "SMTPClientSecret", _smtpclientsecret, true);
- settings = SettingService.SetSetting(settings, "SMTPScopes", _smtpscopes, true);
- settings = SettingService.SetSetting(settings, "SMTPSender", _smtpsender, true);
- settings = SettingService.SetSetting(settings, "SMTPRelay", _smtprelay, true);
settings = SettingService.SetSetting(settings, "SMTPEnabled", _smtpenabled, true);
- settings = SettingService.SetSetting(settings, "SiteGuid", _siteguid, true);
- settings = SettingService.SetSetting(settings, "NotificationRetention", _retention.ToString(), true);
+ if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
+ {
+ settings = SettingService.SetSetting(settings, "SMTPHost", _smtphost, true);
+ settings = SettingService.SetSetting(settings, "SMTPPort", _smtpport, true);
+ settings = SettingService.SetSetting(settings, "SMTPSSL", _smtpssl, true);
+ settings = SettingService.SetSetting(settings, "SMTPAuthentication", _smtpauthentication, true);
+ settings = SettingService.SetSetting(settings, "SMTPUsername", _smtpusername, true);
+ settings = SettingService.SetSetting(settings, "SMTPPassword", _smtppassword, true);
+ settings = SettingService.SetSetting(settings, "SMTPAuthority", _smtpauthority, true);
+ settings = SettingService.SetSetting(settings, "SMTPClientId", _smtpclientid, true);
+ settings = SettingService.SetSetting(settings, "SMTPClientSecret", _smtpclientsecret, true);
+ settings = SettingService.SetSetting(settings, "SMTPScopes", _smtpscopes, true);
+ settings = SettingService.SetSetting(settings, "SMTPSender", _smtpsender, true);
+ settings = SettingService.SetSetting(settings, "SMTPRelay", _smtprelay, true);
+ settings = SettingService.SetSetting(settings, "NotificationRetention", _retention.ToString(), true);
+ }
//cookie consent
settings = SettingService.SetSetting(settings, "CookieConsent", _cookieconsent);
@@ -822,6 +827,7 @@
// functionality
settings = SettingService.SetSetting(settings, "TextEditor", _textEditor);
+ settings = SettingService.SetSetting(settings, "SiteGuid", _siteguid, true);
await SettingService.UpdateSiteSettingsAsync(settings, site.SiteId);
await logger.LogInformation("Site Settings Saved {Site}", site);
From 4cf1b5c0e7df4af0f6ab08f58afa8259e515fcfb Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Thu, 7 Aug 2025 15:07:33 -0400
Subject: [PATCH 06/14] add missing delete setting API method
---
.../Controllers/SettingController.cs | 33 +++++++++++++++----
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/Oqtane.Server/Controllers/SettingController.cs b/Oqtane.Server/Controllers/SettingController.cs
index b2db2def..1c42ab7d 100644
--- a/Oqtane.Server/Controllers/SettingController.cs
+++ b/Oqtane.Server/Controllers/SettingController.cs
@@ -89,7 +89,7 @@ namespace Oqtane.Controllers
// suppress unauthorized visitor logging as it is usually caused by clients that do not support cookies or private browsing sessions
if (entityName != EntityNames.Visitor)
{
- _logger.Log(LogLevel.Error, this, LogFunction.Read, "User Not Authorized To Access Settings {EntityName} {EntityId}", entityName, entityId);
+ _logger.Log(LogLevel.Error, this, LogFunction.Read, "User Not Authorized To Access Settings For EntityName {EntityName} And EntityId {EntityId}", entityName, entityId);
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
}
@@ -101,7 +101,7 @@ namespace Oqtane.Controllers
public Setting Get(int id, string entityName)
{
Setting setting = _settings.GetSetting(entityName, id);
- if (IsAuthorized(setting.EntityName, setting.EntityId, PermissionNames.View))
+ if (setting != null && IsAuthorized(setting.EntityName, setting.EntityId, PermissionNames.View))
{
if (FilterPrivate(entityName, id) && setting.IsPrivate)
{
@@ -113,7 +113,7 @@ namespace Oqtane.Controllers
{
if (setting != null && entityName != EntityNames.Visitor)
{
- _logger.Log(LogLevel.Error, this, LogFunction.Read, "User Not Authorized To Access Setting {EntityName} {SettingId}", entityName, id);
+ _logger.Log(LogLevel.Error, this, LogFunction.Read, "User Not Authorized To Access SettingId {SettingId} For EntityName {EntityName} ", id, entityName);
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
else
@@ -201,12 +201,12 @@ namespace Oqtane.Controllers
}
else
{
- _logger.Log(LogLevel.Error, this, LogFunction.Update, "User Not Authorized To Add Or Update Setting {EntityName} {EntityId} {SettingName}", entityName, entityId, settingName);
+ _logger.Log(LogLevel.Error, this, LogFunction.Update, "User Not Authorized To Add Or Update Setting For EntityName {EntityName} EntityId {EntityId} SettingName {SettingName}", entityName, entityId, settingName);
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
}
- // DELETE api//site/1/settingname
+ // DELETE api//site/1/settingname/settingid
[HttpDelete("{entityName}/{entityId}/{settingName}")]
public void Delete(string entityName, int entityId, string settingName)
{
@@ -221,7 +221,28 @@ namespace Oqtane.Controllers
{
if (entityName != EntityNames.Visitor)
{
- _logger.Log(LogLevel.Error, this, LogFunction.Delete, "Setting Does Not Exist Or User Not Authorized To Delete Setting For Entity {EntityName} Id {EntityId} Name {SettingName}", entityName, entityId, settingName);
+ _logger.Log(LogLevel.Error, this, LogFunction.Delete, "Setting Does Not Exist Or User Not Authorized To Delete Setting For EntityName {EntityName} EntityId {EntityId} SettingName {SettingName}", entityName, entityId, settingName);
+ HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
+ }
+ }
+ }
+
+ // DELETE api//1/site
+ [HttpDelete("{id}/{entityName}")]
+ public void Delete(int id, string entityName)
+ {
+ Setting setting = _settings.GetSetting(entityName, id);
+ if (setting != null && IsAuthorized(setting.EntityName, setting.EntityId, PermissionNames.Edit))
+ {
+ _settings.DeleteSetting(setting.EntityName, setting.SettingId);
+ AddSyncEvent(setting.EntityName, setting.EntityId, setting.SettingId, SyncEventActions.Delete);
+ _logger.Log(LogLevel.Information, this, LogFunction.Delete, "Setting Deleted {Setting}", setting);
+ }
+ else
+ {
+ if (entityName != EntityNames.Visitor)
+ {
+ _logger.Log(LogLevel.Error, this, LogFunction.Delete, "Setting Does Not Exist Or User Not Authorized To Delete Setting For SettingId {SettingId} For EntityName {EntityName} ", id, entityName);
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
}
From d7eb0dc50999d2eefcf54aae3727d8c86151a120 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Mon, 11 Aug 2025 16:22:22 -0400
Subject: [PATCH 07/14] fix issue with Admin Site Template
---
.../SiteTemplates/AdminSiteTemplate.cs | 68 +++++++++----------
1 file changed, 32 insertions(+), 36 deletions(-)
diff --git a/Oqtane.Server/Infrastructure/SiteTemplates/AdminSiteTemplate.cs b/Oqtane.Server/Infrastructure/SiteTemplates/AdminSiteTemplate.cs
index ddd1e784..730b0d87 100644
--- a/Oqtane.Server/Infrastructure/SiteTemplates/AdminSiteTemplate.cs
+++ b/Oqtane.Server/Infrastructure/SiteTemplates/AdminSiteTemplate.cs
@@ -579,6 +579,34 @@ namespace Oqtane.Infrastructure.SiteTemplates
}
}
});
+ pageTemplates.Add(new PageTemplate
+ {
+ Name = "Language Management",
+ Parent = "Admin",
+ Order = 21,
+ Path = "admin/languages",
+ Icon = Icons.Text,
+ IsNavigation = false,
+ IsPersonalizable = false,
+ PermissionList = new List
+ {
+ new Permission(PermissionNames.View, RoleNames.Admin, true),
+ new Permission(PermissionNames.Edit, RoleNames.Admin, true)
+ },
+ PageTemplateModules = new List
+ {
+ new PageTemplateModule
+ {
+ ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Languages.Index).ToModuleDefinitionName(), Title = "Language Management", Pane = PaneNames.Default,
+ PermissionList = new List
+ {
+ new Permission(PermissionNames.View, RoleNames.Admin, true),
+ new Permission(PermissionNames.Edit, RoleNames.Admin, true)
+ },
+ Content = ""
+ }
+ }
+ });
// host pages (order starts at 51)
pageTemplates.Add(new PageTemplate
@@ -694,42 +722,10 @@ namespace Oqtane.Infrastructure.SiteTemplates
}
});
pageTemplates.Add(new PageTemplate
- {
- Name = "Language Management",
- Parent = "Admin",
- Order = 59,
- Path = "admin/languages",
- Icon = Icons.Text,
- IsNavigation = false,
- IsPersonalizable = false,
- PermissionList = new List
- {
- new Permission(PermissionNames.View, RoleNames.Host, true),
- new Permission(PermissionNames.Edit, RoleNames.Host, true),
- new Permission(PermissionNames.View, RoleNames.Admin, true),
- new Permission(PermissionNames.Edit, RoleNames.Admin, true)
- },
- PageTemplateModules = new List
- {
- new PageTemplateModule
- {
- ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Languages.Index).ToModuleDefinitionName(), Title = "Language Management", Pane = PaneNames.Default,
- PermissionList = new List
- {
- new Permission(PermissionNames.View, RoleNames.Host, true),
- new Permission(PermissionNames.Edit, RoleNames.Host, true),
- new Permission(PermissionNames.View, RoleNames.Admin, true),
- new Permission(PermissionNames.Edit, RoleNames.Admin, true)
- },
- Content = ""
- }
- }
- });
- pageTemplates.Add(new PageTemplate
{
Name = "Scheduled Jobs",
Parent = "Admin",
- Order = 61,
+ Order = 59,
Path = "admin/jobs",
Icon = Icons.Timer,
IsNavigation = false,
@@ -757,7 +753,7 @@ namespace Oqtane.Infrastructure.SiteTemplates
{
Name = "Sql Management",
Parent = "Admin",
- Order = 63,
+ Order = 61,
Path = "admin/sql",
Icon = Icons.Spreadsheet,
IsNavigation = false,
@@ -785,7 +781,7 @@ namespace Oqtane.Infrastructure.SiteTemplates
{
Name = "System Info",
Parent = "Admin",
- Order = 65,
+ Order = 63,
Path = "admin/system",
Icon = Icons.MedicalCross,
IsNavigation = false,
@@ -813,7 +809,7 @@ namespace Oqtane.Infrastructure.SiteTemplates
{
Name = "System Update",
Parent = "Admin",
- Order = 67,
+ Order = 65,
Path = "admin/update",
Icon = Icons.Aperture,
IsNavigation = false,
From b3f6194fda5f506cc6669168a07a2f785918ff90 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Mon, 11 Aug 2025 16:36:09 -0400
Subject: [PATCH 08/14] consolidate interface and implementation classes
---
Oqtane.Server/Repository/AliasRepository.cs | 11 ++++++++
.../IDBContextDependencies.cs | 0
Oqtane.Server/Repository/FileRepository.cs | 16 +++++++++++-
Oqtane.Server/Repository/FolderRepository.cs | 14 ++++++++++-
.../Repository/Interfaces/IAliasRepository.cs | 16 ------------
.../Repository/Interfaces/IFileRepository.cs | 20 ---------------
.../Interfaces/IFolderRepository.cs | 18 -------------
.../Interfaces/IJobLogRepository.cs | 15 -----------
.../Repository/Interfaces/IJobRepository.cs | 15 -----------
.../Interfaces/ILanguageRepository.cs | 18 -------------
.../Repository/Interfaces/ILogRepository.cs | 13 ----------
.../Interfaces/IModuleDefinitionRepository.cs | 15 -----------
.../Interfaces/IModuleRepository.cs | 17 -------------
.../Interfaces/INotificationRepository.cs | 18 -------------
.../Interfaces/IPageModuleRepository.cs | 16 ------------
.../Repository/Interfaces/IPageRepository.cs | 16 ------------
.../Interfaces/IPermissionRepository.cs | 21 ----------------
.../Interfaces/IProfileRepository.cs | 15 -----------
.../Repository/Interfaces/IRoleRepository.cs | 16 ------------
.../Interfaces/ISearchContentRepository.cs | 24 ------------------
.../Interfaces/ISettingRepository.cs | 21 ----------------
.../Repository/Interfaces/ISiteRepository.cs | 19 --------------
.../Interfaces/ISiteTemplateRepository.cs | 10 --------
.../Repository/Interfaces/ISqlRepository.cs | 25 -------------------
.../Interfaces/ITenantRepository.cs | 14 -----------
.../Repository/Interfaces/ITenantResolver.cs | 11 --------
.../Repository/Interfaces/IThemeRepository.cs | 14 -----------
.../Interfaces/IUrlMappingRepository.cs | 18 -------------
.../Repository/Interfaces/IUserRepository.cs | 17 -------------
.../Interfaces/IUserRoleRepository.cs | 20 ---------------
.../Interfaces/IVisitorRepository.cs | 17 -------------
Oqtane.Server/Repository/JobLogRepository.cs | 10 ++++++++
Oqtane.Server/Repository/JobRepository.cs | 10 ++++++++
.../Repository/LanguageRepository.cs | 9 +++++++
Oqtane.Server/Repository/LogRepository.cs | 8 ++++++
.../Repository/ModuleDefinitionRepository.cs | 10 ++++++++
Oqtane.Server/Repository/ModuleRepository.cs | 13 +++++++++-
.../Repository/NotificationRepository.cs | 13 ++++++++++
.../Repository/PageModuleRepository.cs | 13 ++++++++--
Oqtane.Server/Repository/PageRepository.cs | 12 ++++++++-
.../Repository/PermissionRepository.cs | 14 +++++++++++
Oqtane.Server/Repository/ProfileRepository.cs | 9 +++++++
Oqtane.Server/Repository/RoleRepository.cs | 13 ++++++++--
.../Repository/SearchContentRepository.cs | 20 ++++++++++++---
Oqtane.Server/Repository/SettingRepository.cs | 15 +++++++++++
Oqtane.Server/Repository/SiteRepository.cs | 14 ++++++++++-
.../Repository/SiteTemplateRepository.cs | 5 ++++
Oqtane.Server/Repository/SqlRepository.cs | 19 ++++++++++++++
Oqtane.Server/Repository/TenantRepository.cs | 8 ++++++
Oqtane.Server/Repository/TenantResolver.cs | 6 +++++
Oqtane.Server/Repository/ThemeRepository.cs | 10 +++++++-
.../Repository/UrlMappingRepository.cs | 12 +++++++++
Oqtane.Server/Repository/UserRepository.cs | 13 +++++++++-
.../Repository/UserRoleRepository.cs | 15 +++++++++++
Oqtane.Server/Repository/VisitorRepository.cs | 11 ++++++++
55 files changed, 309 insertions(+), 473 deletions(-)
rename Oqtane.Server/Repository/{Interfaces => Context}/IDBContextDependencies.cs (100%)
delete mode 100644 Oqtane.Server/Repository/Interfaces/IAliasRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IFileRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IFolderRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IJobLogRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IJobRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ILanguageRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ILogRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IModuleDefinitionRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IModuleRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/INotificationRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IPageModuleRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IPageRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IPermissionRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IProfileRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IRoleRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ISearchContentRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ISettingRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ISiteRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ISiteTemplateRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ISqlRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ITenantRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ITenantResolver.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IThemeRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IUrlMappingRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IUserRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IUserRoleRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IVisitorRepository.cs
diff --git a/Oqtane.Server/Repository/AliasRepository.cs b/Oqtane.Server/Repository/AliasRepository.cs
index e7dbd1c6..38b9925a 100644
--- a/Oqtane.Server/Repository/AliasRepository.cs
+++ b/Oqtane.Server/Repository/AliasRepository.cs
@@ -8,6 +8,17 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IAliasRepository
+ {
+ IEnumerable GetAliases();
+ Alias AddAlias(Alias alias);
+ Alias UpdateAlias(Alias alias);
+ Alias GetAlias(int aliasId);
+ Alias GetAlias(int aliasId, bool tracking);
+ Alias GetAlias(string url);
+ void DeleteAlias(int aliasId);
+ }
+
public class AliasRepository : IAliasRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/Interfaces/IDBContextDependencies.cs b/Oqtane.Server/Repository/Context/IDBContextDependencies.cs
similarity index 100%
rename from Oqtane.Server/Repository/Interfaces/IDBContextDependencies.cs
rename to Oqtane.Server/Repository/Context/IDBContextDependencies.cs
diff --git a/Oqtane.Server/Repository/FileRepository.cs b/Oqtane.Server/Repository/FileRepository.cs
index fedbdc6e..def51519 100644
--- a/Oqtane.Server/Repository/FileRepository.cs
+++ b/Oqtane.Server/Repository/FileRepository.cs
@@ -2,7 +2,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.EntityFrameworkCore;
-using Oqtane.Extensions;
using Oqtane.Infrastructure;
using Oqtane.Models;
using Oqtane.Shared;
@@ -10,6 +9,21 @@ using File = Oqtane.Models.File;
namespace Oqtane.Repository
{
+ public interface IFileRepository
+ {
+ IEnumerable GetFiles(int folderId);
+ IEnumerable GetFiles(int folderId, bool tracking);
+ File AddFile(File file);
+ File UpdateFile(File file);
+ File GetFile(int fileId);
+ File GetFile(int fileId, bool tracking);
+ File GetFile(int folderId, string fileName);
+ File GetFile(int siteId, string folderPath, string fileName);
+ void DeleteFile(int fileId);
+ string GetFilePath(int fileId);
+ string GetFilePath(File file);
+ }
+
public class FileRepository : IFileRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/FolderRepository.cs b/Oqtane.Server/Repository/FolderRepository.cs
index c4dfb8ed..d00a6a7c 100644
--- a/Oqtane.Server/Repository/FolderRepository.cs
+++ b/Oqtane.Server/Repository/FolderRepository.cs
@@ -2,13 +2,25 @@ using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
-using Oqtane.Extensions;
using Oqtane.Infrastructure;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IFolderRepository
+ {
+ IEnumerable GetFolders(int siteId);
+ Folder AddFolder(Folder folder);
+ Folder UpdateFolder(Folder folder);
+ Folder GetFolder(int folderId);
+ Folder GetFolder(int folderId, bool tracking);
+ Folder GetFolder(int siteId, string path);
+ void DeleteFolder(int folderId);
+ string GetFolderPath(int folderId);
+ string GetFolderPath(Folder folder);
+ }
+
public class FolderRepository : IFolderRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/Interfaces/IAliasRepository.cs b/Oqtane.Server/Repository/Interfaces/IAliasRepository.cs
deleted file mode 100644
index 81a42d68..00000000
--- a/Oqtane.Server/Repository/Interfaces/IAliasRepository.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IAliasRepository
- {
- IEnumerable GetAliases();
- Alias AddAlias(Alias alias);
- Alias UpdateAlias(Alias alias);
- Alias GetAlias(int aliasId);
- Alias GetAlias(int aliasId, bool tracking);
- Alias GetAlias(string url);
- void DeleteAlias(int aliasId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IFileRepository.cs b/Oqtane.Server/Repository/Interfaces/IFileRepository.cs
deleted file mode 100644
index 214b03d8..00000000
--- a/Oqtane.Server/Repository/Interfaces/IFileRepository.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IFileRepository
- {
- IEnumerable GetFiles(int folderId);
- IEnumerable GetFiles(int folderId, bool tracking);
- File AddFile(File file);
- File UpdateFile(File file);
- File GetFile(int fileId);
- File GetFile(int fileId, bool tracking);
- File GetFile(int folderId, string fileName);
- File GetFile(int siteId, string folderPath, string fileName);
- void DeleteFile(int fileId);
- string GetFilePath(int fileId);
- string GetFilePath(File file);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IFolderRepository.cs b/Oqtane.Server/Repository/Interfaces/IFolderRepository.cs
deleted file mode 100644
index dba914a7..00000000
--- a/Oqtane.Server/Repository/Interfaces/IFolderRepository.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IFolderRepository
- {
- IEnumerable GetFolders(int siteId);
- Folder AddFolder(Folder folder);
- Folder UpdateFolder(Folder folder);
- Folder GetFolder(int folderId);
- Folder GetFolder(int folderId, bool tracking);
- Folder GetFolder(int siteId, string path);
- void DeleteFolder(int folderId);
- string GetFolderPath(int folderId);
- string GetFolderPath(Folder folder);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IJobLogRepository.cs b/Oqtane.Server/Repository/Interfaces/IJobLogRepository.cs
deleted file mode 100644
index 2c092e7a..00000000
--- a/Oqtane.Server/Repository/Interfaces/IJobLogRepository.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IJobLogRepository
- {
- IEnumerable GetJobLogs();
- IEnumerable GetJobLogs(int jobId);
- JobLog AddJobLog(JobLog jobLog);
- JobLog UpdateJobLog(JobLog jobLog);
- JobLog GetJobLog(int jobLogId);
- void DeleteJobLog(int jobLogId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IJobRepository.cs b/Oqtane.Server/Repository/Interfaces/IJobRepository.cs
deleted file mode 100644
index e45b0231..00000000
--- a/Oqtane.Server/Repository/Interfaces/IJobRepository.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IJobRepository
- {
- IEnumerable GetJobs();
- Job AddJob(Job job);
- Job UpdateJob(Job job);
- Job GetJob(int jobId);
- Job GetJob(int jobId, bool tracking);
- void DeleteJob(int jobId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ILanguageRepository.cs b/Oqtane.Server/Repository/Interfaces/ILanguageRepository.cs
deleted file mode 100644
index 14619121..00000000
--- a/Oqtane.Server/Repository/Interfaces/ILanguageRepository.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ILanguageRepository
- {
- IEnumerable GetLanguages(int siteId);
-
- Language AddLanguage(Language language);
-
- void UpdateLanguage(Language language);
-
- Language GetLanguage(int languageId);
-
- void DeleteLanguage(int languageId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ILogRepository.cs b/Oqtane.Server/Repository/Interfaces/ILogRepository.cs
deleted file mode 100644
index 918785f2..00000000
--- a/Oqtane.Server/Repository/Interfaces/ILogRepository.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ILogRepository
- {
- IEnumerable GetLogs(int siteId, string level, string function, int rows);
- Log GetLog(int logId);
- void AddLog(Log log);
- int DeleteLogs(int siteId, int age);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IModuleDefinitionRepository.cs b/Oqtane.Server/Repository/Interfaces/IModuleDefinitionRepository.cs
deleted file mode 100644
index eb4f45d9..00000000
--- a/Oqtane.Server/Repository/Interfaces/IModuleDefinitionRepository.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IModuleDefinitionRepository
- {
- IEnumerable GetModuleDefinitions();
- IEnumerable GetModuleDefinitions(int siteId);
- ModuleDefinition GetModuleDefinition(int moduleDefinitionId, int siteId);
- void UpdateModuleDefinition(ModuleDefinition moduleDefinition);
- void DeleteModuleDefinition(int moduleDefinitionId);
- ModuleDefinition FilterModuleDefinition(ModuleDefinition moduleDefinition);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IModuleRepository.cs b/Oqtane.Server/Repository/Interfaces/IModuleRepository.cs
deleted file mode 100644
index 08923ecd..00000000
--- a/Oqtane.Server/Repository/Interfaces/IModuleRepository.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IModuleRepository
- {
- IEnumerable GetModules(int siteId);
- Module AddModule(Module module);
- Module UpdateModule(Module module);
- Module GetModule(int moduleId);
- Module GetModule(int moduleId, bool tracking);
- void DeleteModule(int moduleId);
- string ExportModule(int moduleId);
- bool ImportModule(int moduleId, string content);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/INotificationRepository.cs b/Oqtane.Server/Repository/Interfaces/INotificationRepository.cs
deleted file mode 100644
index 948d7b53..00000000
--- a/Oqtane.Server/Repository/Interfaces/INotificationRepository.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface INotificationRepository
- {
- IEnumerable GetNotifications(int siteId, int fromUserId, int toUserId);
- IEnumerable GetNotifications(int siteId, int fromUserId, int toUserId, int count, bool isRead);
- int GetNotificationCount(int siteId, int fromUserId, int toUserId, bool isRead);
- Notification AddNotification(Notification notification);
- Notification UpdateNotification(Notification notification);
- Notification GetNotification(int notificationId);
- Notification GetNotification(int notificationId, bool tracking);
- void DeleteNotification(int notificationId);
- int DeleteNotifications(int siteId, int age);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IPageModuleRepository.cs b/Oqtane.Server/Repository/Interfaces/IPageModuleRepository.cs
deleted file mode 100644
index a3ac66e5..00000000
--- a/Oqtane.Server/Repository/Interfaces/IPageModuleRepository.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IPageModuleRepository
- {
- IEnumerable GetPageModules(int siteId);
- PageModule AddPageModule(PageModule pageModule);
- PageModule UpdatePageModule(PageModule pageModule);
- PageModule GetPageModule(int pageModuleId);
- PageModule GetPageModule(int pageModuleId, bool tracking);
- PageModule GetPageModule(int pageId, int moduleId);
- void DeletePageModule(int pageModuleId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IPageRepository.cs b/Oqtane.Server/Repository/Interfaces/IPageRepository.cs
deleted file mode 100644
index 12caca4c..00000000
--- a/Oqtane.Server/Repository/Interfaces/IPageRepository.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IPageRepository
- {
- IEnumerable GetPages(int siteId);
- Page AddPage(Page page);
- Page UpdatePage(Page page);
- Page GetPage(int pageId);
- Page GetPage(int pageId, bool tracking);
- Page GetPage(string path, int siteId);
- void DeletePage(int pageId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IPermissionRepository.cs b/Oqtane.Server/Repository/Interfaces/IPermissionRepository.cs
deleted file mode 100644
index a3dc7358..00000000
--- a/Oqtane.Server/Repository/Interfaces/IPermissionRepository.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Collections.Generic;
-using System.Security.Policy;
-using Oqtane.Models;
-
-// ReSharper disable once CheckNamespace
-namespace Oqtane.Repository
-{
- public interface IPermissionRepository
-{
- IEnumerable GetPermissions(int siteId, string entityName);
- IEnumerable GetPermissions(int siteId, string entityName, string permissionName);
- IEnumerable GetPermissions(int siteId, string entityName, int entityId);
- IEnumerable GetPermissions(int siteId, string entityName, int entityId, string permissionName);
- Permission AddPermission(Permission permission);
- Permission UpdatePermission(Permission permission);
- void UpdatePermissions(int siteId, string entityName, int entityId, List permissions);
- Permission GetPermission(int permissionId);
- void DeletePermission(int permissionId);
- void DeletePermissions(int siteId, string entityName, int entityId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IProfileRepository.cs b/Oqtane.Server/Repository/Interfaces/IProfileRepository.cs
deleted file mode 100644
index 95405c96..00000000
--- a/Oqtane.Server/Repository/Interfaces/IProfileRepository.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IProfileRepository
- {
- IEnumerable GetProfiles(int siteId);
- Profile AddProfile(Profile profile);
- Profile UpdateProfile(Profile profile);
- Profile GetProfile(int profileId);
- Profile GetProfile(int profileId, bool tracking);
- void DeleteProfile(int profileId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IRoleRepository.cs b/Oqtane.Server/Repository/Interfaces/IRoleRepository.cs
deleted file mode 100644
index 1b2ea0e4..00000000
--- a/Oqtane.Server/Repository/Interfaces/IRoleRepository.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IRoleRepository
- {
- IEnumerable GetRoles(int siteId);
- IEnumerable GetRoles(int siteId, bool includeGlobalRoles);
- Role AddRole(Role role);
- Role UpdateRole(Role role);
- Role GetRole(int roleId);
- Role GetRole(int roleId, bool tracking);
- void DeleteRole(int roleId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ISearchContentRepository.cs b/Oqtane.Server/Repository/Interfaces/ISearchContentRepository.cs
deleted file mode 100644
index 022c8012..00000000
--- a/Oqtane.Server/Repository/Interfaces/ISearchContentRepository.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ISearchContentRepository
- {
- Task> GetSearchContentsAsync(SearchQuery searchQuery);
- SearchContent AddSearchContent(SearchContent searchContent);
- void DeleteSearchContent(int searchContentId);
- void DeleteSearchContent(string entityName, string entryId);
- void DeleteSearchContent(string uniqueKey);
- void DeleteAllSearchContent(int siteId);
-
- SearchWord GetSearchWord(string word);
- SearchWord AddSearchWord(SearchWord searchWord);
-
- IEnumerable GetSearchContentWords(int searchContentId);
- SearchContentWord AddSearchContentWord(SearchContentWord searchContentWord);
- SearchContentWord UpdateSearchContentWord(SearchContentWord searchContentWord);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ISettingRepository.cs b/Oqtane.Server/Repository/Interfaces/ISettingRepository.cs
deleted file mode 100644
index 7315f633..00000000
--- a/Oqtane.Server/Repository/Interfaces/ISettingRepository.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-using Oqtane.Shared;
-
-namespace Oqtane.Repository
-{
- public interface ISettingRepository
- {
- IEnumerable GetSettings(string entityName);
- IEnumerable GetSettings(string entityName, int entityId);
- IEnumerable GetSettings(string entityName1, int entityId1, string entityName2, int entityId2);
- Setting AddSetting(Setting setting);
- Setting UpdateSetting(Setting setting);
- Setting GetSetting(string entityName, int settingId);
- Setting GetSetting(string entityName, int entityId, string settingName);
- void DeleteSetting(string entityName, int settingId);
- void DeleteSettings(string entityName, int entityId);
- string GetSettingValue(IEnumerable settings, string settingName, string defaultValue);
- string GetSettingValue(string entityName, int entityId, string settingName, string defaultValue);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ISiteRepository.cs b/Oqtane.Server/Repository/Interfaces/ISiteRepository.cs
deleted file mode 100644
index 3ef66893..00000000
--- a/Oqtane.Server/Repository/Interfaces/ISiteRepository.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ISiteRepository
- {
- IEnumerable GetSites();
- Site AddSite(Site site);
- Site UpdateSite(Site site);
- Site GetSite(int siteId);
- Site GetSite(int siteId, bool tracking);
- void DeleteSite(int siteId);
-
- void InitializeSite(Alias alias);
- void CreatePages(Site site, List pageTemplates, Alias alias);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ISiteTemplateRepository.cs b/Oqtane.Server/Repository/Interfaces/ISiteTemplateRepository.cs
deleted file mode 100644
index 659226ff..00000000
--- a/Oqtane.Server/Repository/Interfaces/ISiteTemplateRepository.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ISiteTemplateRepository
- {
- IEnumerable GetSiteTemplates();
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ISqlRepository.cs b/Oqtane.Server/Repository/Interfaces/ISqlRepository.cs
deleted file mode 100644
index d4d87201..00000000
--- a/Oqtane.Server/Repository/Interfaces/ISqlRepository.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System.Data;
-using System.Reflection;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ISqlRepository
- {
- void ExecuteScript(Tenant tenant, string script);
-
- bool ExecuteScript(string connectionString, string databaseType, Assembly assembly, string filename);
-
- bool ExecuteScript(Tenant tenant, Assembly assembly, string filename);
-
- int ExecuteNonQuery(Tenant tenant, string query);
-
- int ExecuteNonQuery(string connectionString, string databaseType, string query);
-
- IDataReader ExecuteReader(Tenant tenant, string query);
-
- IDataReader ExecuteReader(string DBType, string DBConnectionString, string query);
-
- string GetScriptFromAssembly(Assembly assembly, string fileName);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ITenantRepository.cs b/Oqtane.Server/Repository/Interfaces/ITenantRepository.cs
deleted file mode 100644
index 5993eb63..00000000
--- a/Oqtane.Server/Repository/Interfaces/ITenantRepository.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ITenantRepository
- {
- IEnumerable GetTenants();
- Tenant AddTenant(Tenant tenant);
- Tenant UpdateTenant(Tenant tenant);
- Tenant GetTenant(int tenantId);
- void DeleteTenant(int tenantId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ITenantResolver.cs b/Oqtane.Server/Repository/Interfaces/ITenantResolver.cs
deleted file mode 100644
index bc3a48eb..00000000
--- a/Oqtane.Server/Repository/Interfaces/ITenantResolver.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- // class deprecated and replaced by ITenantManager
- public interface ITenantResolver
- {
- Alias GetAlias();
- Tenant GetTenant();
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IThemeRepository.cs b/Oqtane.Server/Repository/Interfaces/IThemeRepository.cs
deleted file mode 100644
index b8d98aee..00000000
--- a/Oqtane.Server/Repository/Interfaces/IThemeRepository.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IThemeRepository
- {
- IEnumerable GetThemes();
- Theme GetTheme(int themeId, int siteId);
- void UpdateTheme(Theme theme);
- void DeleteTheme(int themeId);
- List FilterThemes(List themes);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IUrlMappingRepository.cs b/Oqtane.Server/Repository/Interfaces/IUrlMappingRepository.cs
deleted file mode 100644
index ca056484..00000000
--- a/Oqtane.Server/Repository/Interfaces/IUrlMappingRepository.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IUrlMappingRepository
- {
- IEnumerable GetUrlMappings(int siteId, bool isMapped);
- UrlMapping AddUrlMapping(UrlMapping urlMapping);
- UrlMapping UpdateUrlMapping(UrlMapping urlMapping);
- UrlMapping GetUrlMapping(int urlMappingId);
- UrlMapping GetUrlMapping(int urlMappingId, bool tracking);
- UrlMapping GetUrlMapping(int siteId, string url);
- void DeleteUrlMapping(int urlMappingId);
- int DeleteUrlMappings(int siteId, int age);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IUserRepository.cs b/Oqtane.Server/Repository/Interfaces/IUserRepository.cs
deleted file mode 100644
index 89ed4204..00000000
--- a/Oqtane.Server/Repository/Interfaces/IUserRepository.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IUserRepository
- {
- IEnumerable GetUsers();
- User AddUser(User user);
- User UpdateUser(User user);
- User GetUser(int userId);
- User GetUser(int userId, bool tracking);
- User GetUser(string username);
- User GetUser(string username, string email);
- void DeleteUser(int userId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IUserRoleRepository.cs b/Oqtane.Server/Repository/Interfaces/IUserRoleRepository.cs
deleted file mode 100644
index 7db22b4e..00000000
--- a/Oqtane.Server/Repository/Interfaces/IUserRoleRepository.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IUserRoleRepository
- {
- IEnumerable GetUserRoles(int siteId);
- IEnumerable GetUserRoles(int userId, int siteId);
- IEnumerable GetUserRoles(string roleName, int siteId);
- UserRole AddUserRole(UserRole userRole);
- UserRole UpdateUserRole(UserRole userRole);
- UserRole GetUserRole(int userRoleId);
- UserRole GetUserRole(int userRoleId, bool tracking);
- UserRole GetUserRole(int userId, int roleId);
- UserRole GetUserRole(int userId, int roleId, bool tracking);
- void DeleteUserRole(int userRoleId);
- void DeleteUserRoles(int userId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IVisitorRepository.cs b/Oqtane.Server/Repository/Interfaces/IVisitorRepository.cs
deleted file mode 100644
index 9100e0b8..00000000
--- a/Oqtane.Server/Repository/Interfaces/IVisitorRepository.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IVisitorRepository
- {
- IEnumerable GetVisitors(int siteId, DateTime fromDate);
- Visitor AddVisitor(Visitor visitor);
- Visitor UpdateVisitor(Visitor visitor);
- Visitor GetVisitor(int visitorId);
- Visitor GetVisitor(int siteId, string IPAddress);
- void DeleteVisitor(int visitorId);
- int DeleteVisitors(int siteId, int age);
- }
-}
diff --git a/Oqtane.Server/Repository/JobLogRepository.cs b/Oqtane.Server/Repository/JobLogRepository.cs
index ee234c27..523ac356 100644
--- a/Oqtane.Server/Repository/JobLogRepository.cs
+++ b/Oqtane.Server/Repository/JobLogRepository.cs
@@ -5,6 +5,16 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface IJobLogRepository
+ {
+ IEnumerable GetJobLogs();
+ IEnumerable GetJobLogs(int jobId);
+ JobLog AddJobLog(JobLog jobLog);
+ JobLog UpdateJobLog(JobLog jobLog);
+ JobLog GetJobLog(int jobLogId);
+ void DeleteJobLog(int jobLogId);
+ }
+
public class JobLogRepository : IJobLogRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/JobRepository.cs b/Oqtane.Server/Repository/JobRepository.cs
index 6d56c5c3..823bdcc8 100644
--- a/Oqtane.Server/Repository/JobRepository.cs
+++ b/Oqtane.Server/Repository/JobRepository.cs
@@ -7,6 +7,16 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface IJobRepository
+ {
+ IEnumerable GetJobs();
+ Job AddJob(Job job);
+ Job UpdateJob(Job job);
+ Job GetJob(int jobId);
+ Job GetJob(int jobId, bool tracking);
+ void DeleteJob(int jobId);
+ }
+
public class JobRepository : IJobRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/LanguageRepository.cs b/Oqtane.Server/Repository/LanguageRepository.cs
index f31a61eb..f074c9a1 100644
--- a/Oqtane.Server/Repository/LanguageRepository.cs
+++ b/Oqtane.Server/Repository/LanguageRepository.cs
@@ -5,6 +5,15 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface ILanguageRepository
+ {
+ IEnumerable GetLanguages(int siteId);
+ Language AddLanguage(Language language);
+ void UpdateLanguage(Language language);
+ Language GetLanguage(int languageId);
+ void DeleteLanguage(int languageId);
+ }
+
public class LanguageRepository : ILanguageRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/LogRepository.cs b/Oqtane.Server/Repository/LogRepository.cs
index 12f43a21..f41e0d97 100644
--- a/Oqtane.Server/Repository/LogRepository.cs
+++ b/Oqtane.Server/Repository/LogRepository.cs
@@ -6,6 +6,14 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface ILogRepository
+ {
+ IEnumerable GetLogs(int siteId, string level, string function, int rows);
+ Log GetLog(int logId);
+ void AddLog(Log log);
+ int DeleteLogs(int siteId, int age);
+ }
+
public class LogRepository : ILogRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/ModuleDefinitionRepository.cs b/Oqtane.Server/Repository/ModuleDefinitionRepository.cs
index 204578e4..b073f5d5 100644
--- a/Oqtane.Server/Repository/ModuleDefinitionRepository.cs
+++ b/Oqtane.Server/Repository/ModuleDefinitionRepository.cs
@@ -13,6 +13,16 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IModuleDefinitionRepository
+ {
+ IEnumerable GetModuleDefinitions();
+ IEnumerable GetModuleDefinitions(int siteId);
+ ModuleDefinition GetModuleDefinition(int moduleDefinitionId, int siteId);
+ void UpdateModuleDefinition(ModuleDefinition moduleDefinition);
+ void DeleteModuleDefinition(int moduleDefinitionId);
+ ModuleDefinition FilterModuleDefinition(ModuleDefinition moduleDefinition);
+ }
+
public class ModuleDefinitionRepository : IModuleDefinitionRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/ModuleRepository.cs b/Oqtane.Server/Repository/ModuleRepository.cs
index 5885ae9c..18cbd05f 100644
--- a/Oqtane.Server/Repository/ModuleRepository.cs
+++ b/Oqtane.Server/Repository/ModuleRepository.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Text.Json;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
-using Oqtane.Extensions;
using Oqtane.Models;
using Oqtane.Modules;
using Oqtane.Shared;
@@ -12,6 +11,18 @@ using Module = Oqtane.Models.Module;
namespace Oqtane.Repository
{
+ public interface IModuleRepository
+ {
+ IEnumerable GetModules(int siteId);
+ Module AddModule(Module module);
+ Module UpdateModule(Module module);
+ Module GetModule(int moduleId);
+ Module GetModule(int moduleId, bool tracking);
+ void DeleteModule(int moduleId);
+ string ExportModule(int moduleId);
+ bool ImportModule(int moduleId, string content);
+ }
+
public class ModuleRepository : IModuleRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/NotificationRepository.cs b/Oqtane.Server/Repository/NotificationRepository.cs
index b4603f29..1c20faee 100644
--- a/Oqtane.Server/Repository/NotificationRepository.cs
+++ b/Oqtane.Server/Repository/NotificationRepository.cs
@@ -6,6 +6,19 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface INotificationRepository
+ {
+ IEnumerable GetNotifications(int siteId, int fromUserId, int toUserId);
+ IEnumerable GetNotifications(int siteId, int fromUserId, int toUserId, int count, bool isRead);
+ int GetNotificationCount(int siteId, int fromUserId, int toUserId, bool isRead);
+ Notification AddNotification(Notification notification);
+ Notification UpdateNotification(Notification notification);
+ Notification GetNotification(int notificationId);
+ Notification GetNotification(int notificationId, bool tracking);
+ void DeleteNotification(int notificationId);
+ int DeleteNotifications(int siteId, int age);
+ }
+
public class NotificationRepository : INotificationRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/PageModuleRepository.cs b/Oqtane.Server/Repository/PageModuleRepository.cs
index a6f81b69..239a9a67 100644
--- a/Oqtane.Server/Repository/PageModuleRepository.cs
+++ b/Oqtane.Server/Repository/PageModuleRepository.cs
@@ -1,13 +1,22 @@
using System.Collections.Generic;
using System.Linq;
-using System.Reflection;
using Microsoft.EntityFrameworkCore;
-using Oqtane.Extensions;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IPageModuleRepository
+ {
+ IEnumerable GetPageModules(int siteId);
+ PageModule AddPageModule(PageModule pageModule);
+ PageModule UpdatePageModule(PageModule pageModule);
+ PageModule GetPageModule(int pageModuleId);
+ PageModule GetPageModule(int pageModuleId, bool tracking);
+ PageModule GetPageModule(int pageId, int moduleId);
+ void DeletePageModule(int pageModuleId);
+ }
+
public class PageModuleRepository : IPageModuleRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/PageRepository.cs b/Oqtane.Server/Repository/PageRepository.cs
index f400226f..5f99c150 100644
--- a/Oqtane.Server/Repository/PageRepository.cs
+++ b/Oqtane.Server/Repository/PageRepository.cs
@@ -2,12 +2,22 @@ using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
-using Oqtane.Extensions;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IPageRepository
+ {
+ IEnumerable GetPages(int siteId);
+ Page AddPage(Page page);
+ Page UpdatePage(Page page);
+ Page GetPage(int pageId);
+ Page GetPage(int pageId, bool tracking);
+ Page GetPage(string path, int siteId);
+ void DeletePage(int pageId);
+ }
+
public class PageRepository : IPageRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/PermissionRepository.cs b/Oqtane.Server/Repository/PermissionRepository.cs
index 1a3b0395..b4f7530d 100644
--- a/Oqtane.Server/Repository/PermissionRepository.cs
+++ b/Oqtane.Server/Repository/PermissionRepository.cs
@@ -8,6 +8,20 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IPermissionRepository
+ {
+ IEnumerable GetPermissions(int siteId, string entityName);
+ IEnumerable GetPermissions(int siteId, string entityName, string permissionName);
+ IEnumerable GetPermissions(int siteId, string entityName, int entityId);
+ IEnumerable GetPermissions(int siteId, string entityName, int entityId, string permissionName);
+ Permission AddPermission(Permission permission);
+ Permission UpdatePermission(Permission permission);
+ void UpdatePermissions(int siteId, string entityName, int entityId, List permissions);
+ Permission GetPermission(int permissionId);
+ void DeletePermission(int permissionId);
+ void DeletePermissions(int siteId, string entityName, int entityId);
+ }
+
public class PermissionRepository : IPermissionRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/ProfileRepository.cs b/Oqtane.Server/Repository/ProfileRepository.cs
index 8e0b895a..b5749951 100644
--- a/Oqtane.Server/Repository/ProfileRepository.cs
+++ b/Oqtane.Server/Repository/ProfileRepository.cs
@@ -5,6 +5,15 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface IProfileRepository
+ {
+ IEnumerable GetProfiles(int siteId);
+ Profile AddProfile(Profile profile);
+ Profile UpdateProfile(Profile profile);
+ Profile GetProfile(int profileId);
+ Profile GetProfile(int profileId, bool tracking);
+ void DeleteProfile(int profileId);
+ }
public class ProfileRepository : IProfileRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/RoleRepository.cs b/Oqtane.Server/Repository/RoleRepository.cs
index 3d16eb35..05de9047 100644
--- a/Oqtane.Server/Repository/RoleRepository.cs
+++ b/Oqtane.Server/Repository/RoleRepository.cs
@@ -2,11 +2,20 @@ using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Oqtane.Models;
-using Oqtane.Modules.Admin.Users;
-using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IRoleRepository
+ {
+ IEnumerable GetRoles(int siteId);
+ IEnumerable GetRoles(int siteId, bool includeGlobalRoles);
+ Role AddRole(Role role);
+ Role UpdateRole(Role role);
+ Role GetRole(int roleId);
+ Role GetRole(int roleId, bool tracking);
+ void DeleteRole(int roleId);
+ }
+
public class RoleRepository : IRoleRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/SearchContentRepository.cs b/Oqtane.Server/Repository/SearchContentRepository.cs
index 5aa214ae..cb2eeee9 100644
--- a/Oqtane.Server/Repository/SearchContentRepository.cs
+++ b/Oqtane.Server/Repository/SearchContentRepository.cs
@@ -1,17 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Oqtane.Extensions;
-using Oqtane.Infrastructure;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface ISearchContentRepository
+ {
+ Task> GetSearchContentsAsync(SearchQuery searchQuery);
+ SearchContent AddSearchContent(SearchContent searchContent);
+ void DeleteSearchContent(int searchContentId);
+ void DeleteSearchContent(string entityName, string entryId);
+ void DeleteSearchContent(string uniqueKey);
+ void DeleteAllSearchContent(int siteId);
+
+ SearchWord GetSearchWord(string word);
+ SearchWord AddSearchWord(SearchWord searchWord);
+
+ IEnumerable GetSearchContentWords(int searchContentId);
+ SearchContentWord AddSearchContentWord(SearchContentWord searchContentWord);
+ SearchContentWord UpdateSearchContentWord(SearchContentWord searchContentWord);
+ }
+
public class SearchContentRepository : ISearchContentRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/SettingRepository.cs b/Oqtane.Server/Repository/SettingRepository.cs
index 16a33811..13c48819 100644
--- a/Oqtane.Server/Repository/SettingRepository.cs
+++ b/Oqtane.Server/Repository/SettingRepository.cs
@@ -8,6 +8,21 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface ISettingRepository
+ {
+ IEnumerable GetSettings(string entityName);
+ IEnumerable GetSettings(string entityName, int entityId);
+ IEnumerable GetSettings(string entityName1, int entityId1, string entityName2, int entityId2);
+ Setting AddSetting(Setting setting);
+ Setting UpdateSetting(Setting setting);
+ Setting GetSetting(string entityName, int settingId);
+ Setting GetSetting(string entityName, int entityId, string settingName);
+ void DeleteSetting(string entityName, int settingId);
+ void DeleteSettings(string entityName, int entityId);
+ string GetSettingValue(IEnumerable settings, string settingName, string defaultValue);
+ string GetSettingValue(string entityName, int entityId, string settingName, string defaultValue);
+ }
+
public class SettingRepository : ISettingRepository
{
private readonly IDbContextFactory _tenantContextFactory;
diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs
index 48620ead..530c536c 100644
--- a/Oqtane.Server/Repository/SiteRepository.cs
+++ b/Oqtane.Server/Repository/SiteRepository.cs
@@ -9,12 +9,24 @@ using Oqtane.Enums;
using Oqtane.Infrastructure;
using Oqtane.Models;
using Oqtane.Modules;
-using Oqtane.Modules.Admin.Modules;
using Oqtane.Shared;
using Module = Oqtane.Models.Module;
namespace Oqtane.Repository
{
+ public interface ISiteRepository
+ {
+ IEnumerable GetSites();
+ Site AddSite(Site site);
+ Site UpdateSite(Site site);
+ Site GetSite(int siteId);
+ Site GetSite(int siteId, bool tracking);
+ void DeleteSite(int siteId);
+
+ void InitializeSite(Alias alias);
+ void CreatePages(Site site, List pageTemplates, Alias alias);
+ }
+
public class SiteRepository : ISiteRepository
{
private readonly IDbContextFactory _factory;
diff --git a/Oqtane.Server/Repository/SiteTemplateRepository.cs b/Oqtane.Server/Repository/SiteTemplateRepository.cs
index db16600c..fc327e6d 100644
--- a/Oqtane.Server/Repository/SiteTemplateRepository.cs
+++ b/Oqtane.Server/Repository/SiteTemplateRepository.cs
@@ -9,6 +9,11 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface ISiteTemplateRepository
+ {
+ IEnumerable GetSiteTemplates();
+ }
+
public class SiteTemplateRepository : ISiteTemplateRepository
{
private readonly IServiceProvider _serviceProvider;
diff --git a/Oqtane.Server/Repository/SqlRepository.cs b/Oqtane.Server/Repository/SqlRepository.cs
index a4689fcf..30102eea 100644
--- a/Oqtane.Server/Repository/SqlRepository.cs
+++ b/Oqtane.Server/Repository/SqlRepository.cs
@@ -12,6 +12,25 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface ISqlRepository
+ {
+ void ExecuteScript(Tenant tenant, string script);
+
+ bool ExecuteScript(string connectionString, string databaseType, Assembly assembly, string filename);
+
+ bool ExecuteScript(Tenant tenant, Assembly assembly, string filename);
+
+ int ExecuteNonQuery(Tenant tenant, string query);
+
+ int ExecuteNonQuery(string connectionString, string databaseType, string query);
+
+ IDataReader ExecuteReader(Tenant tenant, string query);
+
+ IDataReader ExecuteReader(string DBType, string DBConnectionString, string query);
+
+ string GetScriptFromAssembly(Assembly assembly, string fileName);
+ }
+
public class SqlRepository : ISqlRepository
{
private IConfigurationRoot _config;
diff --git a/Oqtane.Server/Repository/TenantRepository.cs b/Oqtane.Server/Repository/TenantRepository.cs
index 25687f48..d5b83117 100644
--- a/Oqtane.Server/Repository/TenantRepository.cs
+++ b/Oqtane.Server/Repository/TenantRepository.cs
@@ -8,6 +8,14 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface ITenantRepository
+ {
+ IEnumerable GetTenants();
+ Tenant AddTenant(Tenant tenant);
+ Tenant UpdateTenant(Tenant tenant);
+ Tenant GetTenant(int tenantId);
+ void DeleteTenant(int tenantId);
+ }
public class TenantRepository : ITenantRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/TenantResolver.cs b/Oqtane.Server/Repository/TenantResolver.cs
index 793006d3..f678a586 100644
--- a/Oqtane.Server/Repository/TenantResolver.cs
+++ b/Oqtane.Server/Repository/TenantResolver.cs
@@ -4,6 +4,12 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
// class deprecated and replaced by ITenantManager
+ public interface ITenantResolver
+ {
+ Alias GetAlias();
+ Tenant GetTenant();
+ }
+
public class TenantResolver : ITenantResolver
{
private readonly ITenantManager _tenantManager;
diff --git a/Oqtane.Server/Repository/ThemeRepository.cs b/Oqtane.Server/Repository/ThemeRepository.cs
index fd010b8c..56331a37 100644
--- a/Oqtane.Server/Repository/ThemeRepository.cs
+++ b/Oqtane.Server/Repository/ThemeRepository.cs
@@ -4,7 +4,6 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
-using System.Reflection.Metadata;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using Oqtane.Infrastructure;
@@ -14,6 +13,15 @@ using Oqtane.Themes;
namespace Oqtane.Repository
{
+ public interface IThemeRepository
+ {
+ IEnumerable GetThemes();
+ Theme GetTheme(int themeId, int siteId);
+ void UpdateTheme(Theme theme);
+ void DeleteTheme(int themeId);
+ List FilterThemes(List themes);
+ }
+
public class ThemeRepository : IThemeRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/UrlMappingRepository.cs b/Oqtane.Server/Repository/UrlMappingRepository.cs
index 82f747da..9c2efbb6 100644
--- a/Oqtane.Server/Repository/UrlMappingRepository.cs
+++ b/Oqtane.Server/Repository/UrlMappingRepository.cs
@@ -6,6 +6,18 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface IUrlMappingRepository
+ {
+ IEnumerable GetUrlMappings(int siteId, bool isMapped);
+ UrlMapping AddUrlMapping(UrlMapping urlMapping);
+ UrlMapping UpdateUrlMapping(UrlMapping urlMapping);
+ UrlMapping GetUrlMapping(int urlMappingId);
+ UrlMapping GetUrlMapping(int urlMappingId, bool tracking);
+ UrlMapping GetUrlMapping(int siteId, string url);
+ void DeleteUrlMapping(int urlMappingId);
+ int DeleteUrlMappings(int siteId, int age);
+ }
+
public class UrlMappingRepository : IUrlMappingRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/UserRepository.cs b/Oqtane.Server/Repository/UserRepository.cs
index 4858e7c3..b9f3c7df 100644
--- a/Oqtane.Server/Repository/UserRepository.cs
+++ b/Oqtane.Server/Repository/UserRepository.cs
@@ -2,11 +2,22 @@ using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Oqtane.Models;
-using Oqtane.Modules.Admin.Users;
using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IUserRepository
+ {
+ IEnumerable GetUsers();
+ User AddUser(User user);
+ User UpdateUser(User user);
+ User GetUser(int userId);
+ User GetUser(int userId, bool tracking);
+ User GetUser(string username);
+ User GetUser(string username, string email);
+ void DeleteUser(int userId);
+ }
+
public class UserRepository : IUserRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/UserRoleRepository.cs b/Oqtane.Server/Repository/UserRoleRepository.cs
index 6956a20d..9c6a6256 100644
--- a/Oqtane.Server/Repository/UserRoleRepository.cs
+++ b/Oqtane.Server/Repository/UserRoleRepository.cs
@@ -10,6 +10,21 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IUserRoleRepository
+ {
+ IEnumerable GetUserRoles(int siteId);
+ IEnumerable GetUserRoles(int userId, int siteId);
+ IEnumerable GetUserRoles(string roleName, int siteId);
+ UserRole AddUserRole(UserRole userRole);
+ UserRole UpdateUserRole(UserRole userRole);
+ UserRole GetUserRole(int userRoleId);
+ UserRole GetUserRole(int userRoleId, bool tracking);
+ UserRole GetUserRole(int userId, int roleId);
+ UserRole GetUserRole(int userId, int roleId, bool tracking);
+ void DeleteUserRole(int userRoleId);
+ void DeleteUserRoles(int userId);
+ }
+
public class UserRoleRepository : IUserRoleRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/VisitorRepository.cs b/Oqtane.Server/Repository/VisitorRepository.cs
index d3583079..f18bd62a 100644
--- a/Oqtane.Server/Repository/VisitorRepository.cs
+++ b/Oqtane.Server/Repository/VisitorRepository.cs
@@ -6,6 +6,17 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface IVisitorRepository
+ {
+ IEnumerable GetVisitors(int siteId, DateTime fromDate);
+ Visitor AddVisitor(Visitor visitor);
+ Visitor UpdateVisitor(Visitor visitor);
+ Visitor GetVisitor(int visitorId);
+ Visitor GetVisitor(int siteId, string IPAddress);
+ void DeleteVisitor(int visitorId);
+ int DeleteVisitors(int siteId, int age);
+ }
+
public class VisitorRepository : IVisitorRepository
{
private readonly IDbContextFactory _dbContextFactory;
From 64b8b5d3c8576322b749ed979a3fd41d191a2eef Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Mon, 11 Aug 2025 16:53:32 -0400
Subject: [PATCH 09/14] consolidate Service interface and implementation
classes
---
Oqtane.Client/Services/AliasService.cs | 40 +++
.../Services/CookieConsentService.cs | 39 ++-
Oqtane.Client/Services/DatabaseService.cs | 12 +
Oqtane.Client/Services/FileService.cs | 98 ++++++-
Oqtane.Client/Services/FolderService.cs | 52 ++++
Oqtane.Client/Services/InstallationService.cs | 32 +++
.../Services/Interfaces/IAliasService.cs | 47 ---
.../Interfaces/ICookieConsentService.cs | 42 ---
.../Services/Interfaces/IDatabaseService.cs | 18 --
.../Services/Interfaces/IFileService.cs | 104 -------
.../Services/Interfaces/IFolderService.cs | 59 ----
.../Interfaces/IInstallationService.cs | 39 ---
.../Services/Interfaces/IJobLogService.cs | 26 --
.../Services/Interfaces/IJobService.cs | 61 ----
.../Services/Interfaces/ILanguageService.cs | 56 ----
.../Interfaces/ILocalizationCookieService.cs | 17 --
.../Interfaces/ILocalizationService.cs | 18 --
.../Services/Interfaces/ILogService.cs | 72 -----
.../Interfaces/IModuleDefinitionService.cs | 56 ----
.../Services/Interfaces/IModuleService.cs | 73 -----
.../Interfaces/INotificationService.cs | 70 -----
.../Interfaces/IOutputCacheService.cs | 18 --
.../Services/Interfaces/IPackageService.cs | 70 -----
.../Services/Interfaces/IPageModuleService.cs | 56 ----
.../Services/Interfaces/IPageService.cs | 71 -----
.../Services/Interfaces/IProfileService.cs | 48 ----
.../Services/Interfaces/IRoleService.cs | 57 ----
.../Interfaces/ISearchResultsService.cs | 13 -
.../Services/Interfaces/ISettingService.cs | 269 ------------------
.../Services/Interfaces/ISiteService.cs | 61 ----
.../Interfaces/ISiteTemplateService.cs | 18 --
.../Services/Interfaces/ISqlService.cs | 18 --
.../Services/Interfaces/ISyncService.cs | 19 --
.../Services/Interfaces/ISystemService.cs | 42 ---
.../Services/Interfaces/ITenantService.cs | 25 --
.../Services/Interfaces/IThemeService.cs | 94 ------
.../Services/Interfaces/ITimeZoneService.cs | 17 --
.../Services/Interfaces/IUrlMappingService.cs | 56 ----
.../Services/Interfaces/IUserRoleService.cs | 72 -----
.../Services/Interfaces/IUserService.cs | 171 -----------
.../Services/Interfaces/IVisitorService.cs | 29 --
Oqtane.Client/Services/JobLogService.cs | 21 +-
Oqtane.Client/Services/JobService.cs | 54 ++++
Oqtane.Client/Services/LanguageService.cs | 49 ++++
.../Services/LocalizationCookieService.cs | 13 +
Oqtane.Client/Services/LocalizationService.cs | 12 +
Oqtane.Client/Services/LogService.cs | 63 ++++
.../Services/ModuleDefinitionService.cs | 49 ++++
Oqtane.Client/Services/ModuleService.cs | 67 +++++
Oqtane.Client/Services/NotificationService.cs | 64 +++++
Oqtane.Client/Services/OutputCacheService.cs | 15 +-
Oqtane.Client/Services/PackageService.cs | 64 ++++-
Oqtane.Client/Services/PageModuleService.cs | 51 ++++
Oqtane.Client/Services/PageService.cs | 65 +++++
Oqtane.Client/Services/ProfileService.cs | 42 +++
Oqtane.Client/Services/RoleService.cs | 51 ++++
.../Services/SearchResultsService.cs | 7 +-
Oqtane.Client/Services/SettingService.cs | 262 +++++++++++++++++
Oqtane.Client/Services/SiteService.cs | 53 ++++
Oqtane.Client/Services/SiteTemplateService.cs | 12 +
Oqtane.Client/Services/SqlService.cs | 13 +
Oqtane.Client/Services/SyncService.cs | 13 +
Oqtane.Client/Services/SystemService.cs | 38 ++-
Oqtane.Client/Services/TenantService.cs | 19 ++
Oqtane.Client/Services/ThemeService.cs | 89 +++++-
Oqtane.Client/Services/TimeZoneService.cs | 12 +
Oqtane.Client/Services/UrlMappingService.cs | 50 ++++
Oqtane.Client/Services/UserRoleService.cs | 66 +++++
Oqtane.Client/Services/UserService.cs | 168 ++++++++++-
Oqtane.Client/Services/VisitorService.cs | 22 ++
70 files changed, 1763 insertions(+), 1996 deletions(-)
delete mode 100644 Oqtane.Client/Services/Interfaces/IAliasService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ICookieConsentService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IDatabaseService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IFileService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IFolderService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IInstallationService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IJobLogService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IJobService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ILanguageService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ILocalizationService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ILogService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IModuleService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/INotificationService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IOutputCacheService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IPackageService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IPageModuleService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IPageService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IProfileService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IRoleService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISearchResultsService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISettingService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISiteService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISiteTemplateService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISqlService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISyncService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISystemService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ITenantService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IThemeService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ITimeZoneService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IUrlMappingService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IUserRoleService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IUserService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IVisitorService.cs
diff --git a/Oqtane.Client/Services/AliasService.cs b/Oqtane.Client/Services/AliasService.cs
index 714f1061..0fb0600b 100644
--- a/Oqtane.Client/Services/AliasService.cs
+++ b/Oqtane.Client/Services/AliasService.cs
@@ -8,6 +8,46 @@ using Oqtane.Shared;
namespace Oqtane.Services
{
+ ///
+ /// Service to retrieve and store information.
+ ///
+ public interface IAliasService
+ {
+ ///
+ /// Get all aliases in the system
+ ///
+ ///
+ Task> GetAliasesAsync();
+
+ ///
+ /// Get a single alias
+ ///
+ /// The ID, not to be confused with a ID
+ ///
+ Task GetAliasAsync(int aliasId);
+
+ ///
+ /// Save another in the DB. It must already contain all the information incl. it belongs to.
+ ///
+ /// An to add.
+ ///
+ Task AddAliasAsync(Alias alias);
+
+ ///
+ /// Update an in the DB. Make sure the object is correctly filled, as it must update an existing record.
+ ///
+ /// The to update.
+ ///
+ Task UpdateAliasAsync(Alias alias);
+
+ ///
+ /// Remove an from the DB.
+ ///
+ /// The Alias ID, not to be confused with a Site ID.
+ ///
+ Task DeleteAliasAsync(int aliasId);
+ }
+
///
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class AliasService : ServiceBase, IAliasService
diff --git a/Oqtane.Client/Services/CookieConsentService.cs b/Oqtane.Client/Services/CookieConsentService.cs
index 83c2abc7..29b3a40d 100644
--- a/Oqtane.Client/Services/CookieConsentService.cs
+++ b/Oqtane.Client/Services/CookieConsentService.cs
@@ -1,13 +1,46 @@
-using Oqtane.Models;
using System.Threading.Tasks;
using System.Net.Http;
-using System;
using Oqtane.Documentation;
using Oqtane.Shared;
-using System.Globalization;
namespace Oqtane.Services
{
+ ///
+ /// Service to retrieve cookie consent information.
+ ///
+ public interface ICookieConsentService
+ {
+ ///
+ /// Get cookie consent bar actioned status
+ ///
+ ///
+ Task IsActionedAsync();
+
+ ///
+ /// Get cookie consent status
+ ///
+ ///
+ Task CanTrackAsync(bool optOut);
+
+ ///
+ /// create actioned cookie
+ ///
+ ///
+ Task CreateActionedCookieAsync();
+
+ ///
+ /// create consent cookie
+ ///
+ ///
+ Task CreateConsentCookieAsync();
+
+ ///
+ /// widhdraw consent cookie
+ ///
+ ///
+ Task WithdrawConsentCookieAsync();
+ }
+
///
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class CookieConsentService : ServiceBase, ICookieConsentService
diff --git a/Oqtane.Client/Services/DatabaseService.cs b/Oqtane.Client/Services/DatabaseService.cs
index bfa06865..3ca4a1a2 100644
--- a/Oqtane.Client/Services/DatabaseService.cs
+++ b/Oqtane.Client/Services/DatabaseService.cs
@@ -8,6 +8,18 @@ using Oqtane.Shared;
namespace Oqtane.Services
{
+ ///
+ /// Service to retrieve information.
+ ///
+ public interface IDatabaseService
+ {
+ ///
+ /// Returns a list of databases
+ ///
+ ///
+ Task> GetDatabasesAsync();
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class DatabaseService : ServiceBase, IDatabaseService
{
diff --git a/Oqtane.Client/Services/FileService.cs b/Oqtane.Client/Services/FileService.cs
index 9bc563c6..2b45455a 100644
--- a/Oqtane.Client/Services/FileService.cs
+++ b/Oqtane.Client/Services/FileService.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
@@ -10,6 +9,103 @@ using Oqtane.Shared;
namespace Oqtane.Services
{
+ ///
+ /// Service to get / create / upload / download files.
+ ///
+ public interface IFileService
+ {
+ ///
+ /// Get all s in the specified Folder
+ ///
+ /// The folder ID
+ ///
+ Task> GetFilesAsync(int folderId);
+
+ ///
+ /// Get all s in the specified folder.
+ ///
+ ///
+ /// The folder path relative to where the files are stored.
+ /// TODO: todoc verify exactly from where the folder path must start
+ ///
+ ///
+ Task> GetFilesAsync(string folder);
+
+ ///
+ /// Get one
+ ///
+ ///
+ ///
+ Task GetFileAsync(int fileId);
+
+ ///
+ /// Get a based on the and file name.
+ ///
+ /// Reference to the
+ /// name of the file
+ ///
+ ///
+ Task GetFileAsync(int folderId, string name);
+
+ ///
+ /// Add / store a record.
+ /// This does not contain the file contents.
+ ///
+ ///
+ ///
+ Task AddFileAsync(File file);
+
+ ///
+ /// Update a record.
+ /// Use this for rename a file or change some attributes.
+ /// This does not contain the file contents.
+ ///
+ ///
+ ///
+ Task UpdateFileAsync(File file);
+
+ ///
+ /// Delete a
+ ///
+ ///
+ ///
+ Task DeleteFileAsync(int fileId);
+
+ ///
+ /// Upload a file from a URL to a
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task UploadFileAsync(string url, int folderId, string name);
+
+ ///
+ /// Get / download a file (the body).
+ ///
+ /// Reference to a
+ /// The bytes of the file
+ Task DownloadFileAsync(int fileId);
+
+ ///
+ /// Retrieve a list of files from a and
+ ///
+ /// Reference to the
+ /// Path of the folder
+ /// TODO: todoc verify exactly from where the folder path must start
+ ///
+ ///
+ Task> GetFilesAsync(int siteId, string folderPath);
+
+ ///
+ /// Unzips the contents of a zip file
+ ///
+ /// Reference to the
+ ///
+ ///
+ Task UnzipFileAsync(int fileId);
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class FileService : ServiceBase, IFileService
{
diff --git a/Oqtane.Client/Services/FolderService.cs b/Oqtane.Client/Services/FolderService.cs
index 2ce045db..9a099777 100644
--- a/Oqtane.Client/Services/FolderService.cs
+++ b/Oqtane.Client/Services/FolderService.cs
@@ -9,6 +9,58 @@ using Oqtane.Documentation;
namespace Oqtane.Services
{
+ ///
+ /// Service to get / create / modify objects.
+ ///
+ public interface IFolderService
+ {
+ ///
+ /// Retrieve root folders of a
+ ///
+ ///
+ ///
+ Task> GetFoldersAsync(int siteId);
+
+ ///
+ /// Retrieve the information of one
+ ///
+ ///
+ ///
+ Task GetFolderAsync(int folderId);
+
+ ///
+ /// Create one Folder using a object.
+ ///
+ ///
+ ///
+ Task AddFolderAsync(Folder folder);
+
+ ///
+ /// Update the information about a
+ /// Use this to rename the folder etc.
+ ///
+ ///
+ ///
+ Task UpdateFolderAsync(Folder folder);
+
+ ///
+ /// Delete a
+ ///
+ /// Reference to a
+ ///
+ Task DeleteFolderAsync(int folderId);
+
+ ///
+ /// Get a of a based on the path.
+ ///
+ /// Reference to the
+ /// Path of the folder
+ /// TODO: todoc verify exactly from where the folder path must start
+ ///
+ ///
+ Task GetFolderAsync(int siteId, [NotNull] string folderPath);
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class FolderService : ServiceBase, IFolderService
{
diff --git a/Oqtane.Client/Services/InstallationService.cs b/Oqtane.Client/Services/InstallationService.cs
index e0c388c8..28b80c3b 100644
--- a/Oqtane.Client/Services/InstallationService.cs
+++ b/Oqtane.Client/Services/InstallationService.cs
@@ -10,6 +10,38 @@ using System.Linq;
namespace Oqtane.Services
{
+ ///
+ /// Service to manage (install master database / upgrade version / etc.) the installation
+ ///
+ public interface IInstallationService
+ {
+ ///
+ /// Returns a status/message object with the current installation state
+ ///
+ ///
+ Task IsInstalled();
+
+ ///
+ /// Starts the installation process
+ ///
+ /// connectionString, database type, alias etc.
+ /// internal status/message object
+ Task Install(InstallConfig config);
+
+ ///
+ /// Starts the upgrade process
+ ///
+ /// indicates if files should be backed up during upgrade
+ /// internal status/message object
+ Task Upgrade(bool backup);
+
+ ///
+ /// Restarts the installation
+ ///
+ /// internal status/message object
+ Task RestartAsync();
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class InstallationService : ServiceBase, IInstallationService
{
diff --git a/Oqtane.Client/Services/Interfaces/IAliasService.cs b/Oqtane.Client/Services/Interfaces/IAliasService.cs
deleted file mode 100644
index 6b002ec7..00000000
--- a/Oqtane.Client/Services/Interfaces/IAliasService.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using Oqtane.Models;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve and store information.
- ///
- public interface IAliasService
- {
- ///
- /// Get all aliases in the system
- ///
- ///
- Task> GetAliasesAsync();
-
- ///
- /// Get a single alias
- ///
- /// The ID, not to be confused with a ID
- ///
- Task GetAliasAsync(int aliasId);
-
- ///
- /// Save another in the DB. It must already contain all the information incl. it belongs to.
- ///
- /// An to add.
- ///
- Task AddAliasAsync(Alias alias);
-
- ///
- /// Update an in the DB. Make sure the object is correctly filled, as it must update an existing record.
- ///
- /// The to update.
- ///
- Task UpdateAliasAsync(Alias alias);
-
- ///
- /// Remove an from the DB.
- ///
- /// The Alias ID, not to be confused with a Site ID.
- ///
- Task DeleteAliasAsync(int aliasId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ICookieConsentService.cs b/Oqtane.Client/Services/Interfaces/ICookieConsentService.cs
deleted file mode 100644
index 71580d7e..00000000
--- a/Oqtane.Client/Services/Interfaces/ICookieConsentService.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using Oqtane.Models;
-using System;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve cookie consent information.
- ///
- public interface ICookieConsentService
- {
- ///
- /// Get cookie consent bar actioned status
- ///
- ///
- Task IsActionedAsync();
-
- ///
- /// Get cookie consent status
- ///
- ///
- Task CanTrackAsync(bool optOut);
-
- ///
- /// create actioned cookie
- ///
- ///
- Task CreateActionedCookieAsync();
-
- ///
- /// create consent cookie
- ///
- ///
- Task CreateConsentCookieAsync();
-
- ///
- /// widhdraw consent cookie
- ///
- ///
- Task WithdrawConsentCookieAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IDatabaseService.cs b/Oqtane.Client/Services/Interfaces/IDatabaseService.cs
deleted file mode 100644
index 94ca3f77..00000000
--- a/Oqtane.Client/Services/Interfaces/IDatabaseService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve information.
- ///
- public interface IDatabaseService
- {
- ///
- /// Returns a list of databases
- ///
- ///
- Task> GetDatabasesAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IFileService.cs b/Oqtane.Client/Services/Interfaces/IFileService.cs
deleted file mode 100644
index 451d3c4d..00000000
--- a/Oqtane.Client/Services/Interfaces/IFileService.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to get / create / upload / download files.
- ///
- public interface IFileService
- {
- ///
- /// Get all s in the specified Folder
- ///
- /// The folder ID
- ///
- Task> GetFilesAsync(int folderId);
-
- ///
- /// Get all s in the specified folder.
- ///
- ///
- /// The folder path relative to where the files are stored.
- /// TODO: todoc verify exactly from where the folder path must start
- ///
- ///
- Task> GetFilesAsync(string folder);
-
- ///
- /// Get one
- ///
- ///
- ///
- Task GetFileAsync(int fileId);
-
- ///
- /// Get a based on the and file name.
- ///
- /// Reference to the
- /// name of the file
- ///
- ///
- Task GetFileAsync(int folderId, string name);
-
- ///
- /// Add / store a record.
- /// This does not contain the file contents.
- ///
- ///
- ///
- Task AddFileAsync(File file);
-
- ///
- /// Update a record.
- /// Use this for rename a file or change some attributes.
- /// This does not contain the file contents.
- ///
- ///
- ///
- Task UpdateFileAsync(File file);
-
- ///
- /// Delete a
- ///
- ///
- ///
- Task DeleteFileAsync(int fileId);
-
- ///
- /// Upload a file from a URL to a
- ///
- ///
- ///
- ///
- ///
- Task UploadFileAsync(string url, int folderId, string name);
-
- ///
- /// Get / download a file (the body).
- ///
- /// Reference to a
- /// The bytes of the file
- Task DownloadFileAsync(int fileId);
-
- ///
- /// Retrieve a list of files from a and
- ///
- /// Reference to the
- /// Path of the folder
- /// TODO: todoc verify exactly from where the folder path must start
- ///
- ///
- Task> GetFilesAsync(int siteId, string folderPath);
-
- ///
- /// Unzips the contents of a zip file
- ///
- /// Reference to the
- ///
- ///
- Task UnzipFileAsync(int fileId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IFolderService.cs b/Oqtane.Client/Services/Interfaces/IFolderService.cs
deleted file mode 100644
index 35e96956..00000000
--- a/Oqtane.Client/Services/Interfaces/IFolderService.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to get / create / modify objects.
- ///
- public interface IFolderService
- {
- ///
- /// Retrieve root folders of a
- ///
- ///
- ///
- Task> GetFoldersAsync(int siteId);
-
- ///
- /// Retrieve the information of one
- ///
- ///
- ///
- Task GetFolderAsync(int folderId);
-
- ///
- /// Create one Folder using a object.
- ///
- ///
- ///
- Task AddFolderAsync(Folder folder);
-
- ///
- /// Update the information about a
- /// Use this to rename the folder etc.
- ///
- ///
- ///
- Task UpdateFolderAsync(Folder folder);
-
- ///
- /// Delete a
- ///
- /// Reference to a
- ///
- Task DeleteFolderAsync(int folderId);
-
- ///
- /// Get a of a based on the path.
- ///
- /// Reference to the
- /// Path of the folder
- /// TODO: todoc verify exactly from where the folder path must start
- ///
- ///
- Task GetFolderAsync(int siteId, [NotNull]string folderPath);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IInstallationService.cs b/Oqtane.Client/Services/Interfaces/IInstallationService.cs
deleted file mode 100644
index 1e2311ce..00000000
--- a/Oqtane.Client/Services/Interfaces/IInstallationService.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using Oqtane.Models;
-using System.Threading.Tasks;
-using Oqtane.Shared;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage (install master database / upgrade version / etc.) the installation
- ///
- public interface IInstallationService
- {
- ///
- /// Returns a status/message object with the current installation state
- ///
- ///
- Task IsInstalled();
-
- ///
- /// Starts the installation process
- ///
- /// connectionString, database type, alias etc.
- /// internal status/message object
- Task Install(InstallConfig config);
-
- ///
- /// Starts the upgrade process
- ///
- /// indicates if files should be backed up during upgrade
- /// internal status/message object
- Task Upgrade(bool backup);
-
- ///
- /// Restarts the installation
- ///
- /// internal status/message object
- Task RestartAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IJobLogService.cs b/Oqtane.Client/Services/Interfaces/IJobLogService.cs
deleted file mode 100644
index e6a10a20..00000000
--- a/Oqtane.Client/Services/Interfaces/IJobLogService.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to read the job schedule log
- ///
- public interface IJobLogService
- {
- ///
- /// Return a list of entries
- ///
- ///
- ///
- Task> GetJobLogsAsync(int jobId);
-
- ///
- /// Return a entry for the given Id
- ///
- ///
- ///
- Task GetJobLogAsync(int jobLogId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IJobService.cs b/Oqtane.Client/Services/Interfaces/IJobService.cs
deleted file mode 100644
index 984f4b59..00000000
--- a/Oqtane.Client/Services/Interfaces/IJobService.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage jobs ()
- ///
- public interface IJobService
- {
- ///
- /// Returns a list of all jobs
- ///
- ///
- Task> GetJobsAsync();
-
- ///
- /// Return a specific job
- ///
- ///
- ///
- Task GetJobAsync(int jobId);
-
- ///
- /// Adds a new job
- ///
- ///
- ///
- Task AddJobAsync(Job job);
-
- ///
- /// Updates an existing job
- ///
- ///
- ///
- Task UpdateJobAsync(Job job);
-
- ///
- /// Delete an existing job
- ///
- ///
- ///
- Task DeleteJobAsync(int jobId);
-
- ///
- /// Starts the given job
- ///
- ///
- ///
- Task StartJobAsync(int jobId);
-
- ///
- /// Stops the given job
- ///
- ///
- ///
- Task StopJobAsync(int jobId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILanguageService.cs b/Oqtane.Client/Services/Interfaces/ILanguageService.cs
deleted file mode 100644
index bf7aa9a7..00000000
--- a/Oqtane.Client/Services/Interfaces/ILanguageService.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Models;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage entries
- ///
- public interface ILanguageService
- {
- ///
- /// Returns a list of all available languages for the given
- ///
- ///
- ///
- Task> GetLanguagesAsync(int siteId);
-
- ///
- /// Returns a list of all available languages for the given and package
- ///
- ///
- ///
- ///
- Task> GetLanguagesAsync(int siteId, string packageName);
-
- ///
- /// Returns the given language
- ///
- ///
- ///
- Task GetLanguageAsync(int languageId);
-
- ///
- /// Adds the given language
- ///
- ///
- ///
- Task AddLanguageAsync(Language language);
-
- ///
- /// Edits the given language
- ///
- ///
- ///
- Task EditLanguageAsync(Language language);
-
- ///
- /// Deletes the given language
- ///
- ///
- ///
- Task DeleteLanguageAsync(int languageId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs b/Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs
deleted file mode 100644
index a422d432..00000000
--- a/Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to set localization cookie
- ///
- public interface ILocalizationCookieService
- {
- ///
- /// Set the localization cookie
- ///
- ///
- ///
- Task SetLocalizationCookieAsync(string culture);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILocalizationService.cs b/Oqtane.Client/Services/Interfaces/ILocalizationService.cs
deleted file mode 100644
index 543f8eba..00000000
--- a/Oqtane.Client/Services/Interfaces/ILocalizationService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Models;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve localizations ()
- ///
- public interface ILocalizationService
- {
- ///
- /// Returns a collection of supported cultures
- ///
- ///
- Task> GetCulturesAsync(bool installed);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILogService.cs b/Oqtane.Client/Services/Interfaces/ILogService.cs
deleted file mode 100644
index 28fe51b2..00000000
--- a/Oqtane.Client/Services/Interfaces/ILogService.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using Oqtane.Models;
-using Oqtane.Shared;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Enums;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve and store entries
- ///
- public interface ILogService
- {
- ///
- /// Returns a list of log entires for the given params
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetLogsAsync(int siteId, string level, string function, int rows);
-
- ///
- /// Returns a specific log entry for the given id
- ///
- ///
- ///
- Task GetLogAsync(int logId);
-
- ///
- /// Clear the entire logs of the given site.
- ///
- ///
- ///
- Task DeleteLogsAsync(int siteId);
-
- ///
- /// Creates a new log entry
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task Log(int? pageId, int? moduleId, int? userId, string category, string feature, LogFunction function, LogLevel level, Exception exception, string message, params object[] args);
-
- ///
- /// Creates a new log entry
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task Log(Alias alias, int? pageId, int? moduleId, int? userId, string category, string feature, LogFunction function, LogLevel level, Exception exception, string message, params object[] args);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs b/Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs
deleted file mode 100644
index 707728eb..00000000
--- a/Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage a
- ///
- public interface IModuleDefinitionService
- {
- ///
- /// Returns a list of module definitions for the given site
- ///
- ///
- ///
- Task> GetModuleDefinitionsAsync(int siteId);
-
- ///
- /// Returns a specific module definition
- ///
- ///
- ///
- ///
- Task GetModuleDefinitionAsync(int moduleDefinitionId, int siteId);
-
- ///
- /// Updates a existing module definition
- ///
- ///
- ///
- Task UpdateModuleDefinitionAsync(ModuleDefinition moduleDefinition);
-
- ///
- /// Deletes a module definition
- ///
- ///
- ///
- ///
- Task DeleteModuleDefinitionAsync(int moduleDefinitionId, int siteId);
-
- ///
- /// Creates a new module definition
- ///
- ///
- ///
- Task CreateModuleDefinitionAsync(ModuleDefinition moduleDefinition);
-
- ///
- /// Returns a list of module definition templates
- ///
- ///
- Task> GetModuleDefinitionTemplatesAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IModuleService.cs b/Oqtane.Client/Services/Interfaces/IModuleService.cs
deleted file mode 100644
index ea6beab3..00000000
--- a/Oqtane.Client/Services/Interfaces/IModuleService.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve and store modules ()
- ///
- public interface IModuleService
- {
- ///
- /// Returns a list of modules for the given site
- ///
- ///
- ///
- Task> GetModulesAsync(int siteId);
-
- ///
- /// Returns a specific module
- ///
- ///
- ///
- Task GetModuleAsync(int moduleId);
-
- ///
- /// Adds a new module
- ///
- ///
- ///
- Task AddModuleAsync(Module module);
-
- ///
- /// Updates an existing module
- ///
- ///
- ///
- Task UpdateModuleAsync(Module module);
-
- ///
- /// Deletes a module
- ///
- ///
- ///
- Task DeleteModuleAsync(int moduleId);
-
- ///
- /// Imports a module
- ///
- ///
- /// module in JSON format
- ///
- Task ImportModuleAsync(int moduleId, int pageId, string content);
-
- ///
- /// Exports a given module
- ///
- ///
- ///
- /// module content in JSON format
- Task ExportModuleAsync(int moduleId, int pageId);
-
- ///
- /// Exports a given module
- ///
- ///
- ///
- ///
- ///
- /// file id
- Task ExportModuleAsync(int moduleId, int pageId, int folderId, string filename);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/INotificationService.cs b/Oqtane.Client/Services/Interfaces/INotificationService.cs
deleted file mode 100644
index 760f4a36..00000000
--- a/Oqtane.Client/Services/Interfaces/INotificationService.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to store and retrieve notifications ()
- ///
- public interface INotificationService
- {
- ///
- /// Return a list of notifications
- ///
- ///
- ///
- ///
- ///
- Task> GetNotificationsAsync(int siteId, string direction, int userId);
-
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetNotificationsAsync(int siteId, string direction, int userId, int count, bool isRead);
-
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task GetNotificationCountAsync(int siteId, string direction, int userId, bool isRead);
-
- ///
- /// Returns a specific notifications
- ///
- ///
- ///
- Task GetNotificationAsync(int notificationId);
-
- ///
- /// Creates a new notification
- ///
- ///
- ///
- Task AddNotificationAsync(Notification notification);
-
- ///
- /// Updates a existing notification
- ///
- ///
- ///
- Task UpdateNotificationAsync(Notification notification);
-
- ///
- /// Deletes a notification
- ///
- ///
- ///
- Task DeleteNotificationAsync(int notificationId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IOutputCacheService.cs b/Oqtane.Client/Services/Interfaces/IOutputCacheService.cs
deleted file mode 100644
index 08826146..00000000
--- a/Oqtane.Client/Services/Interfaces/IOutputCacheService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to manage cache
- ///
- public interface IOutputCacheService
- {
- ///
- /// Evicts the output cache for a specific tag
- ///
- ///
- ///
- Task EvictByTag(string tag);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IPackageService.cs b/Oqtane.Client/Services/Interfaces/IPackageService.cs
deleted file mode 100644
index ff930ccc..00000000
--- a/Oqtane.Client/Services/Interfaces/IPackageService.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage packages ()
- ///
- public interface IPackageService
- {
- ///
- /// Returns a list of packages matching the given parameters
- ///
- ///
- ///
- Task> GetPackagesAsync(string type);
-
- ///
- /// Returns a list of packages matching the given parameters
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetPackagesAsync(string type, string search, string price, string package);
-
- ///
- /// Returns a list of packages matching the given parameters
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetPackagesAsync(string type, string search, string price, string package, string sort);
-
- ///
- /// Returns a list of packages based on installationid
- ///
- ///
- Task> GetPackageUpdatesAsync(string type);
-
- ///
- /// Returns a specific package
- ///
- ///
- ///
- ///
- Task GetPackageAsync(string packageId, string version, bool download);
-
- ///
- /// Downloads a specific package as .nupkg file
- ///
- ///
- ///
- ///
- ///
- Task DownloadPackageAsync(string packageId, string version);
-
- ///
- /// Installs all packages located in //TODO: 2dm where?
- ///
- ///
- Task InstallPackagesAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IPageModuleService.cs b/Oqtane.Client/Services/Interfaces/IPageModuleService.cs
deleted file mode 100644
index 77bc5d3b..00000000
--- a/Oqtane.Client/Services/Interfaces/IPageModuleService.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Oqtane.Models;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to store and retrieve a
- ///
- public interface IPageModuleService
- {
-
- ///
- /// Returns a specific page module
- ///
- ///
- ///
- Task GetPageModuleAsync(int pageModuleId);
-
- ///
- /// Return a specific page module
- ///
- ///
- ///
- ///
- Task GetPageModuleAsync(int pageId, int moduleId);
-
- ///
- /// Creates a new page module
- ///
- ///
- ///
- Task AddPageModuleAsync(PageModule pageModule);
-
- ///
- /// Updates a existing page module
- ///
- ///
- ///
- Task UpdatePageModuleAsync(PageModule pageModule);
-
- ///
- /// Updates order of all page modules in the given pane
- ///
- ///
- ///
- ///
- Task UpdatePageModuleOrderAsync(int pageId, string pane);
-
- ///
- /// Deletes a page module
- ///
- ///
- ///
- Task DeletePageModuleAsync(int pageModuleId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IPageService.cs b/Oqtane.Client/Services/Interfaces/IPageService.cs
deleted file mode 100644
index d4002c3f..00000000
--- a/Oqtane.Client/Services/Interfaces/IPageService.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Services to store and retrieve a
- ///
- public interface IPageService
- {
- ///
- /// Returns a list of pages
- ///
- ///
- ///
- Task> GetPagesAsync(int siteId);
-
- ///
- /// Returns a specific page
- ///
- ///
- ///
- Task GetPageAsync(int pageId);
-
- ///
- /// Returns a specific page by its defined path
- ///
- ///
- ///
- ///
- Task GetPageAsync(string path, int siteId);
-
- ///
- /// Adds a new page
- ///
- ///
- ///
- Task AddPageAsync(Page page);
-
- ///
- /// Adds a new page
- ///
- ///
- ///
- Task AddPageAsync(int pageId, int userId);
-
- ///
- /// Updates a existing page
- ///
- ///
- ///
- Task UpdatePageAsync(Page page);
-
- ///
- /// Updates order of all page modules in the given parent
- ///
- ///
- ///
- ///
- ///
- Task UpdatePageOrderAsync(int siteId, int pageId, int? parentId);
-
- ///
- /// Deletes a page
- ///
- ///
- ///
- Task DeletePageAsync(int pageId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IProfileService.cs b/Oqtane.Client/Services/Interfaces/IProfileService.cs
deleted file mode 100644
index 72c2506c..00000000
--- a/Oqtane.Client/Services/Interfaces/IProfileService.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to store and retrieve entries
- ///
- public interface IProfileService
- {
-
- ///
- /// Returns a list of profile entries
- ///
- ///
- ///
- Task> GetProfilesAsync(int siteId);
-
- ///
- /// Returns a specific profile entry
- ///
- ///
- ///
- Task GetProfileAsync(int profileId);
-
- ///
- /// Creates a new profile entry
- ///
- ///
- ///
- Task AddProfileAsync(Profile profile);
-
- ///
- /// Updates an existing profile entry
- ///
- ///
- ///
- Task UpdateProfileAsync(Profile profile);
-
- ///
- /// Deletes a profile entry
- ///
- ///
- ///
- Task DeleteProfileAsync(int profileId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IRoleService.cs b/Oqtane.Client/Services/Interfaces/IRoleService.cs
deleted file mode 100644
index 65d91023..00000000
--- a/Oqtane.Client/Services/Interfaces/IRoleService.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to manage s on a
- ///
- public interface IRoleService
- {
- ///
- /// Get all s of this .
- ///
- /// Will exclude global roles which are for all sites. To get those as well, use the overload
- ///
- /// ID-reference of a
- ///
- Task> GetRolesAsync(int siteId);
-
- ///
- /// Get roles of the and optionally include global Roles.
- ///
- /// ID-reference to a
- /// True if it should also include global roles. False will return the same data as just calling
- ///
- Task> GetRolesAsync(int siteId, bool includeGlobalRoles);
-
- ///
- /// Get one specific
- ///
- /// ID-reference of a
- ///
- Task GetRoleAsync(int roleId);
-
- ///
- /// Add / save a new to the database.
- ///
- ///
- ///
- Task AddRoleAsync(Role role);
-
- ///
- /// Update a in the database.
- ///
- ///
- ///
- Task UpdateRoleAsync(Role role);
-
- ///
- /// Delete / mark-as-deleted a in the database.
- ///
- /// ID-reference of a
- ///
- Task DeleteRoleAsync(int roleId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISearchResultsService.cs b/Oqtane.Client/Services/Interfaces/ISearchResultsService.cs
deleted file mode 100644
index 49eb02ec..00000000
--- a/Oqtane.Client/Services/Interfaces/ISearchResultsService.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Documentation;
-using Oqtane.Models;
-
-namespace Oqtane.Services
-{
- [PrivateApi("Mark SearchResults classes as private, since it's not very useful in the public docs")]
- public interface ISearchResultsService
- {
- Task GetSearchResultsAsync(SearchQuery searchQuery);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISettingService.cs b/Oqtane.Client/Services/Interfaces/ISettingService.cs
deleted file mode 100644
index 2f4c4b94..00000000
--- a/Oqtane.Client/Services/Interfaces/ISettingService.cs
+++ /dev/null
@@ -1,269 +0,0 @@
-using Oqtane.Models;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to manage s
- ///
- public interface ISettingService
- {
- ///
- /// Returns a key-value dictionary of all tenant settings
- ///
- ///
- Task> GetTenantSettingsAsync();
-
- ///
- /// Updates a tenant setting
- ///
- ///
- ///
- Task UpdateTenantSettingsAsync(Dictionary tenantSettings);
-
- ///
- /// Returns a key-value dictionary of all site settings for the given site
- ///
- ///
- ///
- Task> GetSiteSettingsAsync(int siteId);
-
- ///
- /// Updates a site setting
- ///
- ///
- ///
- ///
- Task UpdateSiteSettingsAsync(Dictionary siteSettings, int siteId);
-
- ///
- /// Clears site option cache
- ///
- ///
- Task ClearSiteSettingsCacheAsync();
-
- ///
- /// Returns a key-value dictionary of all page settings for the given page
- ///
- ///
- ///
- Task> GetPageSettingsAsync(int pageId);
-
- ///
- /// Updates a page setting
- ///
- ///
- ///
- ///
- Task UpdatePageSettingsAsync(Dictionary pageSettings, int pageId);
-
- ///
- /// Returns a key-value dictionary of all page module settings for the given page module
- ///
- ///
- ///
- Task> GetPageModuleSettingsAsync(int pageModuleId);
-
- ///
- /// Updates a page module setting
- ///
- ///
- ///
- ///
- Task UpdatePageModuleSettingsAsync(Dictionary pageModuleSettings, int pageModuleId);
-
- ///
- /// Returns a key-value dictionary of all module settings for the given module
- ///
- ///
- ///
- Task> GetModuleSettingsAsync(int moduleId);
-
- ///
- /// Updates a module setting
- ///
- ///
- ///
- ///
- Task UpdateModuleSettingsAsync(Dictionary moduleSettings, int moduleId);
-
- ///
- /// Returns a key-value dictionary of all module settings for the given module
- ///
- ///
- ///
- Task> GetModuleDefinitionSettingsAsync(int moduleDefinitionId);
-
- ///
- /// Updates a module setting
- ///
- ///
- ///
- ///
- Task UpdateModuleDefinitionSettingsAsync(Dictionary moduleDefinitionSettings, int moduleDefinitionId);
-
- ///
- /// Returns a key-value dictionary of all user settings for the given user
- ///
- ///
- ///
- Task> GetUserSettingsAsync(int userId);
-
- ///
- /// Updates a user setting
- ///
- ///
- ///
- ///
- Task UpdateUserSettingsAsync(Dictionary userSettings, int userId);
-
- ///
- /// Returns a key-value dictionary of all folder settings for the given folder
- ///
- ///
- ///
- Task> GetFolderSettingsAsync(int folderId);
-
-
- ///
- /// Updates a folder setting
- ///
- ///
- ///
- ///
- Task UpdateFolderSettingsAsync(Dictionary folderSettings, int folderId);
-
- ///
- /// Returns a key-value dictionary of all tenant settings
- ///
- ///
- Task> GetHostSettingsAsync();
-
- ///
- /// Updates a host setting
- ///
- ///
- ///
- Task UpdateHostSettingsAsync(Dictionary hostSettings);
-
- ///
- /// Returns a key-value dictionary of all settings for the given visitor
- ///
- ///
- ///
- Task> GetVisitorSettingsAsync(int visitorId);
-
- ///
- /// Updates a visitor setting
- ///
- ///
- ///
- ///
- Task UpdateVisitorSettingsAsync(Dictionary visitorSettings, int visitorId);
-
- ///
- /// Returns a key-value dictionary of all settings for the given entityName
- ///
- ///
- ///
- Task> GetSettingsAsync(string entityName, int entityId);
-
- ///
- /// Updates settings for a given entityName and Id
- ///
- ///
- ///
- ///
- ///
- Task UpdateSettingsAsync(Dictionary settings, string entityName, int entityId);
-
- ///
- /// Updates setting for a given entityName and Id
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task AddOrUpdateSettingAsync(string entityName, int entityId, string settingName, string settingValue, bool isPrivate);
-
- ///
- /// Returns a specific setting
- ///
- ///
- ///
- ///
- ///
- Task DeleteSettingAsync(string entityName, int entityId, string settingName);
-
- ///
- /// Returns a specific setting
- ///
- ///
- ///
- ///
- ///
- Task> GetSettingsAsync(string entityName, int entityId, string settingName);
-
- ///
- /// Returns a specific setting
- ///
- ///
- ///
- Task GetSettingAsync(string entityName, int settingId);
-
- ///