Class SettingPresetService
- Namespace
- Dynamicweb.Setting
Presets
- Assembly
- Dynamicweb.Core.dll
The SettingPresetService class providing methods for querying and saving the SettingPreset Aggregate to and from persistence.
public class SettingPresetService : ICacheStorage<int, SettingPreset>, ICacheStorage<int>, ICacheStorage
- Inheritance
-
Setting
Preset Service
- Implements
- Inherited Members
Methods
ClearCache()
Resets all keys to the default value for objects stored in the object cache
ClearCache(IEnumerable<int>)
Resets the specified keys to the default value for objects stored in the object cache
Parameters
keys
IEnumerable<int>Keys to reset
ClearCache(int)
Resets the specified key to the default value for objects stored in the object cache
Parameters
key
intKey to reset
Delete(List<int>)
Deletes the SettingPreset, its values and relations.
Parameters
Delete(int)
Deletes the SettingPreset, its values and relations.
Parameters
SettingPresetId
intThe SettingPreset ID.
GetAll()
Gets all Setting presets
Returns
- IEnumerable<Setting
Preset > The collection of the Setting
Preset
GetByGroupIds(IEnumerable<int>)
Get all the presets which is assigned to eiher of the given user groups
Parameters
groupIds
IEnumerable<int>A list of user group ids
Returns
- IEnumerable<Setting
Preset > The collection of the Setting
Preset .
GetById(int)
Gets the Setting preset matching the given id
Parameters
id
intThe id for the setting preset to find
Returns
GetByTarget(string)
Gets current user Setting presets for specific Target.
Parameters
target
stringThe preset target.
Returns
- IEnumerable<Setting
Preset > The collection of the Setting
Preset .
GetByTarget(string, int)
Gets the user Setting presets for specific Target.
Parameters
Returns
- IEnumerable<Setting
Preset > The collection of the Setting
Preset .
GetByUserId(int)
Get all the presets which is assigned directly to the given userId
Parameters
userId
intThe user ID.
Returns
- IEnumerable<Setting
Preset > The collection of the Setting
Preset .
GetCache(IEnumerable<int>)
Parameters
keys
IEnumerable<int>
Returns
GetCache(int)
Parameters
key
int
Returns
GetValues(int)
Gets the Setting preset values.
Parameters
presetId
intThe preset ID.
Returns
- Dictionary<string, Setting
Preset >Value The dictionary of the Setting
Preset with Key as key.Value
Save(SettingPreset)
Saves the SettingPreset.
Parameters
settingPreset
SettingPreset The SettingPreset.
SaveValues(IEnumerable<SettingPresetValue>)
Saves the Setting preset values.
Parameters
presetValues
IEnumerable<SettingPreset >Value The Setting preset values.