Interface UrlGenerationContext
@NonExtendable
public interface UrlGenerationContext
The context in which an URL will be request using the
UrlSupporting
aspect.- Since:
- 5.2.200303
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic UrlGenerationContext.Builder
builder()
Creates a builder for the context in which an URL will be requested.<O> @NotNull Optional<O>
getAttribute
(@NotNull String name) Lookup an attribute with the givenname
in this generation context.@NotNull Language
Returns the contextualLanguage
when requesting the URL.@NotNull UrlCreator
Returns the url creator to be used in the current generation context.@NotNull UrlCreatorProvider
Returns the provider of url creators in the current generation context.boolean
Indicates whether or not the URL is requested in the context of a release version.
-
Method Details
-
builder
Creates a builder for the context in which an URL will be requested.- Returns:
- The context builder.
- Since:
- 5.2.200303
-
getUrlCreator
Returns the url creator to be used in the current generation context.- Returns:
- The url creator to be used.
- Since:
- 5.2.200303
-
getUrlCreatorProvider
Returns the provider of url creators in the current generation context.- Returns:
- The url creator provider to be used.
- Since:
- 5.2.200303
-
getAttribute
Lookup an attribute with the givenname
in this generation context. If the attribute is not availableOptional.empty()
will be returned.- Type Parameters:
O
- The type of the value to lookup.- Parameters:
name
- The name of the attribute to lookup.- Returns:
- The associated value if available.
- Since:
- 5.2.200303
-
isRelease
boolean isRelease()Indicates whether or not the URL is requested in the context of a release version.- Returns:
true
this context is based on a release version- Since:
- 5.2.200303
-
getLanguage
Returns the contextualLanguage
when requesting the URL.- Returns:
- The contextual
Language
. - Since:
- 5.2.200303
-