Class DataDefinition
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
Data definition base class
public class DataDefinition : IStructuredData
- Inheritance
-
objectDataDefinition
- Implements
- Derived
- Extension Methods
Constructors
DataDefinition()
Constructor, creates empty not initialized data definition
public DataDefinition()
DataDefinition(string)
Constructor, creates the form info structure and loads specified form definition.
public DataDefinition(string dataDefinition)
Parameters
dataDefinition
stringXML definition of the data
Properties
ItemsList
Returns list of all FormItems.
public List<IDataDefinitionItem> ItemsList { get; protected set; }
Property Value
- List<IDataDefinitionItem>
Methods
GetFields<ItemType>()
Gets the field of the given type
public IEnumerable<ItemType> GetFields<ItemType>() where ItemType : IDataDefinitionItem
Returns
- IEnumerable<ItemType>
Type Parameters
ItemType
GetXmlElement(XmlDocument)
Gets the XML element for the data
public virtual XmlElement GetXmlElement(XmlDocument doc)
Parameters
doc
XmlDocumentParent XML document
Returns
- XmlElement
LoadField(XmlNode)
Loads the field from the XML node
protected virtual IDataDefinitionItem LoadField(XmlNode node)
Parameters
node
XmlNodeXML node
Returns
LoadFromDataStructure(string, TableManager, bool)
Loads the data definition from structure of a database table
public void LoadFromDataStructure(string tableName, TableManager manager, bool isSystem = false)
Parameters
tableName
stringDatabase table name
manager
TableManagerTable manager instance to use
isSystem
boolIf it is true, all field are assigned like system
LoadFromDefinition(string)
Loads the data definition from XML file
public void LoadFromDefinition(string dataDefinition)
Parameters
dataDefinition
stringData definition
LoadFromXmlElement(XmlElement)
Loads the data from the given XML element
public virtual void LoadFromXmlElement(XmlElement element)
Parameters
element
XmlElementXML element
LoadItem(XmlNode)
Loads the item from the XML node
protected virtual IDataDefinitionItem LoadItem(XmlNode node)
Parameters
node
XmlNodeXML node
Returns
NewFieldDefinition()
Creates a new field definition object
protected virtual IDataDefinitionItem NewFieldDefinition()