Class ContentsArchiverHelper.Importer
- java.lang.Object
 - 
- org.ametys.plugins.contentio.archive.ContentsArchiverHelper.Importer
 
 
- 
- Enclosing class:
 - ContentsArchiverHelper
 
private class ContentsArchiverHelper.Importer extends Object
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description private classContentsArchiverHelper.Importer.UnitaryContentImporter 
- 
Field Summary
Fields Modifier and Type Field Description private DocumentBuilder_builderprivate String_commonPrefixprivate Collection<ContentsArchiverHelper.ContentFiller>_contentFillersprivate org.slf4j.Logger_loggerprivate Merger_merger(package private) ImportReport_reportprivate AmetysObjectCollection_rootprivate ContentsArchiverHelper.Importer.UnitaryContentImporter_unitaryImporterprivate Path_zipArchivePath 
- 
Constructor Summary
Constructors Constructor Description Importer(String commonPrefix, AmetysObjectCollection root, Path zipArchivePath, Merger merger, Collection<ContentsArchiverHelper.ContentFiller> contentFillers, org.slf4j.Logger logger) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void_createAcl(Node node, String zipAclEntryPath)private DefaultContent_createChild(String uuid, String contentDesiredName, String type)private DefaultContent_createContent(Path contentZipEntry, Document propertiesXml)private void_createContentAcl(Node contentNode, Path contentZipEntryPath)private void_createRootContentAcl()private void_fillAdditionalContentAttributes(DefaultContent content)private void_fillContent(ModifiableContent content, Document propertiesXml, Path contentZipEntry)private ImportReport_fillContentAttachments(DefaultContent createdContent, Path contentZipEntry)private void_fillContentNode(DefaultContent content, Document propertiesXml, Path contentZipEntry)private void_fillRoot()private Document_getContentPropertiesXml(Path zipEntryPath)private String_getUnusedContentName(String desiredName)private void_handleWorkflow(String workflowName, WorkflowAwareContent createdContent)private Optional<DefaultContent>_importContent(Path zipEntryPath)private Stream<Path>_matchingZippedFiles()private String[]_retrieveContentTypes(Path contentZipEntry, Document propertiesXml, String xPath)private void_setContentMandatoryProperties(DefaultContent content, String[] contentTypes, String[] mixins, Document propertiesXml)private void_setOutgoingReferences(DefaultContent content)(package private) List<DefaultContent>importRoot() 
 - 
 
- 
- 
Field Detail
- 
_report
final ImportReport _report
 
- 
_commonPrefix
private final String _commonPrefix
 
- 
_root
private final AmetysObjectCollection _root
 
- 
_zipArchivePath
private final Path _zipArchivePath
 
- 
_contentFillers
private final Collection<ContentsArchiverHelper.ContentFiller> _contentFillers
 
- 
_logger
private final org.slf4j.Logger _logger
 
- 
_builder
private final DocumentBuilder _builder
 
- 
_unitaryImporter
private final ContentsArchiverHelper.Importer.UnitaryContentImporter _unitaryImporter
 
 - 
 
- 
Constructor Detail
- 
Importer
Importer(String commonPrefix, AmetysObjectCollection root, Path zipArchivePath, Merger merger, Collection<ContentsArchiverHelper.ContentFiller> contentFillers, org.slf4j.Logger logger) throws ParserConfigurationException
- Throws:
 ParserConfigurationException
 
 - 
 
- 
Method Detail
- 
importRoot
List<DefaultContent> importRoot() throws IOException
- Throws:
 IOException
 
- 
_fillRoot
private void _fillRoot() throws IOException
- Throws:
 IOException
 
- 
_createRootContentAcl
private void _createRootContentAcl() throws IOException
- Throws:
 IOException
 
- 
_createContentAcl
private void _createContentAcl(Node contentNode, Path contentZipEntryPath) throws IOException
- Throws:
 IOException
 
- 
_createAcl
private void _createAcl(Node node, String zipAclEntryPath) throws IOException
- Throws:
 IOException
 
- 
_matchingZippedFiles
private Stream<Path> _matchingZippedFiles() throws IOException
- Throws:
 IOException
 
- 
_importContent
private Optional<DefaultContent> _importContent(Path zipEntryPath) throws ImportGlobalFailException
- Throws:
 ImportGlobalFailException
 
- 
_getContentPropertiesXml
private Document _getContentPropertiesXml(Path zipEntryPath) throws SAXException, IOException
- Throws:
 SAXExceptionIOException
 
- 
_createContent
private DefaultContent _createContent(Path contentZipEntry, Document propertiesXml) throws Archivers.AmetysObjectNotImportedException, Exception
 
- 
_retrieveContentTypes
private String[] _retrieveContentTypes(Path contentZipEntry, Document propertiesXml, String xPath) throws TransformerException, Archivers.AmetysObjectNotImportedException
 
- 
_createChild
private DefaultContent _createChild(String uuid, String contentDesiredName, String type) throws AccessDeniedException, ItemNotFoundException, RepositoryException
 
- 
_getUnusedContentName
private String _getUnusedContentName(String desiredName)
 
- 
_setContentMandatoryProperties
private void _setContentMandatoryProperties(DefaultContent content, String[] contentTypes, String[] mixins, Document propertiesXml) throws TransformerException, Archivers.AmetysObjectNotImportedException
 
- 
_fillContentNode
private void _fillContentNode(DefaultContent content, Document propertiesXml, Path contentZipEntry) throws TransformerException, Exception
- Throws:
 TransformerExceptionException
 
- 
_fillContent
private void _fillContent(ModifiableContent content, Document propertiesXml, Path contentZipEntry) throws Exception
- Throws:
 Exception
 
- 
_fillContentAttachments
private ImportReport _fillContentAttachments(DefaultContent createdContent, Path contentZipEntry) throws IOException, RepositoryException
- Throws:
 IOExceptionRepositoryException
 
- 
_fillAdditionalContentAttributes
private void _fillAdditionalContentAttributes(DefaultContent content)
 
- 
_setOutgoingReferences
private void _setOutgoingReferences(DefaultContent content)
 
- 
_handleWorkflow
private void _handleWorkflow(String workflowName, WorkflowAwareContent createdContent) throws com.opensymphony.workflow.WorkflowException
- Throws:
 com.opensymphony.workflow.WorkflowException
 
 - 
 
 -