public void addSiteMapEntries(SiteMapGeneratorConfiguration smgc, SiteMapBuilder siteMapBuilder) {
for (SiteMapUrlEntry urlEntry : ((CustomUrlSiteMapGeneratorConfiguration) smgc).getCustomURLEntries()) {
if (StringUtils.isEmpty(urlEntry.getLocation())) {
continue;
}
SiteMapURLWrapper siteMapUrl = new SiteMapURLWrapper();
// location
siteMapUrl.setLoc(generateUri(siteMapBuilder, urlEntry));
// change frequency
if (urlEntry.getSiteMapChangeFreq() != null) {
siteMapUrl.setChangeFreqType(urlEntry.getSiteMapChangeFreq());
} else {
siteMapUrl.setChangeFreqType(smgc.getSiteMapChangeFreq());
}
// priority
if (urlEntry.getSiteMapPriority() != null) {
siteMapUrl.setPriorityType(urlEntry.getSiteMapPriority());
} else {
siteMapUrl.setPriorityType(smgc.getSiteMapPriority());
}
// lastModDate
siteMapUrl.setLastModDate(generateDate(urlEntry));
siteMapBuilder.addUrl(siteMapUrl);
}
}