@ProviderType
public interface ConfigurationBuilder
Modifier and Type | Method and Description |
---|---|
<T> T |
as(@NotNull Class<T> clazz)
Get configuration as singleton resource and its properties mapped to the given annotation class.
|
<T> T |
asAdaptable(@NotNull Class<T> clazz)
Get configuration as singleton configuration resource and adapt it to the given class.
|
<T> @NotNull Collection<T> |
asAdaptableCollection(@NotNull Class<T> clazz)
Get collection of configuration resources and adapt them to the given class.
|
<T> @NotNull Collection<T> |
asCollection(@NotNull Class<T> clazz)
Get collection of configuration resources with their properties mapped to the given annotation class.
|
@NotNull org.apache.sling.api.resource.ValueMap |
asValueMap()
Get configuration as singleton resource and return its properties as value map.
|
@NotNull Collection<org.apache.sling.api.resource.ValueMap> |
asValueMapCollection()
Get collection of configuration resources with their properties mapped to the given annotation class.
|
@NotNull ConfigurationBuilder |
name(@NotNull String configName)
Define configuration name.
|
@NotNull @NotNull ConfigurationBuilder name(@NotNull @NotNull String configName)
as(Class)
and asCollection(Class)
methods, mandatory for the others.configName
- Relative path@NotNull <T> T as(@NotNull @NotNull Class<T> clazz)
name(String)
method it is derived
from the annotation interface class name.T
- Annotation class typeclazz
- Annotation interface class@NotNull <T> @NotNull Collection<T> asCollection(@NotNull @NotNull Class<T> clazz)
name(String)
method it is derived
from the annotation interface class name.T
- Annotation class typeclazz
- Annotation interface class@NotNull @NotNull org.apache.sling.api.resource.ValueMap asValueMap()
@NotNull @NotNull Collection<org.apache.sling.api.resource.ValueMap> asValueMapCollection()
<T> T asAdaptable(@NotNull @NotNull Class<T> clazz)
T
- Annotation class typeclazz
- Class that can be adapted from a Resource
@NotNull <T> @NotNull Collection<T> asAdaptableCollection(@NotNull @NotNull Class<T> clazz)
T
- Annotation class typeclazz
- Class that can be adapted from a Resource
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.