public interface SiteTool
SiteModel.| Modifier and Type | Field and Description |
|---|---|
static Locale |
DEFAULT_LOCALE
The locale by default for a Maven Site.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getInterpolatedSiteDescriptorContent(Map<String,String> props,
org.apache.maven.project.MavenProject aProject,
String siteDescriptorContent)
Interpolating several expressions in the site descriptor content.
|
String |
getRelativePath(String to,
String from)
Calculate the relative path between two URLs or between two files.
|
File |
getSiteDescriptor(File siteDirectory,
Locale locale)
Get a site descriptor from the project's site directory.
|
List<Locale> |
getSiteLocales(String locales)
Extracts from a comma-separated list the locales that are available in
site-tool
resource bundle. |
SiteModel |
getSiteModel(File siteDirectory,
Locale locale,
org.apache.maven.project.MavenProject project,
List<org.apache.maven.project.MavenProject> reactorProjects,
org.eclipse.aether.RepositorySystemSession repoSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteProjectRepositories)
Get a site model for a project.
|
org.apache.maven.artifact.Artifact |
getSkinArtifactFromRepository(org.eclipse.aether.RepositorySystemSession repoSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteProjectRepositories,
Skin skin)
Get a skin artifact from one of the repositories.
|
void |
populateReportsMenu(SiteModel siteModel,
Locale locale,
Map<String,List<org.apache.maven.reporting.MavenReport>> reportsPerCategory)
Populate the pre-defined
reports menu of the site model,
if used through <menu ref="reports"/>. |
static final Locale DEFAULT_LOCALE
Locale.ROOTorg.apache.maven.artifact.Artifact getSkinArtifactFromRepository(org.eclipse.aether.RepositorySystemSession repoSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteProjectRepositories,
Skin skin)
throws SiteToolException
repoSession - the repository system session, not null.remoteProjectRepositories - the Maven remote project repositories, not null.skin - the Skin model, not null.Skin artifact defined in a SiteModel from a given projectSiteToolException - if anyFile getSiteDescriptor(File siteDirectory, Locale locale)
siteDirectory - the site directory, not nulllocale - the locale wanted for the site descriptor, not null. Most specific
to least specific lookup from site_language_country_variant.xml,
site_language_country.xml, site_language.xml},
to site.xml as last resort for Locale.ROOT, if provided
locale defines a variant and/or a country and/or a language.String getInterpolatedSiteDescriptorContent(Map<String,String> props, org.apache.maven.project.MavenProject aProject, String siteDescriptorContent) throws SiteToolException
encoding.
For instance:
<project>
<name>myProjectName</name>
</project>
<properties>
<my.value>hello</my.value>
</properties>
props - a map used for interpolation, not null.aProject - a Maven project, not null.siteDescriptorContent - the site descriptor file, not null.SiteToolException - if errors happened during the interpolation.SiteModel getSiteModel(File siteDirectory, Locale locale, org.apache.maven.project.MavenProject project, List<org.apache.maven.project.MavenProject> reactorProjects, org.eclipse.aether.RepositorySystemSession repoSession, List<org.eclipse.aether.repository.RemoteRepository> remoteProjectRepositories) throws SiteToolException
siteDirectory - the site directory, may be null if project from repositorylocale - the locale used for the i18n in SiteModel, not null.
See getSiteDescriptor(File, Locale) for details.project - the Maven project, not null.reactorProjects - the Maven reactor projects, not null.repoSession - the repository system session, not null.remoteProjectRepositories - the Maven remote project repositories, not null.SiteModel object corresponding to the site.xml file with some
interpolations.SiteToolException - if anyvoid populateReportsMenu(SiteModel siteModel, Locale locale, Map<String,List<org.apache.maven.reporting.MavenReport>> reportsPerCategory)
reports menu of the site model,
if used through <menu ref="reports"/>. Notice this menu reference is translated into
2 separate menus: "Project Information" and "Project Reports".siteModel - the Doxia Sitetools SiteModel, not null.locale - the locale used for the i18n in SiteModel, not null.
See getSiteDescriptor(File, Locale) for details.reportsPerCategory - reports per category to put in "Reports" or "Information" menus, not null.MavenReport.CATEGORY_PROJECT_INFORMATION,
MavenReport.CATEGORY_PROJECT_REPORTSList<Locale> getSiteLocales(String locales)
site-tool
resource bundle.locales - A comma separated list of localesLocales.String getRelativePath(String to, String from)
dav:https://dav.codehaus.org/ or
scm:svn:https://svn.apache.org/repos/asf.to - the to url of file as stringfrom - the from url of file as stringfrom to to.Copyright © 2005–2024 The Apache Software Foundation. All rights reserved.