Class SitemapImporter
- java.lang.Object
-
- org.ametys.plugins.webcontentio.archive.SitemapImporter
-
class SitemapImporter extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
SitemapImporter.UnitaryPageImporter
private class
SitemapImporter.UnitarySitemapImporter
-
Field Summary
Fields Modifier and Type Field Description private DocumentBuilder
_builder
private org.slf4j.Logger
_logger
private Merger
_merger
(package private) ImportReport
_report
private Site
_site
private SitesArchiver
_siteArchiver
private Sitemap
_sitemap
private Path
_sitemapFilePath
private Path
_sitemapFolderPath
private SitemapImporter.UnitarySitemapImporter
_unitarySitemapImporter
private Path
_zipArchivePath
-
Constructor Summary
Constructors Constructor Description SitemapImporter(SitesArchiver siteArchiver, Site site, Path sitemapPath, Path zipArchivePath, Merger merger, org.slf4j.Logger logger, DocumentBuilder builder)
-
Method Summary
-
-
-
Field Detail
-
_report
final ImportReport _report
-
_siteArchiver
private final SitesArchiver _siteArchiver
-
_sitemapFolderPath
private final Path _sitemapFolderPath
-
_sitemapFilePath
private final Path _sitemapFilePath
-
_zipArchivePath
private final Path _zipArchivePath
-
_logger
private final org.slf4j.Logger _logger
-
_builder
private final DocumentBuilder _builder
-
_unitarySitemapImporter
private final SitemapImporter.UnitarySitemapImporter _unitarySitemapImporter
-
-
Constructor Detail
-
SitemapImporter
SitemapImporter(SitesArchiver siteArchiver, Site site, Path sitemapPath, Path zipArchivePath, Merger merger, org.slf4j.Logger logger, DocumentBuilder builder)
-
-
Method Detail
-
importSitemap
void importSitemap() throws RepositoryException, IOException
- Throws:
RepositoryException
IOException
-
_fillSitemap
private boolean _fillSitemap() throws RepositoryException, IOException
- Throws:
RepositoryException
IOException
-
_createChildSitemap
private Sitemap _createChildSitemap(String id, Document propertiesXml) throws Archivers.AmetysObjectNotImportedException, Exception
-
_createChildSitemap
private Node _createChildSitemap(String uuid, String sitemapName) throws RepositoryException
- Throws:
RepositoryException
-
_resolveSitemap
private Sitemap _resolveSitemap(Node node)
-
_setSitemapAttributes
private void _setSitemapAttributes(Sitemap sitemap, Document propertiesXml) throws TransformerException, RepositoryException
-
_createSitemapAcl
private void _createSitemapAcl() throws RepositoryException, IOException
- Throws:
RepositoryException
IOException
-
_createPageAcl
private void _createPageAcl(Node pageNode, Path pagePath) throws RepositoryException, IOException
- Throws:
RepositoryException
IOException
-
_importAllPages
private void _importAllPages() throws IOException
- Throws:
IOException
-
_pageComparator
private Comparator<Pair<Path,Document>> _pageComparator()
-
_importPage
private void _importPage(Path page, Document propertiesXml) throws ImportGlobalFailException
- Throws:
ImportGlobalFailException
-
_getNullablePagePropertiesXml
private Document _getNullablePagePropertiesXml(Path page)
-
_getPropertiesXml
private Document _getPropertiesXml(Path pageOrSitemap)
-
_createPage
private Node _createPage(Path pagePath, String id, Document propertiesXml) throws Archivers.AmetysObjectNotImportedException, Exception
-
_relativePath
private String _relativePath(Path pageOrSitemap)
-
_retrieveParentPagesContainer
private DefaultTraversableAmetysObject _retrieveParentPagesContainer(String relPath)
-
_createChildPage
private Node _createChildPage(Node parentNode, String uuid, String pageName) throws RepositoryException
- Throws:
RepositoryException
-
_resolvePage
private ModifiablePage _resolvePage(Node node)
-
_setPageAttributes
private void _setPageAttributes(ModifiablePage page, Document propertiesXml) throws Archivers.AmetysObjectNotImportedException, TransformerException, Exception
-
_setAmetysInternalProperties
private void _setAmetysInternalProperties(PagesContainer pagesContainer, Document propertiesXml, String rootTagName) throws TransformerException, RepositoryException
-
_setTags
private void _setTags(ModifiablePage page, Document propertiesXml) throws TransformerException
- Throws:
TransformerException
-
_setPageAttachments
private ImportReport _setPageAttachments(ModifiablePage page, Path pagePath) throws IOException, RepositoryException
- Throws:
IOException
RepositoryException
-
_setZones
private void _setZones(ModifiablePage page, Document propertiesXml) throws TransformerException, Archivers.AmetysObjectNotImportedException, Exception
-
_setZone
private void _setZone(ModifiablePage page, Node zoneNode) throws TransformerException, Archivers.AmetysObjectNotImportedException, Exception
-
_setZoneItem
private void _setZoneItem(ModifiableZone zone, Node zoneItemNode) throws TransformerException, Exception
- Throws:
TransformerException
Exception
-
_setZoneItemAttributes
private void _setZoneItemAttributes(ModifiableZoneItem zoneItem, Node zoneItemNode) throws TransformerException, Exception
- Throws:
TransformerException
Exception
-
_setZoneItemContent
private void _setZoneItemContent(ModifiableZoneItem zoneItem, Node zoneItemNode) throws TransformerException, Archivers.AmetysObjectNotImportedException
-
_setZoneItemServiceParams
private void _setZoneItemServiceParams(ModifiableZoneItem zoneItem, Node zoneItemNode, String serviceId) throws Exception
- Throws:
Exception
-
_getService
private Service _getService(String serviceId)
-
-