Class DynamicStructureService
- Namespace
- Dynamicweb.Indexing.Dynamic
Structuring
- Assembly
- Dynamicweb.Core.dll
The class DynamicStructureService
provids different methods for querying and saving the dynamic structures.
- Inheritance
-
Dynamic
Structure Service
- Inherited Members
Methods
ClearCache()
Clear dynamic structures cache.
Delete(IEnumerable<Guid>)
Delete the dynamic structure.
Parameters
dynamicStructureIds
IEnumerable<Guid>The dynamic structures
Delete(IEnumerable<string>)
Delete the dynamic structure.
Parameters
dynamicStructureIds
IEnumerable<string>The dynamic structures
Delete(Guid)
Delete the dynamic structure.
Parameters
dynamicStructureId
GuidThe dynamic structure
Delete(string)
Delete the dynamic structure.
Parameters
dynamicStructureId
stringThe dynamic structure
DeleteStructureLevel(string, int)
Delete the dynamic structure.
Parameters
DeleteStructureLevels(string)
Delete the dynamic structure.
Parameters
dynamicStructureId
stringThe dynamic structure
GetAll()
Gets all dynamic structures.
Returns
GetById(Guid)
Gets the dynamic structure by id.
Parameters
dynamicStructureId
GuidThe dynamic structure id
Returns
GetById(string)
Gets the dynamic structure by id.
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
DynamicStructure The dynamicStructure containing levels info.
scope
DynamicStructure Level Scope The level scope with previous levels values
Returns
- IEnumerable<Dynamic
Structure >Level 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
DynamicStructure Level Scope The 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<DynamicStructure >Level 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
DynamicStructure The dynamicStructure containing levels info.
structureScope
DynamicStructure Level Scope The level scope with previous levels values
Returns
- Dynamic
Structure Level 'No match' level if according to structure scope there are results with empty values, otherwise
null
Save(DynamicStructure)
Saves the dynamic structure.
Parameters
dynamicStructure
DynamicStructure The 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.