Interface UrlGenerationContext.Builder
- Enclosing interface:
- UrlGenerationContext
@NonExtendable
public static interface UrlGenerationContext.Builder
Builder for an
UrlGenerationContext
.- Since:
- 5.2.200303
-
Method Summary
Modifier and TypeMethodDescription@NotNull UrlGenerationContext.Builder
Configures an attribute to be available in the generation context.@NotNull UrlGenerationContext
create()
Creates a newUrlGenerationContext
instance based on the given configuration.@NotNull UrlGenerationContext.Builder
from
(@NotNull GenerationContext context) TheGenerationContext
to extract the context information from, which consists of: TheUrlCreator
configured in the given generation context TheUrlCreatorProvider
available in the given generation context The contextualLanguage
Whether or not the release version is used@NotNull UrlGenerationContext.Builder
from
(@NotNull JsonGenerationContext context) TheJsonGenerationContext
to extract the context information from, which consists of: TheUrlCreator
configured in the generation context TheUrlCreatorProvider
available in the generation context The contextualLanguage
Whether or not the release version is used The current attributes available in the given JSON generation context@NotNull UrlGenerationContext.Builder
Configures the contextualLanguage
when requesting the URL.@NotNull UrlGenerationContext.Builder
release
(boolean release) Indicates whether or not the URL is requested in the context of a release version.@NotNull UrlGenerationContext.Builder
urlCreator
(@Nullable UrlCreator urlCreator) Configures the url creator to be used in the current generation context.@NotNull UrlGenerationContext.Builder
urlCreatorProvider
(@Nullable UrlCreatorProvider urlCreatorProvider) Configures the provider of url creators in the current generation context.
-
Method Details
-
from
TheGenerationContext
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
- Parameters:
context
- TheGenerationContext
in which the URLs will be requested.- Returns:
- This builder instance.
- Since:
- 5.2.200303
- The
-
from
@NotNull @NotNull UrlGenerationContext.Builder from(@NotNull @NotNull JsonGenerationContext context) TheJsonGenerationContext
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
- Parameters:
context
- TheJsonGenerationContext
in which the URLs will be requested.- Returns:
- This builder instance.
- Since:
- 5.2.200303
- The
-
urlCreator
@NotNull @NotNull UrlGenerationContext.Builder urlCreator(@Nullable @Nullable UrlCreator urlCreator) Configures the url creator to be used in the current generation context.- Parameters:
urlCreator
- The url creator to be used.- Returns:
- This builder instance.
- Since:
- 5.2.200303
- See Also:
-
urlCreatorProvider
@NotNull @NotNull UrlGenerationContext.Builder urlCreatorProvider(@Nullable @Nullable UrlCreatorProvider urlCreatorProvider) Configures the provider of url creators in the current generation context. The givenUrlCreatorProvider
will also be used to provider theUrlCreator
and release version flag if necessary.- Parameters:
urlCreatorProvider
- The url creator provider to be used.- Returns:
- This builder instance.
- Since:
- 5.2.200303
- See Also:
-
attribute
@NotNull @NotNull UrlGenerationContext.Builder attribute(@NotNull @NotNull String name, @Nullable @Nullable Object value) Configures an attribute to be available in the generation context.- Parameters:
name
- the name of the attribute.value
- the value of the attribute.- Returns:
- This builder instance.
- Since:
- 5.2.200303
- See Also:
-
release
Indicates whether or not the URL is requested in the context of a release version.- Parameters:
release
-true
this context is based on a release version- Returns:
- This builder instance.
- Since:
- 5.2.200303
- See Also:
-
language
Configures the contextualLanguage
when requesting the URL.- Parameters:
language
- The contextualLanguage
.- Returns:
- This builder instance.
- Since:
- 5.2.200303
- See Also:
-
create
Creates a newUrlGenerationContext
instance based on the given configuration.- Returns:
- The new context instance.
- Since:
- 5.2.200303
-