Package org.apache.sling.sitemap.impl.builder.extensions

## Class AlternateLanguageExtensionProvider.ExtensionImpl

- java.lang.Object
- - org.apache.sling.sitemap.spi.builder.AbstractExtension
  - - org.apache.sling.sitemap.impl.builder.extensions.AlternateLanguageExtensionProvider.ExtensionImpl

All Implemented Interfaces:
  `Extension`, `AlternateLanguageExtension`

Enclosing class:
  AlternateLanguageExtensionProvider

    public static class AlternateLanguageExtensionProvider.ExtensionImpl
    extends AbstractExtension
    implements AlternateLanguageExtension

### Constructor Summary

Constructors
`ExtensionImpl()`

### Method Summary

All Methods Instance Methods Concrete Methods
`@NotNull AlternateLanguageExtension` `setDefaultLocale()`
`@NotNull AlternateLanguageExtension` `setHref​(@NotNull String location)`
`@NotNull AlternateLanguageExtension` `setLocale​(@NotNull Locale locale)`
`void` `writeTo​(@NotNull XMLStreamWriter writer)` Implementations must write their content to the given `XMLStreamWriter`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ExtensionImpl

    public ExtensionImpl()

### Method Detail

#### setLocale

    @NotNull
    public @NotNull AlternateLanguageExtension setLocale​(@NotNull
                                                         @NotNull Locale locale)

Specified by:
  `setLocale` in interface `AlternateLanguageExtension`

#### setDefaultLocale

    @NotNull
    public @NotNull AlternateLanguageExtension setDefaultLocale()

Specified by:
  `setDefaultLocale` in interface `AlternateLanguageExtension`

#### setHref

    @NotNull
    public @NotNull AlternateLanguageExtension setHref​(@NotNull
                                                       @NotNull String location)

Specified by:
  `setHref` in interface `AlternateLanguageExtension`

#### writeTo

    public void writeTo​(@NotNull
                        @NotNull XMLStreamWriter writer)
                 throws XMLStreamException

Description copied from class: `AbstractExtension`
Implementations must write their content to the given `XMLStreamWriter`.

The extension must not open/close its own surrounding tag. This is done by the caller in order to guarantee proper isolation between the core implementation and the extensions. Furthermore, when an extension fails and throws an `XMLStreamException` the extensions output will be discarded but the sitemap generation will not fail.

Specified by:
  `writeTo` in class `AbstractExtension`
Throws:
  `XMLStreamException`