@ConsumerType public abstract class ResourceTreeSitemapGenerator extends java.lang.Object implements SitemapGenerator
SitemapGenerator that traverses a resource tree.
Implementations may change the traversal behaviour by overriding
shouldFollow(Resource) or
shouldInclude(Resource) but it is recommended to always consider the default
implementation. The default implementation includes only Resources that have a "jcr:content" child and
follows through only on content that is not below the "jcr:content" or any other sitemap root.
This implementation keeps track of the traversal's state in the
Context. It is capable to continue from a previous
persisted state, when the generation got aborted.
SitemapGenerator.Context| Constructor and Description |
|---|
ResourceTreeSitemapGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
generate(@NotNull Resource sitemapRoot,
@NotNull java.lang.String name,
@NotNull Sitemap sitemap,
SitemapGenerator.Context context)
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNames, getOnDemandNamespublic final void generate(@NotNull
@NotNull Resource sitemapRoot,
@NotNull
@NotNull java.lang.String name,
@NotNull
@NotNull Sitemap sitemap,
@NotNull
SitemapGenerator.Context context)
throws SitemapException
SitemapGeneratorSitemap with the given name at the given Resource.
This process may be stateful and the given SitemapGenerator.Context can be used to keep track of the state. For
example a traversal that keeps track on the last Resource added to the Sitemap.
generate in interface SitemapGeneratorsitemapRoot - the root at which the sitemap should be createdname - the name, one of the names returned by SitemapGenerator.getNames(Resource) for the given
sitemapRootsitemap - the Sitemap object to add locations tocontext - the context under which the sitemap is generatedSitemapException - may be thrown in unrecoverable exceptional casesCopyright © 2010 - 2023 Adobe. All Rights Reserved