コード例 #1
0
        private void ExtractDataToBookItem(Book book, Item bookItem)
        {
            string publisher      = string.Empty;
            string series         = string.Empty;
            Item   publisherOwner = null;

            if (book.Publisher != null && book.Publisher.GroupItem != null)
            {
                publisherOwner = book.Publisher.GroupItem;
            }

            if (book.Authors != null && book.Authors.Count > 0)
            {
                this._authorSitecoreItemCreationHelper.ImportAuthorsItemsToSitecore(ContributorType.Author, ref book, ref ExistingAuthors, publisherOwner);
            }
            if (book.Illustrators != null && book.Illustrators.Count > 0)
            {
                this._authorSitecoreItemCreationHelper.ImportAuthorsItemsToSitecore(ContributorType.Illustrator, ref book, ref ExistingAuthors, publisherOwner);
            }
            if (book.Publisher != null)
            {
                publisher = _publisherSitecoreItemHelper.ImportPublishersItemsToSitecore(book.Publisher, ref ExistingPublishers);
            }
            if (book.Series != null)
            {
                series = _seriesSitecoreItemCreationHelper.ImportSeriesItemsToSitecore(book.Series, ref ExistingSeries, publisherOwner);
            }

            this.populateBookItemData(book, bookItem, publisher, series);

            //publish book item
            SitecorePublishHelper sp = new SitecorePublishHelper();

            sp.PublishItem(bookItem, false);
        }
コード例 #2
0
        private void ExtractDataFromAuthorObject(Author author, ContributorType contributorType, Item authorItem, Item publisherGroupOwner)
        {
            this.populateAuthorItemData(author, authorItem, contributorType, publisherGroupOwner);

            //publish author item
            SitecorePublishHelper sp = new SitecorePublishHelper();

            sp.PublishItem(authorItem, false);
        }
コード例 #3
0
        private ID ExtractDataFromBICCategoryObject(BICCategory BICCategory, Item BICCategoryItem)
        {
            //this.populatePublisherItemData(Publisher, PublisherItem);
            //publish Publisher item
            SitecorePublishHelper sp = new SitecorePublishHelper();

            sp.PublishItem(BICCategoryItem, false);

            return(BICCategoryItem.ID);
        }
コード例 #4
0
        private ID ExtractDataFromPublishersObject(Publisher Publisher, Item PublisherItem)
        {
            this.populatePublisherItemData(Publisher, PublisherItem);

            //publish Publisher item
            SitecorePublishHelper sp = new SitecorePublishHelper();

            sp.PublishItem(PublisherItem, false);

            return(PublisherItem.ID);
        }
コード例 #5
0
        private ID ExtractDataFromAuhorObject(Series series, Item SeriesItem, Item publisherGroupOwner)
        {
            this.populateSeriesItemData(series, SeriesItem, publisherGroupOwner);

            //publish Series item
            SitecorePublishHelper sp = new SitecorePublishHelper();

            sp.PublishItem(SeriesItem, false);

            return(SeriesItem.ID);
        }