C# Class SenseNet.ContentRepository.Field

Field represent an atomic data of a Content
A Field represents an atomic data type from the perspective of the system. It usually handles Fields usually handles a single ContentHandler property. It is also capable of handling of multiple ContentHandler properties (see the WhoAndWhen Field for an example). It may also consist of values computed from the handled ContentHandler propery(s) or even represent data independent of these properties. In the communication bus this atomic data type is resembled as a transfer object: ContentHandler<--properties--> Field <--transfer object--> FieldControl (Content, ContenView) The Field constructs a transfer object from ContentHandler properties and passes it up to the FieldControl. At the same time this tranfer object is disassembled to ContentHandler properties when passing its data down to the ContentHandler. The Field class is responsible for invoking data validation (data validation itself is done by the FieldSetting property). The class Field can be resembled as bridge between ContentHandlerproperties and ContentView (or any other ways of data output/input). The Field class is also one of the most important system extension points (among with ContentHandler). By defining a new Field class a system-wide usable atomic data type is defined. This kind of extension is usually done when having a need of a more complex or different type than ones already defined in the system.
Inheritance: IIndexableField
Afficher le fichier Open project: maxpavlov/FlexNet Class Usage Examples

Private Properties

Свойство Type Description
Create Field
DoValidate bool
Export void
Export2 void
GetExportName string
GetInnerXml string
Import void
Import void
ParseImportName string
Save void
SetDefaultValue void
Validate bool

Méthodes publiques

Méthode Description
GetData ( ) : object

Returns object data which is a transfer object.

GetIndexFieldInfos ( string &textExtract ) : IEnumerable
GetValidationMessage ( ) : string
HasValue ( ) : bool
Parse ( string value ) : bool
SetData ( object value ) : void

Sets object data which is a transfer object.

WriteXml ( XmlWriter writer ) : void

Méthodes protégées

Méthode Description
ConvertFrom ( object value ) : object[]

Creates ContentHandler properties from the transfer object.

ConvertTo ( object handlerValues ) : object

Creates a transfer object from ContentHandler properties

ExportData ( XmlWriter writer, ExportContext context ) : void
ExportData2 ( XmlWriter writer, ExportContext context ) : void
ExportNotImplementedException ( ) : Exception
ExportNotImplementedException ( object notImplementedValue ) : Exception
Field ( ) : System
GetHandlerSlot ( int slotIndex ) : Type

Gets the type of the slot.

A slot type may represent numeros CLR types in compile time. In runtime, however a single type from the previously defined enumeration is assigned to this slot. This function returns this type in runtime.

GetXmlData ( ) : string
ImportData ( XmlNode fieldNode ) : void

For Powershell provider

ImportData ( XmlNode fieldNode, ImportContext context ) : void

For old-way-import

InvalidImportDataException ( string message ) : Exception
InvalidImportDataException ( string message, Exception innerException ) : Exception
OnSaveCompleted ( ) : void
ParseValue ( string value ) : bool
ReadProperties ( ) : object
ReadProperty ( string propertyName ) : object
WriteProperties ( object value ) : void
WriteProperty ( string propertyName, object value ) : void
WriteXmlData ( XmlWriter writer ) : void

Private Methods

Méthode Description
Create ( Content content, FieldSetting fieldSetting ) : Field
DoValidate ( ) : bool
Export ( XmlWriter writer, ExportContext context ) : void
Export2 ( XmlWriter writer, ExportContext context ) : void
GetExportName ( string fieldName, FieldSubType &subType ) : string
GetInnerXml ( ) : string
Import ( XmlNode fieldNode ) : void

For Powershell provider

Import ( XmlNode fieldNode, ImportContext context ) : void

For old-way-import

ParseImportName ( string importName, FieldSubType subType ) : string
Save ( bool validOnly ) : void
SetDefaultValue ( ) : void
Validate ( ) : bool

Method Details

ConvertFrom() protected méthode

Creates ContentHandler properties from the transfer object.
protected ConvertFrom ( object value ) : object[]
value object
Résultat object[]

ConvertTo() protected méthode

Creates a transfer object from ContentHandler properties
protected ConvertTo ( object handlerValues ) : object
handlerValues object
Résultat object

ExportData() protected méthode

protected ExportData ( XmlWriter writer, ExportContext context ) : void
writer System.Xml.XmlWriter
context ExportContext
Résultat void

ExportData2() protected méthode

protected ExportData2 ( XmlWriter writer, ExportContext context ) : void
writer System.Xml.XmlWriter
context ExportContext
Résultat void

ExportNotImplementedException() protected méthode

protected ExportNotImplementedException ( ) : Exception
Résultat System.Exception

ExportNotImplementedException() protected méthode

protected ExportNotImplementedException ( object notImplementedValue ) : Exception
notImplementedValue object
Résultat System.Exception

Field() protected méthode

protected Field ( ) : System
Résultat System

GetData() public méthode

Returns object data which is a transfer object.
public GetData ( ) : object
Résultat object

GetHandlerSlot() protected méthode

Gets the type of the slot.
A slot type may represent numeros CLR types in compile time. In runtime, however a single type from the previously defined enumeration is assigned to this slot. This function returns this type in runtime.
protected GetHandlerSlot ( int slotIndex ) : Type
slotIndex int Index of the slot of which the type is needed
Résultat System.Type

GetIndexFieldInfos() public méthode

public GetIndexFieldInfos ( string &textExtract ) : IEnumerable
textExtract string
Résultat IEnumerable

GetValidationMessage() public méthode

public GetValidationMessage ( ) : string
Résultat string

GetXmlData() protected méthode

protected GetXmlData ( ) : string
Résultat string

HasValue() public méthode

public HasValue ( ) : bool
Résultat bool

ImportData() protected méthode

For Powershell provider
protected ImportData ( XmlNode fieldNode ) : void
fieldNode System.Xml.XmlNode
Résultat void

ImportData() protected abstract méthode

For old-way-import
protected abstract ImportData ( XmlNode fieldNode, ImportContext context ) : void
fieldNode System.Xml.XmlNode
context ImportContext
Résultat void

InvalidImportDataException() protected méthode

protected InvalidImportDataException ( string message ) : Exception
message string
Résultat System.Exception

InvalidImportDataException() protected méthode

protected InvalidImportDataException ( string message, Exception innerException ) : Exception
message string
innerException System.Exception
Résultat System.Exception

OnSaveCompleted() protected méthode

protected OnSaveCompleted ( ) : void
Résultat void

Parse() public méthode

public Parse ( string value ) : bool
value string
Résultat bool

ParseValue() protected méthode

protected ParseValue ( string value ) : bool
value string
Résultat bool

ReadProperties() protected méthode

protected ReadProperties ( ) : object
Résultat object

ReadProperty() protected méthode

protected ReadProperty ( string propertyName ) : object
propertyName string
Résultat object

SetData() public méthode

Sets object data which is a transfer object.
public SetData ( object value ) : void
value object
Résultat void

WriteProperties() protected méthode

protected WriteProperties ( object value ) : void
value object
Résultat void

WriteProperty() protected méthode

protected WriteProperty ( string propertyName, object value ) : void
propertyName string
value object
Résultat void

WriteXml() public méthode

public WriteXml ( XmlWriter writer ) : void
writer System.Xml.XmlWriter
Résultat void

WriteXmlData() protected méthode

protected WriteXmlData ( XmlWriter writer ) : void
writer System.Xml.XmlWriter
Résultat void