@ForUseOnly public static interface UrlGenerationContext.Builder
UrlGenerationContext
.Modifier and Type | Method and Description |
---|---|
UrlGenerationContext.Builder |
attribute(String name,
Object value)
Configures an attribute to be available in the generation context.
|
UrlGenerationContext |
create()
Creates a new
UrlGenerationContext instance based on the given configuration. |
UrlGenerationContext.Builder |
from(GenerationContext context)
The
GenerationContext to extract the context information from,
which consists of:
The UrlCreator configured in the given generation context
The UrlCreatorProvider available in the given generation context
The contextual Language
Whether or not the release version is used
|
UrlGenerationContext.Builder |
from(JsonGenerationContext context)
The
JsonGenerationContext to extract the context information from,
which consists of:
The UrlCreator configured in the generation context
The UrlCreatorProvider available in the generation context
The contextual Language
Whether or not the release version is used
The current attributes available in the given JSON generation context
|
UrlGenerationContext.Builder |
language(Language language)
Configures the contextual
Language when requesting the URL. |
UrlGenerationContext.Builder |
release(boolean release)
Indicates whether or not the URL is requested in the context of a release version.
|
UrlGenerationContext.Builder |
urlCreator(UrlCreator urlCreator)
Configures the url creator to be used in the current generation context.
|
UrlGenerationContext.Builder |
urlCreatorProvider(UrlCreatorProvider urlCreatorProvider)
Configures the provider of url creators in the current generation context.
|
@NotNull UrlGenerationContext.Builder from(@NotNull GenerationContext context)
GenerationContext
to extract the context information from,
which consists of:
UrlCreator
configured in the given generation contextUrlCreatorProvider
available in the given generation contextLanguage
context
- The GenerationContext
in which the URLs will be requested.@NotNull UrlGenerationContext.Builder from(@NotNull JsonGenerationContext context)
JsonGenerationContext
to extract the context information from,
which consists of:
UrlCreator
configured in the generation contextUrlCreatorProvider
available in the generation contextLanguage
context
- The JsonGenerationContext
in which the URLs will be requested.@NotNull UrlGenerationContext.Builder urlCreator(@Nullable UrlCreator urlCreator)
urlCreator
- The url creator to be used.from(JsonGenerationContext)
,
from(GenerationContext)
,
urlCreatorProvider(UrlCreatorProvider)
@NotNull UrlGenerationContext.Builder urlCreatorProvider(@Nullable UrlCreatorProvider urlCreatorProvider)
UrlCreatorProvider
will also be used to provider the UrlCreator
and release
version flag if necessary.urlCreatorProvider
- The url creator provider to be used.from(JsonGenerationContext)
,
from(GenerationContext)
@NotNull UrlGenerationContext.Builder attribute(@NotNull String name, @Nullable Object value)
name
- the name of the attribute.value
- the value of the attribute.from(JsonGenerationContext)
@NotNull UrlGenerationContext.Builder release(boolean release)
release
- true
this context is based on a release versionfrom(JsonGenerationContext)
,
from(GenerationContext)
,
urlCreatorProvider(UrlCreatorProvider)
@NotNull UrlGenerationContext.Builder language(@Nullable Language language)
Language
when requesting the URL.language
- The contextual Language
.from(JsonGenerationContext)
,
from(GenerationContext)
@NotNull UrlGenerationContext create()
UrlGenerationContext
instance based on the given configuration.Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210