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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic UrlGenerationContext.Builderbuilder()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 givennamein this generation context.@NotNull LanguageReturns the contextualLanguagewhen requesting the URL.@NotNull UrlCreatorReturns the url creator to be used in the current generation context.@NotNull UrlCreatorProviderReturns the provider of url creators in the current generation context.booleanIndicates 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 givennamein 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:
truethis context is based on a release version- Since:
- 5.2.200303
-
getLanguage
Returns the contextualLanguagewhen requesting the URL.- Returns:
- The contextual
Language. - Since:
- 5.2.200303
-