Class SiteImporter
- java.lang.Object
-
- org.ametys.plugins.webcontentio.archive.SiteImporter
-
class SiteImporter extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
SiteImporter.SiteRetriever
Inner class to retrieve from: sites |_45 __|_7d ____|_www |_7b __|_d7 ____|_site1 the result paths: # /sites/45/7d/www # /sites/7b/d7/site1private class
SiteImporter.UnitarySiteImporter
-
Field Summary
Fields Modifier and Type Field Description private DocumentBuilder
_builder
private org.slf4j.Logger
_logger
private Merger
_merger
(package private) ImportReport
_report
private ModifiableTraversableAmetysObject
_root
private SitesArchiver
_siteArchiver
private Path
_zipArchivePath
-
Constructor Summary
Constructors Constructor Description SiteImporter(SitesArchiver siteArchiver, ModifiableTraversableAmetysObject root, Path zipArchivePath, Merger merger, org.slf4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Site
_createChildSite(String id, String siteName)
private Site
_createSite(Path sitePath, String id, String siteName, Document propertiesXml)
private Document
_getSitePropertiesXml(Path sitePath)
private ImportReport
_importContents(Site site, Path sitePath, String siteName)
private ImportReport
_importPlugin(Site site, Path zipPluginEntryPath)
private ImportReport
_importPlugins(Site site, Path sitePath)
private ImportReport
_importResources(Site site, Path sitePath)
private void
_importSite(Path sitePath, String siteName)
private ImportReport
_importSitemaps(Site site, Path sitePath)
private Collection<Path>
_retrieveSites()
private void
_setSiteProperties(Site site, Document propertiesXml, XMLValuesExtractorAdditionalDataGetter additionalDataGetter)
private void
_setWebAttributes(DefaultContent content, String siteName)
(package private) void
importSite(String siteName)
(package private) void
importSites()
-
-
-
Field Detail
-
_report
final ImportReport _report
-
_siteArchiver
private final SitesArchiver _siteArchiver
-
_root
private final ModifiableTraversableAmetysObject _root
-
_zipArchivePath
private final Path _zipArchivePath
-
_logger
private final org.slf4j.Logger _logger
-
_builder
private final DocumentBuilder _builder
-
-
Constructor Detail
-
SiteImporter
SiteImporter(SitesArchiver siteArchiver, ModifiableTraversableAmetysObject root, Path zipArchivePath, Merger merger, org.slf4j.Logger logger) throws ParserConfigurationException
- Throws:
ParserConfigurationException
-
-
Method Detail
-
importSites
void importSites() throws IOException
- Throws:
IOException
-
importSite
void importSite(String siteName) throws IOException
- Throws:
IOException
-
_retrieveSites
private Collection<Path> _retrieveSites() throws IOException
- Throws:
IOException
-
_importSite
private void _importSite(Path sitePath, String siteName) throws IOException
- Throws:
IOException
-
_getSitePropertiesXml
private Document _getSitePropertiesXml(Path sitePath) throws IOException
- Throws:
IOException
-
_createSite
private Site _createSite(Path sitePath, String id, String siteName, Document propertiesXml) throws ImportGlobalFailException, Archivers.AmetysObjectNotImportedException, RepositoryException, TransformerException, IOException, Exception
-
_createChildSite
private Site _createChildSite(String id, String siteName) throws RepositoryException
- Throws:
RepositoryException
-
_setSiteProperties
private void _setSiteProperties(Site site, Document propertiesXml, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) throws TransformerException, Exception
- Throws:
TransformerException
Exception
-
_importResources
private ImportReport _importResources(Site site, Path sitePath) throws IOException
- Throws:
IOException
-
_importContents
private ImportReport _importContents(Site site, Path sitePath, String siteName) throws IOException
- Throws:
IOException
-
_setWebAttributes
private void _setWebAttributes(DefaultContent content, String siteName)
-
_importPlugins
private ImportReport _importPlugins(Site site, Path sitePath) throws IOException, RepositoryException
- Throws:
IOException
RepositoryException
-
_importPlugin
private ImportReport _importPlugin(Site site, Path zipPluginEntryPath) throws IOException, RepositoryException
- Throws:
IOException
RepositoryException
-
_importSitemaps
private ImportReport _importSitemaps(Site site, Path sitePath) throws RepositoryException, IOException
- Throws:
RepositoryException
IOException
-
-