Table of Contents

Class DataDefinition

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Data definition base class

public class DataDefinition : IStructuredData
Inheritance
object
DataDefinition
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 string

XML 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 XmlDocument

Parent XML document

Returns

XmlElement

LoadField(XmlNode)

Loads the field from the XML node

protected virtual IDataDefinitionItem LoadField(XmlNode node)

Parameters

node XmlNode

XML node

Returns

IDataDefinitionItem

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 string

Database table name

manager TableManager

Table manager instance to use

isSystem bool

If 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 string

Data definition

LoadFromXmlElement(XmlElement)

Loads the data from the given XML element

public virtual void LoadFromXmlElement(XmlElement element)

Parameters

element XmlElement

XML element

LoadItem(XmlNode)

Loads the item from the XML node

protected virtual IDataDefinitionItem LoadItem(XmlNode node)

Parameters

node XmlNode

XML node

Returns

IDataDefinitionItem

NewFieldDefinition()

Creates a new field definition object

protected virtual IDataDefinitionItem NewFieldDefinition()

Returns

IDataDefinitionItem