Class InternalLinkResolverOptions

java.lang.Object
io.wcm.handler.link.type.helpers.InternalLinkResolverOptions

public final class InternalLinkResolverOptions extends Object
Options to influence the link resolving process from InternalLinkResolver.
  • Constructor Details

    • InternalLinkResolverOptions

      public InternalLinkResolverOptions()
  • Method Details

    • getPrimaryLinkRefProperty

      public 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(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 via UrlHandler.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 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.
      Returns:
      this