public virtual void Process(GetItemDefinitionArgs args) { Assert.ArgumentNotNull(args, "args"); Assert.ArgumentNotNull(args.ItemId, "args.ItemId"); var args2 = new IsHandledArgs(args.ItemId, args.Context); CorePipeline.Run("contactFacetDataProvider.isHandled", args2); if (!args2.IsHandled) { args.AbortPipeline(); } }
public virtual void Process(GetItemDefinitionArgs args) { Assert.ArgumentNotNull(args, "args"); Assert.ArgumentNotNull(args.ItemId, "args.ItemId"); var args2 = new IsHandledArgs(args.ItemId, args.Context); CorePipeline.Run("contactFacetDataProvider.isHandled", args2); if (!args2.IsHandled) { args.AbortPipeline(); } }
public virtual void Process(GetItemDefinitionArgs args) { Assert.ArgumentNotNull(args, "args"); Assert.ArgumentNotNull(args.ItemId, "args.ItemId"); Assert.ArgumentNotNull(args.Context, "args.Context"); //TODO: finish if (args.ItemId == Sitecore.Strategy.Contacts.DataProviders.ItemIDs.ContactsFolder) { args.ItemDefinition = new ItemDefinition(args.ItemId, "Contacts", Sitecore.TemplateIDs.Folder, ID.Null); return; } else if (args.ItemId == Sitecore.Strategy.Contacts.DataProviders.ItemIDs.ContactFacetsFolder) { args.ItemDefinition = new ItemDefinition(args.ItemId, "Facets", Sitecore.TemplateIDs.Folder, ID.Null); return; } else if (ContactFacetIdFactory.GetContactFacetIDProvider().IsFacetItem(args.ItemId)) { var key = ContactFacetIdFactory.GetContactFacetIDProvider().GetFacetName(args.ItemId); if (!string.IsNullOrEmpty(key)) { args.ItemDefinition = new ItemDefinition(args.ItemId, ItemUtil.ProposeValidItemName(key), Sitecore.Strategy.Contacts.DataProviders.TemplateIDs.ContactFacetTemplate, ID.Null); return; } } else if (ContactFacetIdFactory.GetContactFacetIDProvider().IsFacetMemberItem(args.ItemId)) { var key = ContactFacetIdFactory.GetContactFacetIDProvider().GetFacetMemberName(args.ItemId); if (!string.IsNullOrEmpty(key)) { args.ItemDefinition = new ItemDefinition(args.ItemId, ItemUtil.ProposeValidItemName(key), Sitecore.Strategy.Contacts.DataProviders.TemplateIDs.ContactFacetMemberTemplate, ID.Null); return; } } else if (ContactFacetIdFactory.GetContactFacetIDProvider().IsFacetMemberValueItem(args.ItemId)) { var key = ContactFacetIdFactory.GetContactFacetIDProvider().GetFacetMemberValue(args.ItemId); if (!string.IsNullOrEmpty(key)) { args.ItemDefinition = new ItemDefinition(args.ItemId, ItemUtil.ProposeValidItemName(key), Sitecore.Strategy.Contacts.DataProviders.TemplateIDs.ContactFacetMemberValueTemplate, ID.Null); return; } } }
public virtual void Process(GetItemDefinitionArgs args) { Assert.ArgumentNotNull(args, "args"); Assert.ArgumentNotNull(args.ItemId, "args.ItemId"); Assert.ArgumentNotNull(args.Context, "args.Context"); //TODO: finish if (args.ItemId == Sitecore.Strategy.Contacts.DataProviders.ItemIDs.ContactsFolder) { args.ItemDefinition = new ItemDefinition(args.ItemId, "Contacts", Sitecore.TemplateIDs.Folder, ID.Null); return; } else if (args.ItemId == Sitecore.Strategy.Contacts.DataProviders.ItemIDs.ContactFacetsFolder) { args.ItemDefinition = new ItemDefinition(args.ItemId, "Facets", Sitecore.TemplateIDs.Folder, ID.Null); return; } else if (IDTableHelper.IsFacetItem(args.ItemId)) { var key = IDTableHelper.GetFacetName(args.ItemId); if (!string.IsNullOrEmpty(key)) { args.ItemDefinition = new ItemDefinition(args.ItemId, ItemUtil.ProposeValidItemName(key), Sitecore.Strategy.Contacts.DataProviders.TemplateIDs.ContactFacetTemplate, ID.Null); return; } } else if (IDTableHelper.IsFacetMemberItem(args.ItemId)) { var key = IDTableHelper.GetFacetMemberName(args.ItemId); if (!string.IsNullOrEmpty(key)) { args.ItemDefinition = new ItemDefinition(args.ItemId, ItemUtil.ProposeValidItemName(key), Sitecore.Strategy.Contacts.DataProviders.TemplateIDs.ContactFacetMemberTemplate, ID.Null); return; } } else if (IDTableHelper.IsFacetMemberValueItem(args.ItemId)) { var key = IDTableHelper.GetFacetMemberValue(args.ItemId); if (!string.IsNullOrEmpty(key)) { args.ItemDefinition = new ItemDefinition(args.ItemId, ItemUtil.ProposeValidItemName(key), Sitecore.Strategy.Contacts.DataProviders.TemplateIDs.ContactFacetMemberValueTemplate, ID.Null); return; } } }
public override ItemDefinition GetItemDefinition(ID itemId, CallContext context) { var args = new GetItemDefinitionArgs(itemId, context); CorePipeline.Run("contactFacetDataProvider.getItemDefinition", args); return args.ItemDefinition; }