using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using xModels.Dtos;
using xStringService.Models.Dtos;
namespace xStringService.Interfaces
{
public interface IXItemResourceProvider
{
//
#region Group Actions ...
///
/// Retrieve a List of Exists Languages for Current Item ...
///
///
///
Task> GetLanguages(
CancellationToken cancellationToken = default
);
///
/// Retrieve all Exists Items of type ...
///
///
///
Task> GetResourceLocales(
CancellationToken cancellationToken = default
);
///
/// Remove all Exists Locales which Related to this Provider ...
///
///
///
///
Task RemoveResourceLocales(
string connectionId = null,
CancellationToken cancellationToken = default
);
#endregion
//
#region Item Actions ...
///
/// Get all Exists Items for Specified identitifer ...
///
///
///
///
Task> GetResourceLocales(
object identifier,
CancellationToken cancellationToken = default
);
///
/// Get all Exists Items for Specified identitifer ...
///
///
///
///
Task> GetLocales(
object identifier,
CancellationToken cancellationToken = default
);
///
/// Get all Exists Locales Representaion based on Specified Identitifer
/// as XResourceDto ...
///
///
///
///
Task GetResource(
object identifier,
CancellationToken cancellationToken = default
);
///
/// Add Or Update Locale for Specified Identitifer ...
///
///
///
///
///
///
Task AddOrUpdateLocale(
object identifier,
XLocaleResourceDto locale,
string connectionId = null,
CancellationToken cancellationToken = default
);
///
/// Update a Resource State ...
///
///
///
///
///
///
Task AddOrUpdateResource(
object identifier,
XResourceDto resource,
string connectionId = null,
CancellationToken cancellationToken = default
);
///
/// Remove Specified Language Locale of Specified Identifier ...
///
///
///
///
///
///
Task RemoveLocale(
object identifier,
string language,
string connectionId = null,
CancellationToken cancellationToken = default
);
///
/// Remove all Exists Locales for Specified Identifier ...
///
///
///
///
///
Task RemoveLocales(
object identifier,
string connectionId = null,
CancellationToken cancellationToken = default
);
///
/// Check Specified ocale Exists for Specified Identifier ...
///
///
///
///
///
Task HasLocale(
object identifier,
string language,
CancellationToken cancellationToken = default
);
///
/// Get all Exists Languages for Specified Identifier ...
///
///
///
///
Task> GetLanguages(
object identifier,
CancellationToken cancellationToken = default
);
#endregion
//
#region Resource Title Action ...
///
/// Retrieve Resource Title ...
///
///
///
string GetResourceTitle(object identifier = null);
#endregion
}
}