Class ResourcesArchiverHelper.Importer
- java.lang.Object
 - 
- org.ametys.plugins.contentio.archive.ResourcesArchiverHelper.Importer
 
 
- 
- Enclosing class:
 - ResourcesArchiverHelper
 
private class ResourcesArchiverHelper.Importer extends Object
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description private classResourcesArchiverHelper.Importer.UnitaryCollectionImporterprivate classResourcesArchiverHelper.Importer.UnitaryResourceImporter 
- 
Field Summary
Fields Modifier and Type Field Description private DocumentBuilder_builderprivate String_commonPrefixprivate List<JCRResource>_importedResourcesprivate org.slf4j.Logger_loggerprivate Merger_mergerprivate Node_parentOfRoot(package private) ImportReport_reportprivate JCRResourcesCollection_rootprivate ResourcesArchiverHelper.Importer.UnitaryCollectionImporter_unitaryCollectionImporterprivate ResourcesArchiverHelper.Importer.UnitaryResourceImporter_unitaryResourceImporterprivate Path_zipArchivePath 
- 
Method Summary
 
 - 
 
- 
- 
Field Detail
- 
_report
final ImportReport _report
 
- 
_commonPrefix
private final String _commonPrefix
 
- 
_parentOfRoot
private final Node _parentOfRoot
 
- 
_zipArchivePath
private final Path _zipArchivePath
 
- 
_logger
private final org.slf4j.Logger _logger
 
- 
_builder
private final DocumentBuilder _builder
 
- 
_importedResources
private final List<JCRResource> _importedResources
 
- 
_root
private JCRResourcesCollection _root
 
- 
_unitaryCollectionImporter
private final ResourcesArchiverHelper.Importer.UnitaryCollectionImporter _unitaryCollectionImporter
 
- 
_unitaryResourceImporter
private final ResourcesArchiverHelper.Importer.UnitaryResourceImporter _unitaryResourceImporter
 
 - 
 
- 
Constructor Detail
- 
Importer
Importer(String commonPrefix, Node parentOfRoot, Path zipArchivePath, Merger merger, org.slf4j.Logger logger) throws ParserConfigurationException
- Throws:
 ParserConfigurationException
 
 - 
 
- 
Method Detail
- 
importRoot
void importRoot() throws IOException
- Throws:
 IOException
 
- 
getImportedResource
List<JCRResource> getImportedResource()
 
- 
_createResourceCollectionAcl
private void _createResourceCollectionAcl(Node collectionNode, String folderPath) throws IOException
- Throws:
 IOException
 
- 
_importChildren
private void _importChildren(Path folder) throws IOException
- Throws:
 IOException
 
- 
_getDirectFolderChildren
private DirectoryStream<Path> _getDirectFolderChildren(String pathPrefix) throws IOException
- Throws:
 IOException
 
- 
_getDirectFileChildren
private DirectoryStream<Path> _getDirectFileChildren(String pathPrefix) throws IOException
- Throws:
 IOException
 
- 
_importResourceCollectionAndChildren
private void _importResourceCollectionAndChildren(Path folder) throws IOException
- Throws:
 IOException
 
- 
_importResourceCollection
private Optional<Node> _importResourceCollection(Path folder) throws ImportGlobalFailException
- Throws:
 ImportGlobalFailException
 
- 
_getFolderPropertiesXml
private Document _getFolderPropertiesXml(Path folder) throws IOException
- Throws:
 IOException
 
- 
_createResourceCollection
private Node _createResourceCollection(Path folder, String id, Document propertiesXml) throws IOException, Archivers.AmetysObjectNotImportedException, TransformerException
 
- 
_createChildResourceCollection
private Node _createChildResourceCollection(Node parentNode, String uuid, String collectionName) throws RepositoryException
- Throws:
 RepositoryException
 
- 
_relativePath
private String _relativePath(Path folderOrFile)
 
- 
_retrieveParentJcrNode
private Node _retrieveParentJcrNode(Path fileOrFolder, boolean isRoot)
 
- 
_importResource
private Optional<JCRResource> _importResource(Path file) throws ImportGlobalFailException
- Throws:
 ImportGlobalFailException
 
- 
_getFilePropertiesXml
private Document _getFilePropertiesXml(Path file) throws IOException
- Throws:
 IOException
 
- 
_createdResource
private JCRResource _createdResource(Path file, String id, Document propertiesXml) throws IOException, Archivers.AmetysObjectNotImportedException
 
- 
_createChildResource
private Node _createChildResource(Node parentNode, String uuid, String resourceName) throws RepositoryException
- Throws:
 RepositoryException
 
- 
_resolveResource
private JCRResource _resolveResource(Node resourceNode)
 
- 
_setResourceData
private void _setResourceData(Node resourceNode, Path file, Document propertiesXml) throws RepositoryException, IOException, TransformerException
 
- 
_setResourceProperties
private void _setResourceProperties(Node resourceNode, Document propertiesXml) throws TransformerException, Archivers.AmetysObjectNotImportedException, RepositoryException
 
- 
_setResourceMetadata
private void _setResourceMetadata(Node resourceNode, Path file) throws IOException
- Throws:
 IOException
 
- 
_setDublinCoreMetadata
private void _setDublinCoreMetadata(ModifiableDublinCoreAwareAmetysObject dcObject, Path file) throws IOException
- Throws:
 IOException
 
- 
_setDublinCoreMetadata
private void _setDublinCoreMetadata(ModifiableDublinCoreAwareAmetysObject dcObject, Document doc) throws TransformerException
- Throws:
 TransformerException
 
- 
_getMimeType
private String _getMimeType(Path file)
 
 - 
 
 -