C# Class ToSic.SexyContent.ImportExport.XmlImport

显示文件 Open project: 2sic/2sxc Class Usage Examples

Public Properties

Property Type Description
ImportLog List

Private Properties

Property Type Description
GetImportAttributeSets List
GetImportEntities List
GetImportEntity ToSic.Eav.Import.ImportEntity
GetMappedLink string
ImportXmlTemplates void
PrepareFileIdCorrectionList void
PrepareFolderIdCorrectionListAndCreateMissingFolders void

Public Methods

Method Description
GetExportImportMessagesFromImportLog ( List importLog ) : IEnumerable

Maps EAV import messages to 2sxc import messages

ImportApp ( int zoneId, System.Xml.Linq.XDocument doc, int &appId ) : bool

Creates an app and then imports the xml

ImportXml ( int zoneId, int appId, System.Xml.Linq.XDocument doc, bool leaveExistingValuesUntouched = true ) : bool

Do the import

IsCompatible ( System.Xml.Linq.XDocument doc ) : bool
XmlImport ( string defaultLanguage, string userName, bool allowSystemChanges = false ) : System

Create a new xmlImport instance

Private Methods

Method Description
GetImportAttributeSets ( IEnumerable xAttributeSets ) : List
GetImportEntities ( IEnumerable entities, int assignmentObjectTypeId ) : List

Returns a collection of EAV import entities

GetImportEntity ( System.Xml.Linq.XElement entityNode, int assignmentObjectTypeId ) : ToSic.Eav.Import.ImportEntity

Returns an EAV import entity

GetMappedLink ( string sourceValueString ) : string

Try to map a link like "file:275" from the import to the target system Will return null if nothing appropriate found, so the caller can choose to not do anything

ImportXmlTemplates ( System.Xml.Linq.XElement root ) : void
PrepareFileIdCorrectionList ( System.Xml.Linq.XElement sexyContentNode ) : void
PrepareFolderIdCorrectionListAndCreateMissingFolders ( System.Xml.Linq.XElement sexyContentNode ) : void

Method Details

GetExportImportMessagesFromImportLog() public method

Maps EAV import messages to 2sxc import messages
public GetExportImportMessagesFromImportLog ( List importLog ) : IEnumerable
importLog List
return IEnumerable

ImportApp() public method

Creates an app and then imports the xml
public ImportApp ( int zoneId, System.Xml.Linq.XDocument doc, int &appId ) : bool
zoneId int
doc System.Xml.Linq.XDocument
appId int
return bool

ImportXml() public method

Do the import
public ImportXml ( int zoneId, int appId, System.Xml.Linq.XDocument doc, bool leaveExistingValuesUntouched = true ) : bool
zoneId int
appId int
doc System.Xml.Linq.XDocument
leaveExistingValuesUntouched bool
return bool

IsCompatible() public method

public IsCompatible ( System.Xml.Linq.XDocument doc ) : bool
doc System.Xml.Linq.XDocument
return bool

XmlImport() public method

Create a new xmlImport instance
public XmlImport ( string defaultLanguage, string userName, bool allowSystemChanges = false ) : System
defaultLanguage string The portals default language / culture - example: de-DE
userName string
allowSystemChanges bool Specify if the import should be able to change system-wide things like shared attributesets
return System

Property Details

ImportLog public_oe property

public List ImportLog
return List