Table of Contents

Interface ISettingService

Namespace
Oqtane.Services
Assembly
Oqtane.Client.dll

Service to manage Settings

public interface ISettingService

Methods

AddOrUpdateSettingAsync(string, int, string, string, bool)

Updates setting for a given entityName and Id

Task AddOrUpdateSettingAsync(string entityName, int entityId, string settingName, string settingValue, bool isPrivate)

Parameters

entityName string
entityId int
settingName string
settingValue string
isPrivate bool

Returns

Task

AddSettingAsync(Setting)

Creates a new setting

Task<Setting> AddSettingAsync(Setting setting)

Parameters

setting Setting

Returns

Task<Setting>

ClearSiteSettingsCacheAsync()

Clears site option cache

Task ClearSiteSettingsCacheAsync()

Returns

Task

DeleteSettingAsync(int)

[Obsolete("DeleteSettingAsync(int settingId) is deprecated. Use DeleteSettingAsync(string entityName, int settingId) instead.", false)]
Task DeleteSettingAsync(int settingId)

Parameters

settingId int

Returns

Task

DeleteSettingAsync(string, int)

Deletes a setting

Task DeleteSettingAsync(string entityName, int settingId)

Parameters

entityName string
settingId int

Returns

Task

DeleteSettingAsync(string, int, string)

Returns a specific setting

Task DeleteSettingAsync(string entityName, int entityId, string settingName)

Parameters

entityName string
entityId int
settingName string

Returns

Task

GetFolderSettingsAsync(int)

Returns a key-value dictionary of all folder settings for the given folder

Task<Dictionary<string, string>> GetFolderSettingsAsync(int folderId)

Parameters

folderId int

Returns

Task<Dictionary<string, string>>

GetHostSettingsAsync()

Returns a key-value dictionary of all tenant settings

Task<Dictionary<string, string>> GetHostSettingsAsync()

Returns

Task<Dictionary<string, string>>

GetModuleDefinitionSettingsAsync(int)

Returns a key-value dictionary of all module settings for the given module

Task<Dictionary<string, string>> GetModuleDefinitionSettingsAsync(int moduleDefinitionId)

Parameters

moduleDefinitionId int

Returns

Task<Dictionary<string, string>>

GetModuleSettingsAsync(int)

Returns a key-value dictionary of all module settings for the given module

Task<Dictionary<string, string>> GetModuleSettingsAsync(int moduleId)

Parameters

moduleId int

Returns

Task<Dictionary<string, string>>

GetPageModuleSettingsAsync(int)

Returns a key-value dictionary of all page module settings for the given page module

Task<Dictionary<string, string>> GetPageModuleSettingsAsync(int pageModuleId)

Parameters

pageModuleId int

Returns

Task<Dictionary<string, string>>

GetPageSettingsAsync(int)

Returns a key-value dictionary of all page settings for the given page

Task<Dictionary<string, string>> GetPageSettingsAsync(int pageId)

Parameters

pageId int

Returns

Task<Dictionary<string, string>>

GetSetting(Dictionary<string, string>, string, string)

Gets the value of the given settingName (key) from the given key-value dictionary

string GetSetting(Dictionary<string, string> settings, string settingName, string defaultValue)

Parameters

settings Dictionary<string, string>
settingName string
defaultValue string

Returns

string

GetSettingAsync(int)

[Obsolete("GetSettingAsync(int settingId) is deprecated. Use GetSettingAsync(string entityName, int settingId) instead.", false)]
Task<Setting> GetSettingAsync(int settingId)

Parameters

settingId int

Returns

Task<Setting>

GetSettingAsync(string, int)

Returns a specific setting

Task<Setting> GetSettingAsync(string entityName, int settingId)

Parameters

entityName string
settingId int

Returns

Task<Setting>

GetSettingsAsync(string, int)

Returns a key-value dictionary of all settings for the given entityName

Task<Dictionary<string, string>> GetSettingsAsync(string entityName, int entityId)

Parameters

entityName string
entityId int

Returns

Task<Dictionary<string, string>>

GetSettingsAsync(string, int, string)

Returns a specific setting

Task<List<Setting>> GetSettingsAsync(string entityName, int entityId, string settingName)

Parameters

entityName string
entityId int
settingName string

Returns

Task<List<Setting>>

GetSiteSettingsAsync(int)

Returns a key-value dictionary of all site settings for the given site

Task<Dictionary<string, string>> GetSiteSettingsAsync(int siteId)

Parameters

siteId int

Returns

Task<Dictionary<string, string>>

GetTenantSettingsAsync()

Returns a key-value dictionary of all tenant settings

Task<Dictionary<string, string>> GetTenantSettingsAsync()

Returns

Task<Dictionary<string, string>>

GetUserSettingsAsync(int)

Returns a key-value dictionary of all user settings for the given user

Task<Dictionary<string, string>> GetUserSettingsAsync(int userId)

Parameters

userId int

Returns

Task<Dictionary<string, string>>

GetVisitorSettingsAsync(int)

Returns a key-value dictionary of all settings for the given visitor

Task<Dictionary<string, string>> GetVisitorSettingsAsync(int visitorId)

Parameters

visitorId int

Returns

Task<Dictionary<string, string>>

MergeSettings(Dictionary<string, string>, Dictionary<string, string>)

Dictionary<string, string> MergeSettings(Dictionary<string, string> settings1, Dictionary<string, string> settings2)

Parameters

settings1 Dictionary<string, string>
settings2 Dictionary<string, string>

Returns

Dictionary<string, string>

SetSetting(Dictionary<string, string>, string, string)

Sets the value of the given settingName (key) in the given key-value dictionary

Dictionary<string, string> SetSetting(Dictionary<string, string> settings, string settingName, string settingValue)

Parameters

settings Dictionary<string, string>
settingName string
settingValue string

Returns

Dictionary<string, string>

SetSetting(Dictionary<string, string>, string, string, bool)

Dictionary<string, string> SetSetting(Dictionary<string, string> settings, string settingName, string settingValue, bool isPrivate)

Parameters

settings Dictionary<string, string>
settingName string
settingValue string
isPrivate bool

Returns

Dictionary<string, string>

UpdateFolderSettingsAsync(Dictionary<string, string>, int)

Updates a folder setting

Task UpdateFolderSettingsAsync(Dictionary<string, string> folderSettings, int folderId)

Parameters

folderSettings Dictionary<string, string>
folderId int

Returns

Task

UpdateHostSettingsAsync(Dictionary<string, string>)

Updates a host setting

Task UpdateHostSettingsAsync(Dictionary<string, string> hostSettings)

Parameters

hostSettings Dictionary<string, string>

Returns

Task

UpdateModuleDefinitionSettingsAsync(Dictionary<string, string>, int)

Updates a module setting

Task UpdateModuleDefinitionSettingsAsync(Dictionary<string, string> moduleDefinitionSettings, int moduleDefinitionId)

Parameters

moduleDefinitionSettings Dictionary<string, string>
moduleDefinitionId int

Returns

Task

UpdateModuleSettingsAsync(Dictionary<string, string>, int)

Updates a module setting

Task UpdateModuleSettingsAsync(Dictionary<string, string> moduleSettings, int moduleId)

Parameters

moduleSettings Dictionary<string, string>
moduleId int

Returns

Task

UpdatePageModuleSettingsAsync(Dictionary<string, string>, int)

Updates a page module setting

Task UpdatePageModuleSettingsAsync(Dictionary<string, string> pageModuleSettings, int pageModuleId)

Parameters

pageModuleSettings Dictionary<string, string>
pageModuleId int

Returns

Task

UpdatePageSettingsAsync(Dictionary<string, string>, int)

Updates a page setting

Task UpdatePageSettingsAsync(Dictionary<string, string> pageSettings, int pageId)

Parameters

pageSettings Dictionary<string, string>
pageId int

Returns

Task

UpdateSettingAsync(Setting)

Updates a existing setting

Task<Setting> UpdateSettingAsync(Setting setting)

Parameters

setting Setting

Returns

Task<Setting>

UpdateSettingsAsync(Dictionary<string, string>, string, int)

Updates settings for a given entityName and Id

Task UpdateSettingsAsync(Dictionary<string, string> settings, string entityName, int entityId)

Parameters

settings Dictionary<string, string>
entityName string
entityId int

Returns

Task

UpdateSiteSettingsAsync(Dictionary<string, string>, int)

Updates a site setting

Task UpdateSiteSettingsAsync(Dictionary<string, string> siteSettings, int siteId)

Parameters

siteSettings Dictionary<string, string>
siteId int

Returns

Task

UpdateTenantSettingsAsync(Dictionary<string, string>)

Updates a tenant setting

Task UpdateTenantSettingsAsync(Dictionary<string, string> tenantSettings)

Parameters

tenantSettings Dictionary<string, string>

Returns

Task

UpdateUserSettingsAsync(Dictionary<string, string>, int)

Updates a user setting

Task UpdateUserSettingsAsync(Dictionary<string, string> userSettings, int userId)

Parameters

userSettings Dictionary<string, string>
userId int

Returns

Task

UpdateVisitorSettingsAsync(Dictionary<string, string>, int)

Updates a visitor setting

Task UpdateVisitorSettingsAsync(Dictionary<string, string> visitorSettings, int visitorId)

Parameters

visitorSettings Dictionary<string, string>
visitorId int

Returns

Task