dw.sitemap
Class SitemapMgr
Object
dw.sitemap.SitemapMgr
SitemapMgr is used to access and modify custom sitemap files.

To access custom sitemap files, use methods getCustomSitemapFiles().

To delete custom sitemap files, use methods deleteCustomSitemapFile(SitemapFile), deleteCustomSitemapFiles(String) and deleteCustomSitemapFiles().

To add custom sitemap files, use methods addCustomSitemapFile(String, File). The file will be copied from WebDAV (File represent a file in WebDAV) to the appservers shared file system.

Please note that all provided methods are operating in appservers shared file system. These modifications are visible via "Custom Sitemaps" tab under Merchant Tools => SEO => Sitemaps - Custom Sitemaps in Business Manager. To publish all changes, execute job under Merchant Tools => SEO => Sitemaps => Job.

Properties
customSitemapFiles  :  Map  (Read Only)
Reads all existing custom sitemap files from files system of the appservers custom sitemap directory into memory and returns them in a Map containing mappings like
  • Hostname 1 => [SitemapFile hostname1_sitemapfile1, SitemapFile hostname1_sitemapfile2]
  • Hostname 2 => [SitemapFile hostname2_sitemapfile1]
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
static addCustomSitemapFile(hostName : String, file : File) : void
Adds the given File to the appservers custom sitemap directory.
static deleteCustomSitemapFile(sitemapFile : SitemapFile) : void
Deletes the given custom sitemap file from the appservers shared file system.
static deleteCustomSitemapFiles(hostName : String) : void
Deletes all custom sitemap files for the given hostname from the appservers shared file system.
static deleteCustomSitemapFiles() : void
Deletes all custom sitemap files for all hostnames from the appservers shared file system.
static getCustomSitemapFiles() : Map
Reads all existing custom sitemap files from files system of the appservers custom sitemap directory into memory and returns them in a Map containing mappings like
  • Hostname 1 => [SitemapFile hostname1_sitemapfile1, SitemapFile hostname1_sitemapfile2]
  • Hostname 2 => [SitemapFile hostname2_sitemapfile1]
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.

Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβ€”passing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβ€”this is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?

This isn't just another prep courseβ€”it's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.

The Salesforce B2C Commerce Architect certification is a whole different gameβ€”complex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Method Detail
addCustomSitemapFile
static addCustomSitemapFile(hostName : String, file : File) : void
Adds the given File to the appservers custom sitemap directory. All content of the appservers custom sitemap directory is considered by the system job "Create Sitemap Schedule".

The files are added to the directory which is accessible via "Custom Sitemaps" tab under Merchant Tools => SEO => Sitemaps - Custom Sitemaps in Business Manager. To publish that change, execute job under Merchant Tools => SEO => Sitemaps => Job.

Parameters:
hostName - The hostName to copy the File to. The hostName must be configured in sites alias file.
file - The File to copy.
Throws:
- Exception

deleteCustomSitemapFile
static deleteCustomSitemapFile(sitemapFile : SitemapFile) : void
Deletes the given custom sitemap file from the appservers shared file system.

The file is deleted from the directory which is accessible via "Custom Sitemaps" tab under Merchant Tools => SEO => Sitemaps - Custom Sitemaps in Business Manager. To publish that change, execute job under Merchant Tools => SEO => Sitemaps => Job.

Parameters:
sitemapFile - - The sitemapFile to delete.

deleteCustomSitemapFiles
static deleteCustomSitemapFiles(hostName : String) : void
Deletes all custom sitemap files for the given hostname from the appservers shared file system.

The files are deleted from the directory which is accessible via "Custom Sitemaps" tab under Merchant Tools => SEO => Sitemaps - Custom Sitemaps in Business Manager. To publish that change, execute job under Merchant Tools => SEO => Sitemaps => Job.

Parameters:
hostName - The hostName to delete the custom sitemap files for.

deleteCustomSitemapFiles
static deleteCustomSitemapFiles() : void
Deletes all custom sitemap files for all hostnames from the appservers shared file system.

The files are deleted from the directory which is accessible via "Custom Sitemaps" tab under Merchant Tools => SEO => Sitemaps - Custom Sitemaps in Business Manager. To publish that change, execute job under Merchant Tools => SEO => Sitemaps => Job.


getCustomSitemapFiles
static getCustomSitemapFiles() : Map
Reads all existing custom sitemap files from files system of the appservers custom sitemap directory into memory and returns them in a Map containing mappings like
  • Hostname 1 => [SitemapFile hostname1_sitemapfile1, SitemapFile hostname1_sitemapfile2]
  • Hostname 2 => [SitemapFile hostname2_sitemapfile1]
Returns:
The created map containing the list of SitemapFiles.

β™₯
Notifications pending to read