public interface UrlFactory
media and
content producers.
Instances are registered in the module.xml file like this:
<module>
<components>
<public>
<name>{name}</name>
<class>de.espirit.firstspirit.generate.UrlCreatorSpecification</class>
<configuration>
<UrlFactory>{full qualified class name}</UrlFactory>
<!-- insert parameters for your implementation here, see init(java.util.Map, PathLookup) -->
</configuration>
</public>
</components>
</module>
If the data for a URI component would conflict with the reserved purpose, then the conflicting data must be escaped
before forming the URI. Reserved according to RFC-2396 are
";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ",".| Modifier and Type | Method and Description |
|---|---|
String |
getUrl(ContentProducer node,
TemplateSet templateSet,
Language language,
PageParams pageParams)
Calculate path to provided combination of node, template set, language, and page params.
|
String |
getUrl(Media node,
Language language,
Resolution resolution)
Calculate path to provided combination of node, language, and resolution.
|
void |
init(Map<String,String> settings,
PathLookup pathLookup)
Initialization method.
|
void init(Map<String,String> settings, PathLookup pathLookup)
pathLookup for user defined pathes.settings - Settings provided in module.xml file in section <configuration>..</configuration>.
The key is the tag name (converted to lower case), value is the text child node. E.g. <key>value</key>.pathLookup - Path lookup for user defined pathes.String getUrl(ContentProducer node, TemplateSet templateSet, Language language, PageParams pageParams)
node - target node.templateSet - target template set.language - target language.pageParams - the page params.String getUrl(Media node, @NotNull Language language, @Nullable Resolution resolution)
node - Target node.language - Target language.resolution - Target resolution or null for media nodes of type Media.FILE.Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500