public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string eventURL = null; if (item.InstanceOfTemplate(Genworth.SitecoreExt.Constants.Event.Templates.Webinar.Name)) { eventURL = item.GetText("Event", "Archive URL", string.Empty); } else if (item.InstanceOfTemplate(Genworth.SitecoreExt.Constants.Event.Templates.ConferenceCall.Name)) { string archiveUrl = string.Empty; if (!string.IsNullOrEmpty(archiveUrl = item.GetImageURL("Event", "Event Recording"))) { eventURL = archiveUrl; } } return(eventURL); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string allocationApproach = null; Item allocationApproachItem; var parentItems = item.Axes.GetAncestors(); foreach (Item parentItem in parentItems) { if (parentItem.InstanceOfTemplate(Constants.Investments.Templates.Strategy)) { //get the allocation approach allocationApproachItem = parentItem.GetListItem("Strategy", "Allocation Approach"); //is the allocation approach non-null? if (allocationApproachItem != null) { allocationApproach = allocationApproachItem.GetText("Asset Allocation Approach", "Title"); } } else if (parentItem.InstanceOfTemplate(Constants.Investments.Templates.AllocationApproach)) { allocationApproach = parentItem.GetText("Asset Allocation Approach", "Title"); } } return(allocationApproach); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string defaultPcStatus = "NotAvailable"; string pcStatus = string.Empty; if (item.InstanceOfTemplate(Genworth.SitecoreExt.Constants.Event.Templates.OnSite.Name)) { if (item.InstanceOfTemplate(Genworth.SitecoreExt.Constants.Event.Templates.PremierConsultantUpcomingMeeting.Name)) { pcStatus = GetPcStatusSecurity(item, defaultPcStatus); } else { pcStatus = defaultPcStatus; } } else if (item.InstanceOfTemplate(Genworth.SitecoreExt.Constants.Event.Templates.Webinar.Name) || item.InstanceOfTemplate(Genworth.SitecoreExt.Constants.Event.Templates.ConferenceCall.Name)) { pcStatus = defaultPcStatus; } return(pcStatus); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string strategyStatus = null; Item managerItem; if ((managerItem = item.Parent).InstanceOfTemplate(Constants.Investments.Templates.Manager)) { if (item.InstanceOfTemplate(Constants.Investments.Templates.ManagerStrategies.FixedIncome)) { strategyStatus = item.GetListItem("Strategy", "Status").DisplayName; } else if (item.InstanceOfTemplate(Constants.Investments.Templates.ManagerStrategies.USEquity)) { strategyStatus = item.GetListItem("Strategy", "Cap").DisplayName; } } return(strategyStatus); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string isAMHosted = "0"; if (item != null) { Sitecore.Data.Fields.LookupField field = item.Fields["Host"]; if (field != null && field.InnerField != null && !string.IsNullOrWhiteSpace(field.InnerField.Value) && field.InnerField.Value == "Genworth") { isAMHosted = "1"; } } return(isAMHosted); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string eventType = string.Empty; if (item.InstanceOfTemplate(Genworth.SitecoreExt.Constants.Event.Templates.OnSite.Name)) { eventType = Constants.Event.Types.InPerson; } else if (item.InstanceOfTemplate(Genworth.SitecoreExt.Constants.Event.Templates.Webinar.Name)) { eventType = Constants.Event.Types.Webinar; } else if (item.InstanceOfTemplate(Genworth.SitecoreExt.Constants.Event.Templates.ConferenceCall.Name)) { eventType = Constants.Event.Types.Conference; } return(eventType); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string prefixText = null; var termField = item.GetField(Constants.HelpCenter.Templates.GlossaryTerm.Sections.GlossaryTerm.Name, Constants.HelpCenter.Templates.GlossaryTerm.Sections.GlossaryTerm.Fields.TermFieldName); if (termField != null && !string.IsNullOrEmpty(termField.Value)) { string sPrefix = termField.Value.Trim().ElementAtOrDefault(0).ToString(); if (!string.IsNullOrEmpty(sPrefix)) { prefixText = string.Format("{0}{1}", Constants.HelpCenter.Indexes.GlossaryIndex.StartsWith, sPrefix.ToUpper()); } } return(prefixText); }
public static Item ValidIndexableItem(Sitecore.ContentSearch.IIndexable indexable, Sitecore.ContentSearch.ComputedFields.IComputedIndexField computedIndexField) { Assert.ArgumentNotNull(indexable, "indexable"); SC.ContentSearch.SitecoreIndexableItem scIndexable = indexable as SC.ContentSearch.SitecoreIndexableItem; if (scIndexable == null) { Log.Log.Warn( computedIndexField + " : unsupported IIndexable type : " + indexable.GetType()); return(null); } SC.Data.Items.Item item = (SC.Data.Items.Item)scIndexable; if (item == null) { Log.Log.Warn( computedIndexField + " : unsupported SitecoreIndexableItem type : " + scIndexable.GetType()); return(null); } if (item.Name == "__Standard Values") { Log.Log.Warn( computedIndexField + " : standard values' items are not indexed : " + scIndexable.GetType()); return(null); } return(item); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string documentPath = null; Sitecore.Data.Fields.FileField fileField = item.GetField(Constants.Documents.Templates.DocumentBase.Sections.Document.Name, Constants.Documents.Templates.DocumentBase.Sections.Document.Fields.File); if (fileField != null && fileField.MediaItem != null) { documentPath = item.GetImageURL(Constants.Documents.Templates.DocumentBase.Sections.Document.Name, Constants.Documents.Templates.DocumentBase.Sections.Document.Fields.File, string.Empty); // Sitecore incremental re-indexing issue on retrieving media url that could include the /sitecore/shell prefix string before the correct relative URL. if (documentPath.IndexOf("/~/") > 0) { Sitecore.Diagnostics.Log.Warn("Indexing Media Url for item [" + item.Paths.FullPath + "] returns incorrect Url. Trimming incorrect parts: from [" + documentPath + "] to [" + documentPath.Substring(documentPath.IndexOf("/~/")) + "]", this); documentPath = documentPath.Substring(documentPath.IndexOf("/~/")); } } return(documentPath); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } Item managerItem; string styleValue = null; if ((managerItem = item.Parent).InstanceOfTemplate(Constants.Investments.Templates.Manager)) { var style = new List <string>(); //add the template name to the style style.Add(item.Template.DisplayName); //is this item a us equity? if (item.InstanceOfTemplate(Constants.Investments.Templates.ManagerStrategies.FixedIncome)) { //append information style.Add(string.Format("{0} {1}", item.GetListItem("Strategy", "Status").DisplayName, item.GetListItem("Strategy", "Style").DisplayName).Trim()); } else if (item.InstanceOfTemplate(Constants.Investments.Templates.ManagerStrategies.InternationalGlobal)) { //append information style.Add(string.Format("{0}", item.GetListItem("Strategy", "Emerging").DisplayName).Trim()); } else if (item.InstanceOfTemplate(Constants.Investments.Templates.ManagerStrategies.Specialty)) { //append information style.Add(string.Format("{0} {1} {2}", item.GetText("Strategy", "REIT", "0").Equals("1") ? "REIT" : string.Empty, item.GetText("Strategy", "Multi Asset Income", "0").Equals("1") ? "Multi Asset Income" : string.Empty, item.GetText("Strategy", "Environment Social and Goverment", "0").Equals("1") ? "Environmental, Social and Governance" : string.Empty ).Trim()); } else if (item.InstanceOfTemplate(Constants.Investments.Templates.ManagerStrategies.USEquity)) { //append information style.Add(string.Format("{0} {1}", item.GetListItem("Strategy", "Cap").DisplayName, item.GetListItem("Strategy", "Style").DisplayName).Trim()); } //store the style information styleValue = string.Join(" - ", style.ToArray()); } return(styleValue); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } return(Constants.Investments.Indexes.Fields.Constant); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string url = item.GetText("Document", "URL"); return(string.IsNullOrWhiteSpace(url) ? null : url); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } var result = item.ID.ToShortID(); return(result.ToString()); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string omnitureId = OmnitureHelper.FormatItemId(OmnitureHelper.GetContentItem(item)); return(omnitureId); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string isManagerSelect = item.GetText("Manager", "Manager Select", "0"); return(isManagerSelect); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string audience = item.GetText("Security", "Client Approved", "0").Equals("1") ? Constants.Investments.Audiences.Client : Constants.Investments.Audiences.Advisor; return(audience); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string isIMA = item.GetText("Manager", "Individually Managed Accounts", "0"); return(isIMA); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string eventURL = null; if (item.InstanceOfTemplate(Genworth.SitecoreExt.Constants.Event.Templates.Webinar.Name)) { eventURL = item.GetText("Event", "Event URL", string.Empty); } return(eventURL); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string iconPath = null; var categoryItem = item.GetListItem("Document", "Category"); if (categoryItem != null) { iconPath = categoryItem.GetImageURL("Lookup", "Icon"); } return(iconPath); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string managerName = null; Item managerItem; if ((managerItem = item.Parent).InstanceOfTemplate(Constants.Investments.Templates.Manager)) { managerName = managerItem.GetText("Manager", "Name"); } return(managerName); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string solutionTypeId = null; Sitecore.Data.Fields.Field field; if ((field = item.GetField("Document", "Solutions")) != null && !string.IsNullOrWhiteSpace(field.Value)) { solutionTypeId = field.Value; } return(solutionTypeId); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string category = null; var categoryItem = item.GetListItem("Document", "Category"); if (categoryItem != null) { category = categoryItem.DisplayName; } return(category); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string source = null; var sourceItem = item.GetListItem("Document", "Source"); if (sourceItem != null) { source = sourceItem.DisplayName; } return(source); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string constant = null; Item managerItem; if ((managerItem = item.Parent).InstanceOfTemplate(Constants.Investments.Templates.Manager)) { constant = Constants.Investments.Indexes.Fields.Constant; } return(constant); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } var oUrlOptions = new UrlOptions(); oUrlOptions.AddAspxExtension = true; oUrlOptions.LanguageEmbedding = LanguageEmbedding.Always; oUrlOptions.Site = Sitecore.Sites.SiteContext.GetSite("website"); string itemNavigationPath = LinkManager.GetItemUrl(item, oUrlOptions); return(itemNavigationPath ?? string.Empty); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string custodianNames = null; Sitecore.Data.Fields.Field field; if ((field = item.GetField("Custodians")) != null && !string.IsNullOrWhiteSpace(field.Value)) { custodianNames = IndexingUtility.GetMultilistValues(field, "Name"); } return(custodianNames); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string fileContent = null; Sitecore.Data.Fields.FileField fileField = item.GetField(Constants.Documents.Templates.DocumentBase.Sections.Document.Name, Constants.Documents.Templates.DocumentBase.Sections.Document.Fields.File); if (fileField != null && fileField.MediaItem != null) { fileContent = PDFExtractorHelper.GetContent(fileField.MediaItem); } return(fileContent); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string fileExtension = null; Sitecore.Data.Fields.FileField fileField = item.GetField(Constants.Documents.Templates.DocumentBase.Sections.Document.Name, Constants.Documents.Templates.DocumentBase.Sections.Document.Fields.File); if (fileField != null && fileField.MediaItem != null) { Media mediaItem = MediaManager.GetMedia(fileField.MediaItem); fileExtension = mediaItem != null ? mediaItem.Extension : null; } return(fileExtension); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string managerName = null; var parentItems = item.Axes.GetAncestors(); foreach (Item parentItem in parentItems) { if (parentItem.InstanceOfTemplate(Constants.Investments.Templates.Manager)) { managerName = parentItem.GetText("Manager", "Name"); } } return(managerName); }
public object ComputeFieldValue(Sitecore.ContentSearch.IIndexable indexable) { var item = IndexingUtility.ValidIndexableItem(indexable, this); if (item == null) { return(null); } string strategistId = null; var parentItems = item.Axes.GetAncestors(); foreach (Item parentItem in parentItems) { if (parentItem.InstanceOfTemplate(Constants.Investments.Templates.Strategist)) { strategistId = parentItem.ID.ToString(); } } return(strategistId); }
public object ComputeFieldValue(IIndexable indexable) { var itemNamesConcatenated = new ItemNamesConcatenated(); return itemNamesConcatenated.GetLinkedItemNames(new IndexableWrapper(indexable), LinkedField); }