added basic xml comments to all Oqtane.Services interfaces
This commit is contained in:
parent
423a42d25b
commit
267ca178ed
|
@ -4,8 +4,15 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to retrieve <see cref="Database"/> information.
|
||||
/// </summary>
|
||||
public interface IDatabaseService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a list of databases
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<Database>> GetDatabasesAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,12 +4,42 @@ using Oqtane.Shared;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Service to manage (install master database / upgrade version / etc.) the installation
|
||||
/// </summary>
|
||||
public interface IInstallationService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a status/message object with the current installation state
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<Installation> IsInstalled();
|
||||
|
||||
/// <summary>
|
||||
/// Starts the installation process
|
||||
/// </summary>
|
||||
/// <param name="config">connectionString, database type, alias etc.</param>
|
||||
/// <returns>internal status/message object</returns>
|
||||
Task<Installation> Install(InstallConfig config);
|
||||
|
||||
/// <summary>
|
||||
/// Starts the upgrade process
|
||||
/// </summary>
|
||||
/// <returns>internal status/message object</returns>
|
||||
Task<Installation> Upgrade();
|
||||
|
||||
/// <summary>
|
||||
/// Restarts the installation
|
||||
/// </summary>
|
||||
/// <returns>internal status/message object</returns>
|
||||
Task RestartAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Registers a new <see cref="User"/>
|
||||
/// </summary>
|
||||
/// <param name="email">Email of the user to be registered</param>
|
||||
/// <returns></returns>
|
||||
Task RegisterAsync(string email);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,10 +4,22 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to read the job schedule log
|
||||
/// </summary>
|
||||
public interface IJobLogService
|
||||
{
|
||||
/// <summary>
|
||||
/// Return a list of all <see cref="JobLog"/> entries
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<JobLog>> GetJobLogsAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Return a <see cref="JobLog"/> entry for the given Id
|
||||
/// </summary>
|
||||
/// <param name="jobLogId"></param>
|
||||
/// <returns></returns>
|
||||
Task<JobLog> GetJobLogAsync(int jobLogId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,61 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Service to manage jobs (<see cref="Job"/>)
|
||||
/// </summary>
|
||||
public interface IJobService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a list of all jobs
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<Job>> GetJobsAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Return a specific job
|
||||
/// </summary>
|
||||
/// <param name="jobId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Job> GetJobAsync(int jobId);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new job
|
||||
/// </summary>
|
||||
/// <param name="job"></param>
|
||||
/// <returns></returns>
|
||||
Task<Job> AddJobAsync(Job job);
|
||||
|
||||
/// <summary>
|
||||
/// Updates an existing job
|
||||
/// </summary>
|
||||
/// <param name="job"></param>
|
||||
/// <returns></returns>
|
||||
Task<Job> UpdateJobAsync(Job job);
|
||||
|
||||
/// <summary>
|
||||
/// Delete an existing job
|
||||
/// </summary>
|
||||
/// <param name="jobId"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteJobAsync(int jobId);
|
||||
|
||||
/// <summary>
|
||||
/// Starts the given job
|
||||
/// </summary>
|
||||
/// <param name="jobId"></param>
|
||||
/// <returns></returns>
|
||||
Task StartJobAsync(int jobId);
|
||||
|
||||
/// <summary>
|
||||
/// Stops the given job
|
||||
/// </summary>
|
||||
/// <param name="jobId"></param>
|
||||
/// <returns></returns>
|
||||
Task StopJobAsync(int jobId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,14 +4,38 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Service to manage <see cref="Language"/> entries
|
||||
/// </summary>
|
||||
public interface ILanguageService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a list of all available languages for the given <see cref="Site"/>
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<Language>> GetLanguagesAsync(int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the given language
|
||||
/// </summary>
|
||||
/// <param name="languageId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Language> GetLanguageAsync(int languageId);
|
||||
|
||||
/// <summary>
|
||||
/// Adds the given language
|
||||
/// </summary>
|
||||
/// <param name="language"></param>
|
||||
/// <returns></returns>
|
||||
Task<Language> AddLanguageAsync(Language language);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the given language
|
||||
/// </summary>
|
||||
/// <param name="languageId"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteLanguageAsync(int languageId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,15 @@ using Oqtane.Models;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to retrieve localizations (<see cref="Culture"/>)
|
||||
/// </summary>
|
||||
public interface ILocalizationService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a collection of supported cultures
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<Culture>> GetCulturesAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using Oqtane.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -7,11 +7,59 @@ using Oqtane.Enums;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to retrieve and store <see cref="Log"/> entries
|
||||
/// </summary>
|
||||
public interface ILogService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a list of log entires for the given params
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <param name="level"></param>
|
||||
/// <param name="function"></param>
|
||||
/// <param name="rows"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<Log>> GetLogsAsync(int siteId, string level, string function, int rows);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific log entry for the given id
|
||||
/// </summary>
|
||||
/// <param name="logId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Log> GetLogAsync(int logId);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new log entry
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <param name="moduleId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="feature"></param>
|
||||
/// <param name="function"></param>
|
||||
/// <param name="level"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
Task Log(int? pageId, int? moduleId, int? userId, string category, string feature, LogFunction function, LogLevel level, Exception exception, string message, params object[] args);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new log entry
|
||||
/// </summary>
|
||||
/// <param name="alias"></param>
|
||||
/// <param name="pageId"></param>
|
||||
/// <param name="moduleId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="category"></param>
|
||||
/// <param name="feature"></param>
|
||||
/// <param name="function"></param>
|
||||
/// <param name="level"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,14 +5,60 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Service to manage a <see cref="ModuleDefinition"/>
|
||||
/// </summary>
|
||||
public interface IModuleDefinitionService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a list of module definitions for the given site
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<ModuleDefinition>> GetModuleDefinitionsAsync(int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific module definition
|
||||
/// </summary>
|
||||
/// <param name="moduleDefinitionId"></param>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task<ModuleDefinition> GetModuleDefinitionAsync(int moduleDefinitionId, int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a existing module definition
|
||||
/// </summary>
|
||||
/// <param name="moduleDefinition"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdateModuleDefinitionAsync(ModuleDefinition moduleDefinition);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Installs all module definitions located in //TODO: 2dm where?
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task InstallModuleDefinitionsAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a module definition
|
||||
/// </summary>
|
||||
/// <param name="moduleDefinitionId"></param>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteModuleDefinitionAsync(int moduleDefinitionId, int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new module definition
|
||||
/// </summary>
|
||||
/// <param name="moduleDefinition"></param>
|
||||
/// <returns></returns>
|
||||
Task<ModuleDefinition> CreateModuleDefinitionAsync(ModuleDefinition moduleDefinition);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of module definition templates
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<Template>> GetModuleDefinitionTemplatesAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,62 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to retreive and store modules (<see cref="Module"/>)
|
||||
/// </summary>
|
||||
public interface IModuleService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a list of modules for the given site
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<Module>> GetModulesAsync(int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific module
|
||||
/// </summary>
|
||||
/// <param name="moduleId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Module> GetModuleAsync(int moduleId);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new module
|
||||
/// </summary>
|
||||
/// <param name="module"></param>
|
||||
/// <returns></returns>
|
||||
Task<Module> AddModuleAsync(Module module);
|
||||
|
||||
/// <summary>
|
||||
/// Updates an existing module
|
||||
/// </summary>
|
||||
/// <param name="module"></param>
|
||||
/// <returns></returns>
|
||||
Task<Module> UpdateModuleAsync(Module module);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a module
|
||||
/// </summary>
|
||||
/// <param name="moduleId"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteModuleAsync(int moduleId);
|
||||
|
||||
/// <summary>
|
||||
/// Imports a module
|
||||
/// </summary>
|
||||
/// <param name="moduleId"></param>
|
||||
/// <param name="content">module in JSON format</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> ImportModuleAsync(int moduleId, string content);
|
||||
|
||||
/// <summary>
|
||||
/// Exports a given module
|
||||
/// </summary>
|
||||
/// <param name="moduleId"></param>
|
||||
/// <returns>module in JSON</returns>
|
||||
Task<string> ExportModuleAsync(int moduleId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,49 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to store and retreive notifications (<see cref="Notification"/>)
|
||||
/// </summary>
|
||||
public interface INotificationService
|
||||
{
|
||||
/// <summary>
|
||||
/// Return a list of notifications
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <param name="direction"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<Notification>> GetNotificationsAsync(int siteId, string direction, int userId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific notifications
|
||||
/// </summary>
|
||||
/// <param name="notificationId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Notification> GetNotificationAsync(int notificationId);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new notification
|
||||
/// </summary>
|
||||
/// <param name="notification"></param>
|
||||
/// <returns></returns>
|
||||
Task<Notification> AddNotificationAsync(Notification notification);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a existing notification
|
||||
/// </summary>
|
||||
/// <param name="notification"></param>
|
||||
/// <returns></returns>
|
||||
Task<Notification> UpdateNotificationAsync(Notification notification);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a notification
|
||||
/// </summary>
|
||||
/// <param name="notificationId"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteNotificationAsync(int notificationId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,12 +4,50 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Service to manage packages (<see cref="Package"/>)
|
||||
/// </summary>
|
||||
public interface IPackageService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a list of packages matching the given parameters
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<Package>> GetPackagesAsync(string type);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of packages matching the given parameters
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="search"></param>
|
||||
/// <param name="price"></param>
|
||||
/// <param name="package"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<Package>> GetPackagesAsync(string type, string search, string price, string package);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific package
|
||||
/// </summary>
|
||||
/// <param name="packageId"></param>
|
||||
/// <param name="version"></param>
|
||||
/// <returns></returns>
|
||||
Task<Package> GetPackageAsync(string packageId, string version);
|
||||
|
||||
/// <summary>
|
||||
/// Downloads a specific package as .nupkg file
|
||||
/// </summary>
|
||||
/// <param name="packageId"></param>
|
||||
/// <param name="version"></param>
|
||||
/// <param name="folder"></param>
|
||||
/// <returns></returns>
|
||||
Task DownloadPackageAsync(string packageId, string version, string folder);
|
||||
|
||||
/// <summary>
|
||||
/// Installs all packages located in //TODO: 2dm where?
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task InstallPackagesAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,56 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to store and retreive a <see cref="PageModule"/>
|
||||
/// </summary>
|
||||
public interface IPageModuleService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific page module
|
||||
/// </summary>
|
||||
/// <param name="pageModuleId"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageModule> GetPageModuleAsync(int pageModuleId);
|
||||
|
||||
/// <summary>
|
||||
/// Return a specific page module
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <param name="moduleId"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageModule> GetPageModuleAsync(int pageId, int moduleId);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new page module
|
||||
/// </summary>
|
||||
/// <param name="pageModule"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageModule> AddPageModuleAsync(PageModule pageModule);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a existing page module
|
||||
/// </summary>
|
||||
/// <param name="pageModule"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageModule> UpdatePageModuleAsync(PageModule pageModule);
|
||||
|
||||
/// <summary>
|
||||
/// Updates order of all page modules in the given pane
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <param name="pane"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdatePageModuleOrderAsync(int pageId, string pane);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a page module
|
||||
/// </summary>
|
||||
/// <param name="pageModuleId"></param>
|
||||
/// <returns></returns>
|
||||
Task DeletePageModuleAsync(int pageModuleId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,79 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Services to store and retrieve a <see cref="Page"/>
|
||||
/// </summary>
|
||||
public interface IPageService
|
||||
{
|
||||
/// <summary>
|
||||
/// Retuns a list of pages
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<Page>> GetPagesAsync(int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific page
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Page> GetPageAsync(int pageId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific page personalized for the given user
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Page> GetPageAsync(int pageId, int userId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific page by its defined path
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Page> GetPageAsync(string path, int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new page
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <returns></returns>
|
||||
Task<Page> AddPageAsync(Page page);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new page
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <returns></returns>
|
||||
Task<Page> AddPageAsync(int pageId, int userId);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a existing page
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <returns></returns>
|
||||
Task<Page> UpdatePageAsync(Page page);
|
||||
|
||||
/// <summary>
|
||||
/// Updates order of all page modules in the given parent
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <param name="pageId"></param>
|
||||
/// <param name="parentId"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdatePageOrderAsync(int siteId, int pageId, int? parentId);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a page
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <returns></returns>
|
||||
Task DeletePageAsync(int pageId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,48 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to store and retreive <see cref="Profile"/> entries
|
||||
/// </summary>
|
||||
public interface IProfileService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of profile entries
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<Profile>> GetProfilesAsync(int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific profile entry
|
||||
/// </summary>
|
||||
/// <param name="profileId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Profile> GetProfileAsync(int profileId);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new profile entry
|
||||
/// </summary>
|
||||
/// <param name="profile"></param>
|
||||
/// <returns></returns>
|
||||
Task<Profile> AddProfileAsync(Profile profile);
|
||||
|
||||
/// <summary>
|
||||
/// Updates an existing profile entry
|
||||
/// </summary>
|
||||
/// <param name="profile"></param>
|
||||
/// <returns></returns>
|
||||
Task<Profile> UpdateProfileAsync(Profile profile);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a profile entry
|
||||
/// </summary>
|
||||
/// <param name="profileId"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteProfileAsync(int profileId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,55 +1,180 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to manage <see cref="Setting"/>s
|
||||
/// </summary>
|
||||
public interface ISettingService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a key-value dictionary of all tenant settings
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<string, string>> GetTenantSettingsAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Updates a tenant setting
|
||||
/// </summary>
|
||||
/// <param name="tenantSettings"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdateTenantSettingsAsync(Dictionary<string, string> tenantSettings);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a key-value dictionary of all site settings for the given site
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<string, string>> GetSiteSettingsAsync(int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a site setting
|
||||
/// </summary>
|
||||
/// <param name="siteSettings"></param>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdateSiteSettingsAsync(Dictionary<string, string> siteSettings, int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a key-value dictionary of all page settings for the given page
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<string, string>> GetPageSettingsAsync(int pageId);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a page setting
|
||||
/// </summary>
|
||||
/// <param name="pageSettings"></param>
|
||||
/// <param name="pageId"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdatePageSettingsAsync(Dictionary<string, string> pageSettings, int pageId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a key-value dictionary of all page module settings for the given page module
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<string, string>> GetPageModuleSettingsAsync(int pageModuleId);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a page module setting
|
||||
/// </summary>
|
||||
/// <param name="pageModuleSettings"></param>
|
||||
/// <param name="pageModuleId"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdatePageModuleSettingsAsync(Dictionary<string, string> pageModuleSettings, int pageModuleId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a key-value dictionary of all module settings for the given module
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<string, string>> GetModuleSettingsAsync(int moduleId);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a module setting
|
||||
/// </summary>
|
||||
/// <param name="moduleSettings"></param>
|
||||
/// <param name="moduleId"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdateModuleSettingsAsync(Dictionary<string, string> moduleSettings, int moduleId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a key-value dictionary of all user settings for the given user
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<string, string>> GetUserSettingsAsync(int userId);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a user setting
|
||||
/// </summary>
|
||||
/// <param name="userSettings"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdateUserSettingsAsync(Dictionary<string, string> userSettings, int userId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a key-value dictionary of all folder settings for the given folder
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<string, string>> GetFolderSettingsAsync(int folderId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Updates a folder setting
|
||||
/// </summary>
|
||||
/// <param name="folderSettings"></param>
|
||||
/// <param name="folderId"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdateFolderSettingsAsync(Dictionary<string, string> folderSettings, int folderId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a key-value dictionary of all settings for the given entityName
|
||||
/// </summary>
|
||||
/// <param name="pageId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<string, string>> GetSettingsAsync(string entityName, int entityId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Updates settings for a given entityName and Id
|
||||
/// </summary>
|
||||
/// <param name="settings"></param>
|
||||
/// <param name="entityName"></param>
|
||||
/// <param name="entityId"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdateSettingsAsync(Dictionary<string, string> settings, string entityName, int entityId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific setting
|
||||
/// </summary>
|
||||
/// <param name="settingId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Setting> GetSettingAsync(int settingId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new setting
|
||||
/// </summary>
|
||||
/// <param name="setting"></param>
|
||||
/// <returns></returns>
|
||||
Task<Setting> AddSettingAsync(Setting setting);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a existing setting
|
||||
/// </summary>
|
||||
/// <param name="setting"></param>
|
||||
/// <returns></returns>
|
||||
Task<Setting> UpdateSettingAsync(Setting setting);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a setting
|
||||
/// </summary>
|
||||
/// <param name="settingId"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteSettingAsync(int settingId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value of the given settingName (key) from the given key-value dictionary
|
||||
/// </summary>
|
||||
/// <param name="settings"></param>
|
||||
/// <param name="settingName"></param>
|
||||
/// <param name="defaultValue"></param>
|
||||
/// <returns></returns>
|
||||
string GetSetting(Dictionary<string, string> settings, string settingName, string defaultValue);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the value of the given settingName (key) in the given key-value dictionary
|
||||
/// </summary>
|
||||
/// <param name="settings"></param>
|
||||
/// <param name="settingName"></param>
|
||||
/// <param name="defaultValue"></param>
|
||||
/// <returns></returns>
|
||||
Dictionary<string, string> SetSetting(Dictionary<string, string> settings, string settingName, string settingValue);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Oqtane.Documentation;
|
||||
using Oqtane.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -5,18 +6,47 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to store and retreive <see cref="Site"/> entries
|
||||
/// </summary>
|
||||
public interface ISiteService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of sites
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<Site>> GetSitesAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specific site
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task<Site> GetSiteAsync(int siteId);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new site
|
||||
/// </summary>
|
||||
/// <param name="site"></param>
|
||||
/// <returns></returns>
|
||||
Task<Site> AddSiteAsync(Site site);
|
||||
|
||||
/// <summary>
|
||||
/// Updates an existing site
|
||||
/// </summary>
|
||||
/// <param name="site"></param>
|
||||
/// <returns></returns>
|
||||
Task<Site> UpdateSiteAsync(Site site);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a site
|
||||
/// </summary>
|
||||
/// <param name="siteId"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteSiteAsync(int siteId);
|
||||
|
||||
[PrivateApi]
|
||||
[Obsolete("This method is deprecated.", false)]
|
||||
void SetAlias(Alias alias);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to retreive <see cref="SiteTemplate"/> entries
|
||||
/// </summary>
|
||||
public interface ISiteTemplateService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a list of site templates
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<SiteTemplate>> GetSiteTemplatesAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
using Oqtane.Models;
|
||||
using Oqtane.Models;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to execute a <see cref="SqlQuery"/> against the backend database
|
||||
/// </summary>
|
||||
public interface ISqlService
|
||||
{
|
||||
/// <summary>
|
||||
/// Executes a sql query and returns its result
|
||||
/// </summary>
|
||||
/// <param name="sqlquery"></param>
|
||||
/// <returns></returns>
|
||||
Task<SqlQuery> ExecuteQueryAsync(SqlQuery sqlquery);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,22 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to retrieve and update system information.
|
||||
/// </summary>
|
||||
public interface ISystemService
|
||||
{
|
||||
/// <summary>
|
||||
/// returns a key-value directory with the current system information (os-version, clr-version, etc.)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<string, string>> GetSystemInfoAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Updates system information
|
||||
/// </summary>
|
||||
/// <param name="settings"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdateSystemInfoAsync(Dictionary<string, string> settings);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,15 +4,65 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Service to manage <see cref="Theme"/> entries
|
||||
/// </summary>
|
||||
public interface IThemeService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of available themes
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<Theme>> GetThemesAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of <see cref="ThemeControl"/>s from the given themes
|
||||
/// </summary>
|
||||
/// <param name="themes"></param>
|
||||
/// <returns></returns>
|
||||
List<ThemeControl> GetThemeControls(List<Theme> themes);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of layouts (<see cref="ThemeControl"/>) from the given themes with a matching theme name
|
||||
/// </summary>
|
||||
/// <param name="themes"></param>
|
||||
/// <param name="themeName"></param>
|
||||
/// <returns></returns>
|
||||
List<ThemeControl> GetLayoutControls(List<Theme> themes, string themeName);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of containers (<see cref="ThemeControl"/>) from the given themes with a matching theme name
|
||||
/// </summary>
|
||||
/// <param name="themes"></param>
|
||||
/// <param name="themeName"></param>
|
||||
/// <returns></returns>
|
||||
List<ThemeControl> GetContainerControls(List<Theme> themes, string themeName);
|
||||
|
||||
/// <summary>
|
||||
/// Installs all themes located in //TODO: 2dm where?
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task InstallThemesAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a theme
|
||||
/// </summary>
|
||||
/// <param name="themeName"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteThemeAsync(string themeName);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new theme
|
||||
/// </summary>
|
||||
/// <param name="theme"></param>
|
||||
/// <returns></returns>
|
||||
Task<Theme> CreateThemeAsync(Theme theme);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of theme templates (<see cref="Template"/>)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<Template>> GetThemeTemplatesAsync();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user