Package io.wcm.handler.link.type.helpers
Class InternalLinkResolverOptions
- java.lang.Object
-
- io.wcm.handler.link.type.helpers.InternalLinkResolverOptions
-
public final class InternalLinkResolverOptions extends java.lang.Object
Options to influence the link resolving process fromInternalLinkResolver
.
-
-
Constructor Summary
Constructors Constructor Description InternalLinkResolverOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPrimaryLinkRefProperty()
Primary ink reference property.boolean
isRewritePathToContext()
Rewrite path to context.boolean
isUseTargetContext()
User target context for URL building.@NotNull InternalLinkResolverOptions
primaryLinkRefProperty(java.lang.String value)
Primary ink reference property.@NotNull InternalLinkResolverOptions
rewritePathToContext(boolean value)
Rewrite path to context.@NotNull InternalLinkResolverOptions
useTargetContext(boolean value)
User target context for URL building.
-
-
-
Method Detail
-
getPrimaryLinkRefProperty
public java.lang.String getPrimaryLinkRefProperty()
Primary ink reference property.- Returns:
- Name of the property in which the primary link reference is stored
-
primaryLinkRefProperty
@NotNull public @NotNull InternalLinkResolverOptions primaryLinkRefProperty(java.lang.String value)
Primary ink reference property.- Parameters:
value
- Name of the property in which the primary link reference is stored- Returns:
- this
-
isRewritePathToContext
public boolean isRewritePathToContext()
Rewrite path to context.- Returns:
- If set to true it is ensured that all links target only pages inside the same inner-most configuration
scope, which is usually the same site/language. All link paths referencing pages outside this content
subtree are rewritten via
UrlHandler.rewritePathToContext(Resource)
with the root path of the inner-most configuration scope/site and then resolved.
-
rewritePathToContext
@NotNull public @NotNull InternalLinkResolverOptions rewritePathToContext(boolean value)
Rewrite path to context.- Parameters:
value
- If set to true it is ensured that all links target only pages inside the same inner-most configuration scope, which is usually the same site/language. All link paths referencing pages outside this content subtree are rewritten viaUrlHandler.rewritePathToContext(Resource)
with the root path of the inner-most configuration scope/site and then resolved.- Returns:
- this
-
isUseTargetContext
public boolean isUseTargetContext()
User target context for URL building.- Returns:
- If set to true an
UrlHandler
with configuration from the configuration scope (e.g. site/language) from the target page is used to build the link URL to the internal page, and not the URL handler of the current resource's configuration scope (site/language). This makes only sense if additional the flag "rewritePathToContext" is set to false.
-
useTargetContext
@NotNull public @NotNull InternalLinkResolverOptions useTargetContext(boolean value)
User target context for URL building.- Parameters:
value
- If set to true anUrlHandler
with configuration from the configuration scope (e.g. site/language) from the target page is used to build the link URL to the internal page, and not the URL handler of the current resource's configuration scope (site/language). This makes only sense if additional the flag "rewritePathToContext" is set to false.- Returns:
- this
-
-