This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<contentSearch> | |
<!-- Configuration sections for indexes --> | |
<indexConfigurations> | |
<!-- If an index has no configuration specified, it will use the configuration below. The configuration is not merged if the index also has | |
configuration, it is either this configuration or the index configuration. --> | |
<customSolrIndexConfiguration type="Sitecore.ContentSearch.SolrProvider.SolrIndexConfiguration, Sitecore.ContentSearch.SolrProvider"> | |
<!-- This flag will index all fields by default. This allows new fields in your templates to automatically be included into the index. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class XMLSystemSettings : Sitecore.DataExchange.IPlugin | |
{ | |
public XMLSystemSettings() | |
{ | |
} | |
public string XMLNodeName { get; set; } | |
public string XMLPath { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class EndpointExtensions | |
{ | |
//This extension method makes it easier to access the plugin when it is needed. | |
//Providing extension methods to access a plugin is a best practice to consider when implementing a provider for Data Exchange Framework. | |
public static XMLSystemSettings GetXMLSystemSettings(this Endpoint endpoint) | |
{ | |
return endpoint.GetPlugin<XMLSystemSettings>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class XMLSystemEndpointItemModel : ItemModel | |
{ | |
public const string XMLNodeName = "XMLNodeName"; | |
public const string XMLPath = "XMLPath"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class XMLSystemEndpointConverter : BaseEndpointConverter<ItemModel> | |
{ | |
//the id from the endpoint template you created named XML Endpoint. | |
private static readonly Guid TemplateId = Guid.Parse("{CC05EF8C-F4C8-4EB9-A39A-8E71F978C1DD}"); | |
public XMLSystemEndpointConverter(IItemModelRepository repository) : base(repository) | |
{ | |
//identify the template an item must be based | |
//on in order for the converter to be able to | |
//convert the item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReadXMLDataStepItemModel : ItemModel | |
{ | |
public const string EndpointFrom = "EndpointFrom"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReadXMLDataStepConverter : BasePipelineStepConverter<ItemModel> | |
{ | |
// the id from the pipeline step template you created named Read XML Data Pipeline Step. | |
private static readonly Guid TemplateId = Guid.Parse("{00191A02-F1B4-406C-B3CB-60568CCDD6D3}"); | |
public ReadXMLDataStepConverter(IItemModelRepository repository) : base(repository) | |
{ | |
this.SupportedTemplateIds.Add(TemplateId); | |
} | |
protected override void AddPlugins(ItemModel source, PipelineStep pipelineStep) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[RequiredEndpointPlugins(typeof(XMLSystemSettings))] | |
public class ReadXMLDataStepProcessor : BaseReadDataStepProcessor | |
{ | |
public ReadXMLDataStepProcessor() | |
{ | |
} | |
protected override void ReadData( | |
Endpoint endpoint, | |
PipelineStep pipelineStep, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class XMLElementValueAccessorItemModel | |
{ | |
public const string ElementName = "ElementName"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class XMLElementValueReader : IValueReader | |
{ | |
public readonly string ElementName; | |
public XMLElementValueReader(string elementName) | |
{ | |
this.ElementName = elementName; | |
} | |
public CanReadResult CanRead(object source, DataAccessContext context) |
OlderNewer