Interface PathLookup


public interface PathLookup
With a path lookup you could lookup predefined paths for nodes. These paths are defined using URLProperties and can be requested using SiteStoreFolder.getStoredUrl(Language, TemplateSet) and MediaFolder.getStoredUrl(Language).
The default implementation is available via the INSTANCE field. This is also the instance which is provided to UrlFactory.setUp(UrlFactoryContext) from UrlFactoryContext.getPathLookup().
Since:
5.0.17
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final PathLookup
    The default implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    lookupPath(@NotNull IDProvider folder, @NotNull Language language, @Nullable TemplateSet templateSet)
    Get the predefined path for the requested folder node or null, if no predefined path is set.
  • Field Details

    • INSTANCE

      static final PathLookup INSTANCE
      The default implementation.
      Since:
      5.2.2
  • Method Details

    • lookupPath

      @Nullable @Nullable String lookupPath(@NotNull @NotNull IDProvider folder, @NotNull @NotNull Language language, @Nullable @Nullable TemplateSet templateSet)
      Get the predefined path for the requested folder node or null, if no predefined path is set. Even if null is returned there may be a parent folder where this method will return not null. For root nodes this method returns the empty string when no path is stored. For non-folder nodes the return value will always be null.
      The returned path never ends with "/". The returned path starts with a "/" if the path is not full qualified (i.e. starts with "http://" or "https://").
      Parameters:
      folder - Folder node to look up.
      language - Language for lookup.
      templateSet - Template-set for lookup, could be null if folder is from media store.
      Returns:
      The predefined path for the requested node or null if no path is set or the empty string for store root nodes when no path is stored.
      Throws:
      NullPointerException - if the provided folder or language is null or a sitestore folder is provided but no template set.
      Since:
      5.0.17