Class SitemapImpl
- java.lang.Object
-
- org.apache.sling.sitemap.impl.builder.SitemapImpl
-
-
Constructor Summary
Constructors Constructor Description SitemapImpl(Writer writer, ExtensionProviderManager extensionProviderManager)
SitemapImpl(Writer writer, ExtensionProviderManager extensionProviderManager, boolean writeHeader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Url
addUrl(@NotNull String location)
Adds a location to theSitemap
.void
close()
void
flush()
protected boolean
writePendingUrl()
-
-
-
Field Detail
-
out
protected final Writer out
-
-
Constructor Detail
-
SitemapImpl
public SitemapImpl(Writer writer, ExtensionProviderManager extensionProviderManager) throws IOException
- Throws:
IOException
-
SitemapImpl
public SitemapImpl(Writer writer, ExtensionProviderManager extensionProviderManager, boolean writeHeader) throws IOException
- Throws:
IOException
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
flush
public void flush() throws IOException
- Throws:
IOException
-
addUrl
@NotNull public @NotNull Url addUrl(@NotNull @NotNull String location) throws SitemapException
Description copied from interface:Sitemap
Adds a location to theSitemap
. The returnedUrl
can be used to add more details to the so created object.- Specified by:
addUrl
in interfaceSitemap
- Parameters:
location
- the required location of the entry to add.- Returns:
- an
Url
object giving access to the location's details - Throws:
SitemapException
- if any internal operation of the Sitemap fails
-
writePendingUrl
protected boolean writePendingUrl() throws SitemapException
- Throws:
SitemapException
-
-