...
Code Block | ||
---|---|---|
| ||
public class SitemapRedirectFilterProviderServiceImpl extends SimpleServiceComponent implements SEOGoogleSitemapFilterProvider { // Logger for this class private static final Logger LOG = Logger.getLogger(SitemapRedirectFilterProviderServiceImpl.class.getName()); @Override public boolean includeInGoogleSitemap(Website website, ContentItemVersion<?> contentItemVersion) { if(contentItemVersion instanceof ModularMediaItemVersion) { ModularTemplateInstance modularTemplateInstance = ((ModularMediaItemVersion) contentItemVersion).getModularTemplateInstance(); if(modularTemplateInstance != null) { TemplateProperty redirectProperty = modularTemplateInstance.getPropertyByIdentifier("redirect_url"); if(redirectProperty != null) { String redirect = redirectProperty.getStringValue(); return StringUtils.isEmpty(redirect); } } } return true; } } |
SEOGoogleSitemapImageProvider
...