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 UrladdUrl(@NotNull String location)Adds a location to theSitemap.voidclose()voidflush()protected booleanwritePendingUrl()
-
-
-
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:
closein interfaceAutoCloseable- Specified by:
closein 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:SitemapAdds a location to theSitemap. The returnedUrlcan be used to add more details to the so created object.- Specified by:
addUrlin interfaceSitemap- Parameters:
location- the required location of the entry to add.- Returns:
- an
Urlobject 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
-
-