@Singleton @Named public class DefaultSiteModelInheritanceAssembler extends Object implements SiteModelInheritanceAssembler
| Constructor and Description |
|---|
DefaultSiteModelInheritanceAssembler() |
| Modifier and Type | Method and Description |
|---|---|
void |
assembleModelInheritance(String name,
SiteModel child,
SiteModel parent,
String childBaseUrl,
String parentBaseUrl)
Manage inheritance of the site model between a parent and child.
|
void |
resolvePaths(SiteModel siteModel,
String baseUrl)
Resolve relative paths for a SiteModel given a base URL.
|
public DefaultSiteModelInheritanceAssembler()
public void assembleModelInheritance(String name, SiteModel child, SiteModel parent, String childBaseUrl, String parentBaseUrl)
assembleModelInheritance in interface SiteModelInheritanceAssemblername - a name, used for breadcrumb.
If the parent model contains breadcrumbs and the child doesn't,
a child breadcrumb will be added to the merged model with this name. Not null.child - the child SiteModel to be merged with parent.
Not null. If parent == null, the child is unchanged, otherwise
child will contain the merged model upon exit.parent - the parent SiteModel. Unchanged upon exit.
May be null in which case the child is not changed.childBaseUrl - the child base URL.
May be null, in which case relative links inherited from the parent
will not be resolved in the merged child.parentBaseUrl - the parent base URL.
May be null, in which case relative links inherited from the parent
will not be resolved in the merged child.public void resolvePaths(SiteModel siteModel, String baseUrl)
URI.relativize(java.net.URI), ie if any link in the site model
has a base URL that is equal to the given baseUrl, it is replaced by a relative link
with respect to that base.resolvePaths in interface SiteModelInheritanceAssemblersiteModel - the SiteModel.
Not null.baseUrl - the base URL.
May be null in which case the site model is unchanged.Copyright © 2005–2024 The Apache Software Foundation. All rights reserved.