using System;
using System.Collections.Generic;

namespace VCommon.VApplication.Setting
{
    public interface ISettingManager
    {
        T GetAnyValueBySystem<T>(string name, Guid? tenantId, Guid? userId, T anon = default(T));

        T GetApplicationValue<T>(string name, T anon = default(T));

        IDictionary<string, object> GetScriptOutput();

        T GetTenantValue<T>(string name, T anon = default(T));

        T GetTenantValueByOperator<T>(string name, Guid tenantId, T anon = default(T));

        T GetUserValue<T>(string name, T anon = default(T));

        T GetUserValueByAdmin<T>(string name, Guid userId, T anon = default(T));

        T GetUserValueByOperator<T>(string name, Guid tenantId, Guid userId, T anon = default(T));

        void SetAnyValueBySystem(string name, Guid tenantId, Guid userId, SettingScope scope, object value);

        void SetApplicationValueByOperator(string name, object value);

        void SetTenantValueByAdmin(string name, object value);

        void SetTenantValueByOperator(string name, object value, Guid tenantId);

        void SetUserValueByAdmin(string name, object value, Guid userId);

        void SetUserValueByOperator(string name, object value, Guid tenantId, Guid userId);

        void SetValueByUser(string name, object value);

        void SetValueByUserScript(string name, object value);
    }
}