Class DynamicStructureService
- Namespace
- Dynamicweb.Indexing.DynamicStructuring
- Assembly
- Dynamicweb.Core.dll
The class DynamicStructureService provids different methods for querying and saving the dynamic structures.
public class DynamicStructureService
- Inheritance
-
DynamicStructureService
- Inherited Members
Methods
ClearCache()
Clear dynamic structures cache.
public void ClearCache()
Delete(IEnumerable<Guid>)
Delete the dynamic structure.
public void Delete(IEnumerable<Guid> dynamicStructureIds)
Parameters
dynamicStructureIdsIEnumerable<Guid>The dynamic structures
Delete(IEnumerable<string>)
Delete the dynamic structure.
public void Delete(IEnumerable<string> dynamicStructureIds)
Parameters
dynamicStructureIdsIEnumerable<string>The dynamic structures
Delete(Guid)
Delete the dynamic structure.
public void Delete(Guid dynamicStructureId)
Parameters
dynamicStructureIdGuidThe dynamic structure
Delete(string)
Delete the dynamic structure.
public void Delete(string dynamicStructureId)
Parameters
dynamicStructureIdstringThe dynamic structure
DeleteStructureLevel(string, int)
Delete the dynamic structure.
public void DeleteStructureLevel(string dynamicStructureId, int levelId)
Parameters
DeleteStructureLevels(string)
Delete the dynamic structure.
public void DeleteStructureLevels(string dynamicStructureId)
Parameters
dynamicStructureIdstringThe dynamic structure
GetAll()
Gets all dynamic structures.
public IEnumerable<DynamicStructure> GetAll()
Returns
GetById(Guid)
Gets the dynamic structure by id.
public DynamicStructure? GetById(Guid dynamicStructureId)
Parameters
dynamicStructureIdGuidThe dynamic structure id
Returns
GetById(string)
Gets the dynamic structure by id.
public DynamicStructure? GetById(string dynamicStructureId)
Parameters
dynamicStructureIdstringThe dynamic structure id
Returns
GetDynamicStructureChildLevels(DynamicStructure, DynamicStructureLevelScope)
Gets child levels for current level scope
public static IEnumerable<DynamicStructureLevel> GetDynamicStructureChildLevels(DynamicStructure dynamicStructure, DynamicStructureLevelScope scope)
Parameters
dynamicStructureDynamicStructureThe dynamicStructure containing levels info.
scopeDynamicStructureLevelScopeThe level scope with previous levels values
Returns
- IEnumerable<DynamicStructureLevel>
The collection of child levels for current level scope.
GetDynamicStructureScopeParameters(DynamicStructureLevelScope)
Gets dictionary of query parameters for specific scope.
public Dictionary<string, string> GetDynamicStructureScopeParameters(DynamicStructureLevelScope scope)
Parameters
scopeDynamicStructureLevelScopeThe level scope.
Returns
GetDynamicStructureScopeParameters(List<DynamicStructureLevel>, List<string>)
Gets dictionary of query parameters based on structure level and scope values.
public static Dictionary<string, string> GetDynamicStructureScopeParameters(List<DynamicStructureLevel> dynamicStructureLevels, List<string> values)
Parameters
dynamicStructureLevelsList<DynamicStructureLevel>The structure levels.
valuesList<string>The level scope values.
Returns
GetNoMatchLevel(DynamicStructure, DynamicStructureLevelScope)
Gets no match level for current level scope
public static DynamicStructureLevel? GetNoMatchLevel(DynamicStructure dynamicStructure, DynamicStructureLevelScope structureScope)
Parameters
dynamicStructureDynamicStructureThe dynamicStructure containing levels info.
structureScopeDynamicStructureLevelScopeThe level scope with previous levels values
Returns
- DynamicStructureLevel
'No match' level if according to structure scope there are results with empty values, otherwise
null
Save(DynamicStructure)
Saves the dynamic structure.
public void Save(DynamicStructure dynamicStructure)
Parameters
dynamicStructureDynamicStructureThe dynamic structure
UpdateStructureLevelsSourceField(IEnumerable<DynamicStructure>, string, string)
Finds the needed source field in levels of dynamic structures and replaces it by new one.
public void UpdateStructureLevelsSourceField(IEnumerable<DynamicStructure> dynamicStructures, string sourceField, string newSourceField)
Parameters
dynamicStructuresIEnumerable<DynamicStructure>The dynamic structures.
sourceFieldstringSource field to find.
newSourceFieldstringNew source field value.
UpdateStructureLevelsSourceField(string, string)
Finds the needed source field in levels of all dynamic structures and replaces it by new one.
public void UpdateStructureLevelsSourceField(string sourceField, string newSourceField)