Class MetadataManager
- Namespace
- Dynamicweb.Content.Items.Metadata
- Assembly
- Dynamicweb.dll
Represents a metadata manager. This class cannot be inherited.
public sealed class MetadataManager
- Inheritance
-
MetadataManager
- Inherited Members
Fields
ItemsDirectory
public const string ItemsDirectory = "/Files/System/Items/"
Field Value
Properties
Current
Gets the current instance of the metadata manager.
public static MetadataManager Current { get; }
Property Value
SourceLocation
Gets or sets the value which indicates the location of metadata storage.
public MetadataManager.SourceLocations SourceLocation { get; set; }
Property Value
- MetadataManager.SourceLocations
- The value which indicates the location of metadata storage.
Methods
CheckItemIntegrity(ItemType)
Returns the result of the item integrity check
public bool CheckItemIntegrity(ItemType meta)
Parameters
meta
ItemType- The item type.
Returns
- bool
- The result of the item integrity check
ClearOptionMetadataCache(FieldOptionSourceType)
Clear metadata cache for selected item source type
public void ClearOptionMetadataCache(FieldOptionSourceType itemSourceType)
Parameters
itemSourceType
FieldOptionSourceType- FieldOptionSourceType.
DeleteMetadata(MetadataContainer)
Deletes the metadata.
public void DeleteMetadata(MetadataContainer data)
Parameters
data
MetadataContainer- Metadata to delete.
GetBaseItems(ItemType)
Returns the list of item types the specified item is derived from.
public MetadataContainer GetBaseItems(ItemType meta)
Parameters
meta
ItemType- The item type.
Returns
- MetadataContainer
- The list of item types the specified item is derived from.
GetBaseItems(string)
Returns the list of item types the specified item is derived from.
public MetadataContainer GetBaseItems(string systemName)
Parameters
systemName
string- The item type system name.
Returns
- MetadataContainer
- The list of item types the specified item is derived from.
GetDerivedItems(ItemType)
Returns the list of derived items metadata.
public MetadataContainer GetDerivedItems(ItemType meta)
Parameters
meta
ItemType- The target base metadata.
Returns
GetInheritanceChain(ItemType)
Returns the list of item types which represents the inheritence chain of specified item type.
public MetadataContainer GetInheritanceChain(ItemType meta)
Parameters
meta
ItemType- The item type.
Returns
- MetadataContainer
- The list of item types which represents the inheritence chain of specified item type.
Remarks
Collection also contains the target metadata.
GetInheritanceChain(string)
Returns the list of item types which represents the inheritence chain of specified item type.
public MetadataContainer GetInheritanceChain(string systemName)
Parameters
systemName
string- The system name of item type.
Returns
- MetadataContainer
- The list of item types which represents the inheritence chain of specified item type
Remarks
Collection also contains the target metadata.
GetInheritanceRoot(ItemType)
Returns the root metadata in inheritance chain.
public ItemType GetInheritanceRoot(ItemType meta)
Parameters
meta
ItemType- The target metadata.
Returns
- ItemType
- The root metadata in inheritance chain.
GetItemFields(ItemEntry)
Returns the item fields metadata by using the item instance.
public FieldMetadataCollection GetItemFields(ItemEntry item)
Parameters
item
ItemEntry- Item.
Returns
- FieldMetadataCollection
- Item fields.
GetItemFields(ItemType)
Returns the item fields metadata by using the metadata.
public FieldMetadataCollection GetItemFields(ItemType meta)
Parameters
meta
ItemType- The metadata.
Returns
GetItemFields(string)
Returns the item fields metadata by using the item system name.
public FieldMetadataCollection GetItemFields(string systemName)
Parameters
systemName
string- System name of an item type.
Returns
- FieldMetadataCollection
- Item fields.
GetItemFieldsSortedByLayout(ItemType)
public FieldMetadataCollection GetItemFieldsSortedByLayout(ItemType meta)
Parameters
meta
ItemType
Returns
GetItemLayout(ItemType)
Returns the metadata layout.
public LayoutMetadata GetItemLayout(ItemType meta)
Parameters
meta
ItemType- The target metadata.
Returns
- LayoutMetadata
- The metadata layout.
GetItemType(ItemEntry)
Returns the item metadata by its instance.
public ItemType GetItemType(ItemEntry item)
Parameters
item
ItemEntry- Item.
Returns
- ItemType
- Item metadata.
GetItemType(string)
Returrn the item metadata by its system name.
public ItemType GetItemType(string systemName)
Parameters
systemName
string- System name of an item type.
Returns
- ItemType
- itemType
GetMetadata()
Returns the item metadata.
public MetadataContainer GetMetadata()
Returns
- MetadataContainer
- Item metadata.
Translate(ItemType)
Returns a translated copy of item if translations are exists.
public static ItemType Translate(ItemType item)
Parameters
item
ItemType- Item to translate
Returns
Translate(IEnumerable<ItemType>)
public static IEnumerable<ItemType> Translate(IEnumerable<ItemType> items)
Parameters
items
IEnumerable<ItemType>
Returns
UpdateMetadata(MetadataContainer)
Updates the metadata.
public void UpdateMetadata(MetadataContainer data)
Parameters
data
MetadataContainer- Metadata to update.