Package de.espirit.firstspirit.generate
Interface PathLookup
public interface PathLookup
With a path lookup you could
The default implementation is available via the
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
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
lookupPath
(@NotNull IDProvider folder, @NotNull Language language, @Nullable TemplateSet templateSet) Get the predefined path for the requested folder node ornull
, if no predefined path is set.
-
Field Details
-
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 ornull
, if no predefined path is set. Even ifnull
is returned there may be a parent folder where this method will return notnull
. For root nodes this method returns the empty string when no path is stored. For non-folder nodes the return value will always benull
.
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 benull
iffolder
is frommedia 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
-