Search in sources :

Example 1 with SiteMapUrlEntryImpl

use of org.broadleafcommerce.common.sitemap.domain.SiteMapUrlEntryImpl in project BroadleafCommerce by BroadleafCommerce.

the class CustomUrlSiteMapGeneratorTest method getConfiguration.

public CustomUrlSiteMapGeneratorConfiguration getConfiguration() {
    SiteMapUrlEntry urlEntry1 = new SiteMapUrlEntryImpl();
    urlEntry1.setLastMod(new Date());
    urlEntry1.setLocation("http://www.heatclinic.com/1");
    urlEntry1.setSiteMapChangeFreq(SiteMapChangeFreqType.HOURLY);
    urlEntry1.setSiteMapPriority(SiteMapPriorityType.POINT5);
    SiteMapUrlEntry urlEntry2 = new SiteMapUrlEntryImpl();
    urlEntry2.setLastMod(new Date());
    urlEntry2.setLocation("2");
    urlEntry2.setSiteMapChangeFreq(SiteMapChangeFreqType.HOURLY);
    urlEntry2.setSiteMapPriority(SiteMapPriorityType.POINT5);
    SiteMapUrlEntry urlEntry3 = new SiteMapUrlEntryImpl();
    urlEntry3.setLastMod(new Date());
    urlEntry3.setLocation("/3");
    urlEntry3.setSiteMapChangeFreq(SiteMapChangeFreqType.HOURLY);
    urlEntry3.setSiteMapPriority(SiteMapPriorityType.POINT5);
    List<SiteMapUrlEntry> urlEntries = new ArrayList<>();
    urlEntries.add(urlEntry1);
    urlEntries.add(urlEntry2);
    urlEntries.add(urlEntry3);
    CustomUrlSiteMapGeneratorConfiguration smgc = new CustomUrlSiteMapGeneratorConfigurationImpl();
    smgc.setDisabled(false);
    smgc.setSiteMapGeneratorType(SiteMapGeneratorType.CUSTOM);
    smgc.setCustomURLEntries(urlEntries);
    return smgc;
}
Also used : CustomUrlSiteMapGeneratorConfigurationImpl(org.broadleafcommerce.common.sitemap.domain.CustomUrlSiteMapGeneratorConfigurationImpl) SiteMapUrlEntryImpl(org.broadleafcommerce.common.sitemap.domain.SiteMapUrlEntryImpl) CustomUrlSiteMapGeneratorConfiguration(org.broadleafcommerce.common.sitemap.domain.CustomUrlSiteMapGeneratorConfiguration) ArrayList(java.util.ArrayList) SiteMapUrlEntry(org.broadleafcommerce.common.sitemap.domain.SiteMapUrlEntry) Date(java.util.Date)

Aggregations

ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 CustomUrlSiteMapGeneratorConfiguration (org.broadleafcommerce.common.sitemap.domain.CustomUrlSiteMapGeneratorConfiguration)1 CustomUrlSiteMapGeneratorConfigurationImpl (org.broadleafcommerce.common.sitemap.domain.CustomUrlSiteMapGeneratorConfigurationImpl)1 SiteMapUrlEntry (org.broadleafcommerce.common.sitemap.domain.SiteMapUrlEntry)1 SiteMapUrlEntryImpl (org.broadleafcommerce.common.sitemap.domain.SiteMapUrlEntryImpl)1