152 lines
5.7 KiB
C#
152 lines
5.7 KiB
C#
using Abp.Application.Services;
|
|
using SplashPage.Perzonalization.Dto;
|
|
using Microsoft.AspNetCore.Http;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SplashPage.Perzonalization
|
|
{
|
|
public interface ICaptivePortalAppService : IApplicationService
|
|
{
|
|
#region Portal Management
|
|
|
|
/// <summary>
|
|
/// Gets all portals for the current tenant
|
|
/// </summary>
|
|
/// <returns>List of portals</returns>
|
|
Task<List<SplashCaptivePortalDto>> GetAllPortalsAsync();
|
|
|
|
/// <summary>
|
|
/// Gets a portal by ID
|
|
/// </summary>
|
|
/// <param name="id">Portal ID</param>
|
|
/// <returns>Portal DTO</returns>
|
|
Task<SplashCaptivePortalDto> GetPortalByIdAsync(int id);
|
|
|
|
/// <summary>
|
|
/// Gets a portal by name
|
|
/// </summary>
|
|
/// <param name="name">Portal name</param>
|
|
/// <returns>Portal DTO</returns>
|
|
Task<SplashCaptivePortalDto> GetPortalByNameAsync(string name);
|
|
|
|
/// <summary>
|
|
/// Creates a new portal
|
|
/// </summary>
|
|
/// <param name="input">Create portal DTO</param>
|
|
/// <returns>Created portal DTO</returns>
|
|
Task<SplashCaptivePortalDto> CreatePortalAsync(CreateSplashCaptivePortalDto input);
|
|
|
|
/// <summary>
|
|
/// Updates an existing portal
|
|
/// </summary>
|
|
/// <param name="input">Update portal DTO</param>
|
|
/// <returns>Updated portal DTO</returns>
|
|
//Task<SplashCaptivePortalDto> UpdatePortalAsync(UpdateSplashCaptivePortalDto input);
|
|
|
|
/// <summary>
|
|
/// Deletes a portal
|
|
/// </summary>
|
|
/// <param name="id">Portal ID</param>
|
|
/// <returns>Task</returns>
|
|
Task DeletePortalAsync(int id);
|
|
|
|
#endregion
|
|
|
|
#region Portal Configuration
|
|
|
|
/// <summary>
|
|
/// Gets the configuration for a specific portal
|
|
/// </summary>
|
|
/// <param name="portalName">Portal name</param>
|
|
/// <returns>Portal configuration DTO</returns>
|
|
//Task<CaptivePortalCfgDto> GetPortalConfigurationAsync(int id);
|
|
|
|
/// <summary>
|
|
/// Gets the production configuration for a specific portal
|
|
/// </summary>
|
|
/// <param name="portalName">Portal name</param>
|
|
/// <returns>Portal production configuration DTO</returns>
|
|
//Task<CaptivePortalCfgDto> GetPortalProdConfigurationAsync(int id);
|
|
|
|
/// <summary>
|
|
/// Saves the configuration for a specific portal
|
|
/// </summary>
|
|
/// <param name="portalName">Portal name</param>
|
|
/// <param name="configuration">Portal configuration DTO</param>
|
|
/// <returns>Task</returns>
|
|
//Task SavePortalConfigurationAsync(string portalName, CaptivePortalCfgDto configuration);
|
|
|
|
/// <summary>
|
|
/// Publishes the configuration for a specific portal (copies from draft to production)
|
|
/// </summary>
|
|
/// <param name="portalName">Portal name</param>
|
|
/// <returns>Task</returns>
|
|
//Task PublishPortalConfigurationAsync(string portalName);
|
|
|
|
/// <summary>
|
|
/// Selects an image for a specific portal
|
|
/// </summary>
|
|
/// <param name="portalName">Portal name</param>
|
|
/// <param name="imagePath">Image path</param>
|
|
/// <param name="imageType">Image type (logo or background)</param>
|
|
/// <returns>Selected image path</returns>
|
|
//Task<string> SelectPortalImageAsync(string portalName, string imagePath, string imageType);
|
|
|
|
#endregion
|
|
|
|
#region Legacy (Single Portal) Methods - For backward compatibility
|
|
|
|
/// <summary>
|
|
/// Gets the configuration for the default portal
|
|
/// </summary>
|
|
/// <returns>Portal configuration DTO</returns>
|
|
//Task<CaptivePortalCfgDto> GetConfigurationAsync();
|
|
|
|
/// <summary>
|
|
/// Gets the production configuration for the default portal
|
|
/// </summary>
|
|
/// <returns>Portal production configuration DTO</returns>
|
|
//Task<CaptivePortalCfgDto> GetProdConfigurationAsync();
|
|
|
|
/// <summary>
|
|
/// Saves the configuration for the default portal
|
|
/// </summary>
|
|
/// <param name="configuration">Portal configuration DTO</param>
|
|
/// <returns>Task</returns>
|
|
Task SaveConfigurationAsync(CaptivePortalCfgDto configuration,int id);
|
|
|
|
/// <summary>
|
|
/// Selects an image for the default portal
|
|
/// </summary>
|
|
/// <param name="imagePath">Image path</param>
|
|
/// <param name="imageType">Image type (logo or background)</param>
|
|
/// <returns>Selected image path</returns>
|
|
Task<string> SelectImageAsync(string imagePath, string imageType, int id);
|
|
|
|
/// <summary>
|
|
/// Publishes the configuration for the default portal (copies from draft to production)
|
|
/// </summary>
|
|
/// <returns>Task</returns>
|
|
Task PublishConfigurationAsync(int Id);
|
|
|
|
/// <summary>
|
|
/// Uploads an image for a captive portal
|
|
/// </summary>
|
|
/// <param name="id">Portal ID</param>
|
|
/// <param name="file">Image file to upload</param>
|
|
/// <param name="imageType">Type of image (logo or background)</param>
|
|
/// <returns>Upload result</returns>
|
|
Task<ImageUploadResultDto> UploadImageAsync(int id, IFormFile file, string imageType);
|
|
|
|
/// <summary>
|
|
/// Deletes an image from a captive portal
|
|
/// </summary>
|
|
/// <param name="id">Portal ID</param>
|
|
/// <param name="imagePath">Path to the image to delete</param>
|
|
/// <returns>True if deleted successfully</returns>
|
|
Task<bool> DeleteImageAsync(int id, string imagePath);
|
|
|
|
#endregion
|
|
}
|
|
} |