C# Class erminas.SmartAPI.CMS.Project.ContentClasses.Elements.ContentClassElement

Base class for content class element types.
For every attribute/property that can be compared and/or saved there has to be an IRDAttribute created and registered, so that the comparison/assignement can be made independent of the element type.
Inheritance: LanguageDependentPartialRedDotProjectObject, IContentClassElement
Exibir arquivo Open project: erminas/smartapi Class Usage Examples

Public Methods

Method Description
CommitInCurrentLanguage ( ) : void

Save element on the server. Saves only the attributes!

CommitInLanguage ( string abbreviation ) : void
CopyToContentClass ( IContentClass contentClass ) : IContentClassElement

Copies the element to another content class by creating a new element and copying the attribute values to it. Make sure to set the language variant in the target project into which the element should be copied, first.

Override this method, if you need to set other values than the direct attributes of the element (e.g. setting text values of TextHtml elements) The target content class is only modified on the server, thus the content class object does not contain the newly created element. If you need an updated version of the content class, you have to retrieve it again with new ContentClass(Project, Guid);

Protected Methods

Method Description
ContentClassElement ( IContentClass contentClass, XmlElement xmlElement ) : System
LoadWholeObject ( ) : void
RetrieveWholeObject ( ) : XmlElement

Private Methods

Method Description
CreateElement ( IContentClass contentClass, ElementType elementType ) : ContentClassElement

Create an empty element of a specific type as child of a content class. Does not insert the element into the contentclass itself, but just provides a vanilla element with an XML node that contains only the "elttype" and the empty "guid" attribute.

CreateElement ( IContentClass contentClass, XmlElement xmlElement ) : ContentClassElement

Create an element out of its XML representation (uses the attribute "elttype") to determine the element type and create the appropriate object.

CreateElement ( IContentClass contentClass, System.Guid elementGuid ) : IContentClassElement
GetRQLRepresentation ( IProject project, System.Guid ccElementGuid ) : XmlElement
LoadXml ( ) : void

Method Details

CommitInCurrentLanguage() public method

Save element on the server. Saves only the attributes!
public CommitInCurrentLanguage ( ) : void
return void

CommitInLanguage() public method

public CommitInLanguage ( string abbreviation ) : void
abbreviation string
return void

ContentClassElement() protected method

protected ContentClassElement ( IContentClass contentClass, XmlElement xmlElement ) : System
contentClass IContentClass
xmlElement System.Xml.XmlElement
return System

CopyToContentClass() public method

Copies the element to another content class by creating a new element and copying the attribute values to it. Make sure to set the language variant in the target project into which the element should be copied, first.
Override this method, if you need to set other values than the direct attributes of the element (e.g. setting text values of TextHtml elements) The target content class is only modified on the server, thus the content class object does not contain the newly created element. If you need an updated version of the content class, you have to retrieve it again with new ContentClass(Project, Guid);
public CopyToContentClass ( IContentClass contentClass ) : IContentClassElement
contentClass IContentClass target content class, into which the element should be copied
return IContentClassElement

LoadWholeObject() protected method

protected LoadWholeObject ( ) : void
return void

RetrieveWholeObject() protected method

protected RetrieveWholeObject ( ) : XmlElement
return System.Xml.XmlElement