last ...
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using xFileService.Models.Dtos;
|
||||
using xFileService.Models.Entities;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xFileService.Interfaces.Dtos
|
||||
{
|
||||
public interface IXFileDtoHub : IXBaseDtoHub<XFile, XFileDto, Guid>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using xDataService.Interfaces;
|
||||
using xFileService.Models.Dtos;
|
||||
using xFileService.Models.Entities;
|
||||
|
||||
namespace xFileService.Interfaces.Dtos
|
||||
{
|
||||
public interface IXFileRepositoryService : IXBaseRepositoryService<XFile, XFileDto, Guid>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using xFileService.Models.Dtos;
|
||||
using xFileService.Models.Entities;
|
||||
using xFileService.Providers.Dtos;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xFileService.Interfaces.Dtos
|
||||
{
|
||||
public interface IXFileServiceProvider : IXBaseDtoProvider<XFile, XFileDto, Guid, XFileDtoHub>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
using xFileService.Models.Entities;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xFileService.Interfaces.Entities
|
||||
{
|
||||
public interface IXFileEntityHub : IXBaseEntityHub<XFile, Guid>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
using xDataService.Interfaces;
|
||||
using xFileService.Models.Entities;
|
||||
|
||||
namespace xFileService.Interfaces.Entities
|
||||
{
|
||||
public interface IXFileKeyGenerator : IXKeyGenerator<XFile, Guid>
|
||||
{ }
|
||||
}
|
||||
@@ -3,6 +3,6 @@ using xFileService.Models.Entities;
|
||||
|
||||
namespace xFileService.Interfaces.Entities
|
||||
{
|
||||
public interface IXFileEvents : IXBaseRepositoryEvents<XFile>
|
||||
public interface IXFileRepositoryEvents : IXBaseRepositoryEvents<XFile>
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using xFileService.Models.Entities;
|
||||
using xFileService.Providers.Entities;
|
||||
using xPushService.Interfaces;
|
||||
|
||||
namespace xFileService.Interfaces.Entities
|
||||
{
|
||||
public interface IXFileRepositoryProvider : IXBaseEntityProvider<XFile, Guid, XFileEntityHub>
|
||||
{ }
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xFileService.Models.Dtos;
|
||||
using xIdentityModels.Models;
|
||||
using xIdentityService.Interfaces;
|
||||
using XFileDto = xFileService.Models.Dtos.XFileDto;
|
||||
|
||||
namespace xFileService.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Implementing XBaseFileProvider ...
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
public interface IXBaseFileProvider<TKey> : IXIdentityBaseReferencedProvider<XFileDto, TKey>
|
||||
{
|
||||
//
|
||||
#region Props ...
|
||||
/// <summary>
|
||||
/// Specified Provider Repositroy ...
|
||||
/// </summary>
|
||||
IXFileProvider FileProvider { get; }
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Tools ...
|
||||
/// <summary>
|
||||
/// Stream Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<FileStreamResult> Stream(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Stream Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
Task<FileStreamResult> Stream(string fileName);
|
||||
|
||||
/// <summary>
|
||||
/// Download Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<PhysicalFileResult> Download(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Download Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
Task<PhysicalFileResult> Download(string fileName);
|
||||
|
||||
/// <summary>
|
||||
/// Upload Files ...
|
||||
/// </summary>
|
||||
/// <param name="forProvidedId"></param>
|
||||
/// <param name="files"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<XFileDto>> Upload(
|
||||
TKey forProvidedId,
|
||||
IFormFileCollection files,
|
||||
string connectionId = null,
|
||||
XUserClaimsInfoDto userInfo = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve Specified File Streaming Info ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<XFileStreamDescriptorDto> GetFileDescriptor(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve Specified File Streaming Info ...
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
Task<XFileStreamDescriptorDto> GetFileDescriptor(string fileName);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,398 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using xDataService.Configuration;
|
||||
using xFileService.Hubs;
|
||||
using xFileService.Interfaces.Entities;
|
||||
using xFileService.Models.Dtos;
|
||||
using xFileService.Models.Entities;
|
||||
using xIdentityModels.Models;
|
||||
using xFileService.Providers.Dtos;
|
||||
using xIdentityService.Interfaces;
|
||||
using xModels.Dtos;
|
||||
using xStorageService.Interfaces;
|
||||
using XFileDto = xFileService.Models.Dtos.XFileDto;
|
||||
using xTagService.Interfaces;
|
||||
|
||||
namespace xFileService.Interfaces
|
||||
{
|
||||
public interface IXFileProvider
|
||||
{
|
||||
//
|
||||
#region Props ...
|
||||
IXFileTagProvider TagProvider { get; }
|
||||
IHubContext<XFileEntityHub> Hub { get; }
|
||||
IXFileRepository FileRepository { get; }
|
||||
IXStorageProvider StorageProvider { get; }
|
||||
IXIdentityProvider IdentityProvider { get; }
|
||||
XDataServiceConfiguration DataSercviceConfiguration { get; }
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Helpers ...
|
||||
/// <summary>
|
||||
/// Converts an Entity to Dto ...
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
Task<XFileDto> ToDto(XFile model);
|
||||
|
||||
/// <summary>
|
||||
/// Convert a List of Entities to Dto ...
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<XFileDto>> ToDtoList(IEnumerable<XFile> list);
|
||||
|
||||
/// <summary>
|
||||
/// Converts an Entity Query Result to Dto ...
|
||||
/// </summary>
|
||||
/// <param name="queryResult"></param>
|
||||
/// <returns></returns>
|
||||
Task<XQueryResult<XFileDto>> ToDtoQueryResult(XQueryResult<XFile> queryResult);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Tags ...
|
||||
/// <summary>
|
||||
/// Attach Tag to Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="tag"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task AttachTag(
|
||||
Guid id,
|
||||
string tag,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Detach Tag fro Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="tag"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task DetachTag(
|
||||
Guid id,
|
||||
string tag,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Attach Tags for Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="tags"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task AttachTags(
|
||||
Guid id,
|
||||
IEnumerable<string> tags,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Detach Tags for Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="tags"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task DetachTags(
|
||||
Guid id,
|
||||
IEnumerable<string> tags,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Detach all Attached Tags for Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task DetachTags(
|
||||
Guid id,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Get Specified Model's Tag ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<string>> GetTags(Guid id);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Tools ...
|
||||
/// <summary>
|
||||
/// Stream Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<FileStreamResult> Stream(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Stream Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
Task<FileStreamResult> Stream(string fileName);
|
||||
|
||||
/// <summary>
|
||||
/// Download Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<PhysicalFileResult> Download(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Download Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
Task<PhysicalFileResult> Download(string fileName);
|
||||
|
||||
/// <summary>
|
||||
/// Upload Files ...
|
||||
/// </summary>
|
||||
/// <param name="files"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<XFileDto>> Upload(
|
||||
IFormFileCollection files,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Remove Specified Files ...
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<Guid>> Remove(
|
||||
string ids,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve Specified File Streaming Info ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<XFileStreamDescriptorDto> GetFileDescriptor(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve Specified File Streaming Info ...
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
Task<XFileStreamDescriptorDto> GetFileDescriptor(string fileName);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Reference ...
|
||||
/// <summary>
|
||||
/// Get Reference Identifier for Specified Provider and Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="providedFor"></param>
|
||||
/// <param name="forProvidedId"></param>
|
||||
/// <returns></returns>
|
||||
string GetIdentifier<TKey>(
|
||||
string providedFor,
|
||||
TKey forProvidedId
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Check Specified File has Refernce to Provider ...
|
||||
/// </summary>
|
||||
/// <param name="providedFor"></param>
|
||||
/// <param name="forProvidedId"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> IsProvidedFor<TKey>(
|
||||
string providedFor,
|
||||
TKey forProvidedId,
|
||||
Guid id
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Add Specified Reference to Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="providedFor"></param>
|
||||
/// <param name="forProvidedId"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="forIndex"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task AddReference<TKey>(
|
||||
string providedFor,
|
||||
TKey forProvidedId,
|
||||
Guid id,
|
||||
int forIndex = 0,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Remove Specified Reference from Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="providedFor"></param>
|
||||
/// <param name="forProvidedId"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="forIndex"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task RemoveReference<TKey>(
|
||||
string providedFor,
|
||||
TKey forProvidedId,
|
||||
Guid id,
|
||||
int forIndex = 0,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Data Model ...
|
||||
/// <summary>
|
||||
/// Get Specified File Model ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="ignoreSoftDeleteds"></param>
|
||||
/// <returns></returns>
|
||||
Task<XFileDto> Get(
|
||||
Guid id
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Get All Exists File Models ...
|
||||
/// </summary>
|
||||
/// <param name="ignoreSoftDeleteds"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<XFileDto>> GetAll();
|
||||
|
||||
/// <summary>
|
||||
/// find an Entity by providing a Conditional Expression ...
|
||||
/// </summary>
|
||||
/// <param name="whereClause"></param>
|
||||
Task<XFileDto> FindOne(Expression<Func<XFile, bool>> whereClause);
|
||||
|
||||
/// <summary>
|
||||
/// find a collection of Entities by proving a Conditional Expression ...
|
||||
/// </summary>
|
||||
/// <param name="whereClause"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<XFileDto>> FindMany(
|
||||
Expression<Func<XFile, bool>> whereClause
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// retrieve Entities based on XQuery Pagination structure ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
Task<XQueryResult<XFileDto>> Query(
|
||||
XQuery query
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// retrieve Owned Entities based on XQuery Pagination structure ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <returns></returns>
|
||||
Task<XQueryResult<XFileDto>> QueryOwned(
|
||||
XQuery query,
|
||||
XUserClaimsInfoDto userInfo = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// retrieve Entities based on XQuery Pagination structure by providing a Conditional Expression ...
|
||||
/// </summary>
|
||||
/// <param name="whereClause"></param>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
Task<XQueryResult<XFileDto>> ConditionalQuery(
|
||||
Expression<Func<XFile, bool>> whereClause,
|
||||
XQuery query
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// retrieve Owned Entities based on XQuery Pagination structure by providing a Conditional Expression ...
|
||||
/// </summary>
|
||||
/// <param name="whereClause"></param>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <returns></returns>
|
||||
Task<XQueryResult<XFileDto>> ConditionalQueryOwned(
|
||||
Expression<Func<XFile, bool>> whereClause,
|
||||
XQuery query,
|
||||
XUserClaimsInfoDto userInfo = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Update an Entity values ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task<XFileDto> Update(
|
||||
Guid id,
|
||||
XFileDto item,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// remove an Entity ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="userInfo"></param>
|
||||
/// <param name="connectionId"></param>
|
||||
/// <returns></returns>
|
||||
Task<XFileDto> Remove(
|
||||
Guid id,
|
||||
XUserClaimsInfoDto userInfo = null,
|
||||
string connectionId = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// count all exists Entities ...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<int> Count();
|
||||
|
||||
/// <summary>
|
||||
/// Check an Entity exists or not ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> IsExists(
|
||||
Guid id
|
||||
);
|
||||
#endregion
|
||||
}
|
||||
public interface IXFileProvider : IXBaseProvidedHasTag<XFile, XFileDto, Guid, XFileDtoHub>, IXBaseReferenced
|
||||
{}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace xFileService.Interfaces
|
||||
{
|
||||
public interface IXFileProviderController
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
using xDataService.Interfaces;
|
||||
using xFileService.Models.Entities;
|
||||
|
||||
namespace xFileService.Interfaces
|
||||
{
|
||||
public interface IXFileSeeder : IXBaseDbSeeder<XFile, Guid>
|
||||
{ }
|
||||
}
|
||||
@@ -1,181 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using xFileService.Models.Dtos;
|
||||
using xModels.Dtos;
|
||||
using XFileDto = xFileService.Models.Dtos.XFileDto;
|
||||
|
||||
namespace xFileService.Interfaces
|
||||
{
|
||||
public interface IXFileServiceControllerActions
|
||||
{
|
||||
//
|
||||
#region Tags ...
|
||||
/// <summary>
|
||||
/// Attach Tag to Specified Model ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="tag"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult> AttachTag(
|
||||
[FromRoute] Guid id,
|
||||
[FromQuery] string tag
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Detach Tag From Specified Model ...
|
||||
/// </summary>
|
||||
/// <param name="tag"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult> DetachTag(
|
||||
[FromRoute] Guid id,
|
||||
[FromQuery] string tag
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Attach Tags to Specified Model ...
|
||||
/// </summary>
|
||||
/// <param name="tags"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult> AttachTags(
|
||||
[FromRoute] Guid id,
|
||||
[FromQuery] string tags
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Detach Tags From Specified Model ...
|
||||
/// </summary>
|
||||
/// <param name="tags"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult> DetachTags(
|
||||
[FromRoute] Guid id,
|
||||
[FromQuery] string tags
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve Tags of Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult<IEnumerable<string>>> GetTags(
|
||||
[FromRoute] Guid id
|
||||
);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Tools ...
|
||||
/// <summary>
|
||||
/// Stream Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult> Stream(
|
||||
[FromRoute] Guid id
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Stream Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult> Stream(
|
||||
[FromRoute] string fileName
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Download Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult> Download(
|
||||
[FromRoute] Guid id
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Download Specified File ...
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult> Download(
|
||||
[FromRoute] string name
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Upload Files ...
|
||||
/// </summary>
|
||||
/// <param name="files"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult<IEnumerable<XFileDto>>> Upload(
|
||||
[FromForm] IFormFileCollection files
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Remove Specified Files ...
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult<IEnumerable<Guid>>> Remove(
|
||||
[FromQuery] string ids
|
||||
);
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Model ...
|
||||
/// <summary>
|
||||
/// Get Specified File Model ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="ignoreSoftDeleteds"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult<XFileDto>> Get(
|
||||
[FromRoute] Guid id
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Get All Exists File Models ...
|
||||
/// </summary>
|
||||
/// <param name="ignoreSoftDeleteds"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult<IEnumerable<XFileDto>>> GetAll();
|
||||
|
||||
/// <summary>
|
||||
/// retrieve Entities based on XQuery Pagination structure ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult<XQueryResult<XFileDto>>> Query(
|
||||
[FromQuery] XQuery query
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// retrieve Owned Entities based on XQuery Pagination structure ...
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult<XQueryResult<XFileDto>>> QueryOwned(
|
||||
[FromQuery] XQuery query
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// count all exists Entities ...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult<int>> Count();
|
||||
|
||||
/// <summary>
|
||||
/// Check an Entity exists or not ...
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActionResult<bool>> IsExists(
|
||||
[FromRoute] Guid id
|
||||
);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user