Class ContentsArchiverHelper.Importer.UnitaryContentImporter
- java.lang.Object
- 
- org.ametys.plugins.contentio.archive.ContentsArchiverHelper.Importer.UnitaryContentImporter
 
- 
- All Implemented Interfaces:
- UnitaryImporter<DefaultContent>
 - Enclosing class:
- ContentsArchiverHelper.Importer
 
 private class ContentsArchiverHelper.Importer.UnitaryContentImporter extends Object implements UnitaryImporter<DefaultContent> 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description privateUnitaryContentImporter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultContentcreate(Path zipEntryPath, String id, Document propertiesXml)Creates the object with the given id and XML properties file.DocumentgetPropertiesXml(Path zipEntryPath)Gets the properties XML file from its ZIP pathImportReportgetReport()TheImportReportStringobjectNameForLogs()The name for the object to import in error logsStringretrieveId(Document propertiesXml)Retrieves the id of the object to import from the XML file- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.ametys.plugins.contentio.archive.UnitaryImporterunitaryImport, unitaryImportFinalize
 
- 
 
- 
- 
- 
Constructor Detail- 
UnitaryContentImporterprivate UnitaryContentImporter() 
 
- 
 - 
Method Detail- 
objectNameForLogspublic String objectNameForLogs() Description copied from interface:UnitaryImporterThe name for the object to import in error logs- Specified by:
- objectNameForLogsin interface- UnitaryImporter<DefaultContent>
- Returns:
- The name for the object to import in error logs
 
 - 
getPropertiesXmlpublic Document getPropertiesXml(Path zipEntryPath) throws Exception Description copied from interface:UnitaryImporterGets the properties XML file from its ZIP path- Specified by:
- getPropertiesXmlin interface- UnitaryImporter<DefaultContent>
- Parameters:
- zipEntryPath- The ZIP entry path of the XML file
- Returns:
- The properties XML file
- Throws:
- Exception- if an error occurs
 
 - 
retrieveIdpublic String retrieveId(Document propertiesXml) throws Exception Description copied from interface:UnitaryImporterRetrieves the id of the object to import from the XML file- Specified by:
- retrieveIdin interface- UnitaryImporter<DefaultContent>
- Parameters:
- propertiesXml- The properties XML file
- Returns:
- The id of the object to import
- Throws:
- Exception- if an error occurs
 
 - 
createpublic DefaultContent create(Path zipEntryPath, String id, Document propertiesXml) throws Archivers.AmetysObjectNotImportedException, Exception Description copied from interface:UnitaryImporterCreates the object with the given id and XML properties file.
 Note that the implementation must create the object with the given id, but it can also create sub-objects for this unitary object (for instance a Resource as an attachment for a Content, etc.).- Specified by:
- createin interface- UnitaryImporter<DefaultContent>
- Parameters:
- zipEntryPath- The ZIP entry path of the XML file
- id- The id of the object to import
- propertiesXml- The properties XML file
- Returns:
- The created object
- Throws:
- Archivers.AmetysObjectNotImportedException- If the object was not imported due to an exception (for instance an attribute is missing in the XML file). Then the object is ignored and the import will continue to the next object.
- ImportGlobalFailException- If the global import process must stop due to any fatal exception.
- Exception- if another unexpected error occurs
 
 - 
getReportpublic ImportReport getReport() Description copied from interface:UnitaryImporterTheImportReport- Specified by:
- getReportin interface- UnitaryImporter<DefaultContent>
- Returns:
- The ImportReport
 
 
- 
 
-