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 classSiteImporter.SiteRetrieverInner class to retrieve from: sites |_45 __|_7d ____|_www |_7b __|_d7 ____|_site1 the result paths: # /sites/45/7d/www # /sites/7b/d7/site1private classSiteImporter.UnitarySiteImporter
-
Field Summary
Fields Modifier and Type Field Description private DocumentBuilder_builderprivate org.slf4j.Logger_loggerprivate Merger_merger(package private) ImportReport_reportprivate ModifiableTraversableAmetysObject_rootprivate SitesArchiver_siteArchiverprivate 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) voidimportSite(String siteName)(package private) voidimportSites()
-
-
-
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:
TransformerExceptionException
-
_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:
IOExceptionRepositoryException
-
_importPlugin
private ImportReport _importPlugin(Site site, Path zipPluginEntryPath) throws IOException, RepositoryException
- Throws:
IOExceptionRepositoryException
-
_importSitemaps
private ImportReport _importSitemaps(Site site, Path sitePath) throws RepositoryException, IOException
- Throws:
RepositoryExceptionIOException
-
-