createSiteLinksFeedMapping(feedMappingService, siteLinksFeed);
}
for (long campaignId : campaignIds) {
// Get legacy sitelinks for the campaign.
CampaignAdExtension extension =
getLegacySitelinksForCampaign(campaignExtensionService, campaignId);
if (extension != null) {
// Get the sitelinks.
Sitelink[] legacySitelinks =
((SitelinksExtension) extension.getAdExtension()).getSitelinks();
// Add the sitelinks to the feed.
List<Long> siteLinkFeedItemIds =
createSiteLinkFeedItems(feedItemService, siteLinksFeed, legacySitelinks);