public SitecoreDataMap(Database db, string connectionString, Item importItem, ILogger l) : base(db, connectionString, importItem, l) { //get 'from' language ImportFromLanguage = GetImportItemLanguage("Import From Language"); //get recursive setting RecursivelyFetchChildren = ImportItem.GetItemBool("Recursively Fetch Children"); //populate property definitions PropertyDefinitions = GetPropDefinitions(ImportItem); ReferenceFieldDefinitions = GetReferenceFieldDefinitions(importItem); //populate template definitions TemplateMappingDefinitions = GetTemplateDefinitions(ImportItem); ComponentMappingDefinitions = GetComponentDefinitions(ImportItem); ImportRoot = GetImportRootItem(); DeleteOnOverwrite = ImportItem.GetItemBool("Delete On Overwrite"); PreserveChildren = ImportItem.GetItemBool("Preserve Children on Delete"); AllowItemNameMatch = ImportItem.GetItemBool("Allow Item Name Match"); PathRewrites = ImportItem.GetItemField("Path Rewrites", Logger) .Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries) .ToDictionary(s => s.Split(';')[0], s => s.Split(';')[1]); }
public SitecoreDataMap(Database db, string connectionString, Item importItem, ILogger l) : base(db, connectionString, importItem, l) { //get 'from' language ImportFromLanguage = GetImportItemLanguage("Import From Language"); //get recursive setting RecursivelyFetchChildren = ImportItem.GetItemBool("Recursively Fetch Children"); //populate property definitions PropertyDefinitions = GetPropDefinitions(ImportItem); //populate template definitions TemplateMappingDefinitions = GetTemplateDefinitions(ImportItem); }
public SitecoreDataMap(Database db, string connectionString, Item importItem, ILogger l) : base(db, connectionString, importItem, l) { //get 'from' language ImportFromLanguage = GetImportItemLanguage("Import From Language", FromDB); //get recursive setting RecursivelyFetchChildren = ImportItem.GetItemBool("Recursively Fetch Children"); //populate template definitions TemplateMappings = GetTemplateDefinitions(ImportItem); ComponentMappings = GetComponentDefinitions(ImportItem); ImportRoot = GetImportRootItem(); DeleteOnOverwrite = ImportItem.GetItemBool("Delete On Overwrite"); AllLanguages = LanguageManager.GetLanguages(ToDB).ToArray(); SkipIfExists = importItem.GetItemBool("Skip Already Imported Items"); SkipIfUpdatedAfter = importItem.GetItemDate("Skip If Updated After"); PresentationService = new PresentationService(l); }