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
dynamicStructureIds
IEnumerable<Guid>The dynamic structures
Delete(IEnumerable<string>)
Delete the dynamic structure.
public void Delete(IEnumerable<string> dynamicStructureIds)
Parameters
dynamicStructureIds
IEnumerable<string>The dynamic structures
Delete(Guid)
Delete the dynamic structure.
public void Delete(Guid dynamicStructureId)
Parameters
dynamicStructureId
GuidThe dynamic structure
Delete(string)
Delete the dynamic structure.
public void Delete(string dynamicStructureId)
Parameters
dynamicStructureId
stringThe 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
dynamicStructureId
stringThe 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
dynamicStructureId
GuidThe dynamic structure id
Returns
GetById(string)
Gets the dynamic structure by id.
public DynamicStructure GetById(string dynamicStructureId)
Parameters
dynamicStructureId
stringThe dynamic structure id
Returns
GetDynamicStructureChildLevels(DynamicStructure, DynamicStructureLevelScope)
Gets child levels for current level scope
public static IEnumerable<DynamicStructureLevel> GetDynamicStructureChildLevels(DynamicStructure dynamicStructure, DynamicStructureLevelScope scope)
Parameters
dynamicStructure
DynamicStructureThe dynamicStructure containing levels info.
scope
DynamicStructureLevelScopeThe 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
scope
DynamicStructureLevelScopeThe 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
dynamicStructureLevels
List<DynamicStructureLevel>The structure levels.
values
List<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
dynamicStructure
DynamicStructureThe dynamicStructure containing levels info.
structureScope
DynamicStructureLevelScopeThe 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
dynamicStructure
DynamicStructureThe 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
dynamicStructures
IEnumerable<DynamicStructure>The dynamic structures.
sourceField
stringSource field to find.
newSourceField
stringNew 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)