Source

main-vinayFork / Source / Excel / Excel.BizLogic / Interfaces / IRepositoryManager.cs

using System.Collections.Generic;
using DataUp.Web.Service.Model;

namespace DataUp.Excel.BizLogic
{
    /// <summary>
    /// Interface for validating for errors in the underlying excel file.
    /// </summary>
    public interface IRepositoryManager
    {
        /// <summary>
        /// Gets the identifier from repository.
        /// </summary>
        /// <param name="data">Query data.</param>
        /// <param name="rep">Repository base instance.</param>
        /// <returns>Identifier for the given document.</returns>
        ServiceResponse GetIdentifier(DQueryData data, DRepositoryBase rep);

        /// <summary>
        /// This method is used to convert the given workbook to csv files and then compress.
        /// </summary>
        /// <param name="zipFileName">Name of the compressed file.</param>
        /// <returns>Path of the compressed file.</returns>
        string GetCsvZipFile(string zipFileName);

        /// <summary>
        /// Gets the temp path of the xls file.
        /// </summary>
        /// <returns>Path of the xls file.</returns>
        string GetXslFilePath();

        /// <summary>
        /// Post file as CSV.
        /// </summary>
        /// <param name="data">Metadata List.</param>
        /// <param name="rep">Repository base instance.</param>
        /// <param name="filename">Name of the file.</param>
        /// <param name="filecontent">Content of the file.</param>
        /// <param name="extension">Extension of the file.</param>
        /// <param name="iscompressed">Whether the file is compressed or not.</param>
        /// <returns>Successfully posted file or not.</returns>
        ServiceResponse PostAsCSV(DQueryData data, DRepositoryBase rep, string filename, byte[] filecontent, string extension, bool iscompressed);

        /// <summary>
        /// Post file as XLS.
        /// </summary>
        /// <param name="data">Metadata List.</param>
        /// <param name="rep">Repository base instance.</param>
        /// <param name="filename">Name of the file.</param>
        /// <param name="filecontent">Content of the file.</param>
        /// <param name="extension">Extension of the file.</param>
        /// <param name="iscompressed">Whether the file is compressed or not.</param>
        /// <returns>Successfully posted file or not.</returns>
        ServiceResponse PostAsXSL(DQueryData data, DRepositoryBase rep, string filename, byte[] filecontent, string extension, bool iscompressed);

        /// <summary>
        /// This method if used to get the list of repositories.
        /// </summary>
        /// <returns>list of repositories</returns>
        List<RepositoryModel> GetRespositories();

        /// <summary>
        /// Gets the identifier from repository.
        /// </summary>
        /// <param name="details">Identifier details.</param>
        /// <returns>Service response instance.</returns>
        ServiceResponse GetIdentifier(IdentifierDetail details);

        /// <summary>
        /// Gets the user agreement for the given repository.
        /// </summary>
        /// <param name="repositoryName">Name of the repository.</param>
        /// <returns>User agreement string.</returns>
        string GetUserAgreement(string repositoryName);

        /// <summary>
        /// Publish file to repository.
        /// </summary>
        /// <param name="details">Post file detail.</param>
        /// <param name="metadataList">Metadata list.</param>
        /// <param name="parameterMetadata">Parameter metadata list.</param>
        /// <returns>Service response instance.</returns>
        ServiceResponse PublishFile(PostFileDetail details, List<MetadataDetail> metadataList, List<ParameterDetail> parameterMetadata);
    }
}