Class XmlContentImporter
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.webcontentio.xml.XmlContentImporter
- All Implemented Interfaces:
ContentImporter,LogEnabled,Serviceable
Default XML content importer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]Returns all mime types handled by this importer.voidimportContent(File file, ModifiableWebContent content, Map<String, String> params) Extracts file content and populates the givenContent.voidpostTreatment(ModifiablePage page, Content content, File file) Post treatment after import processvoidservice(ServiceManager manager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
XmlContentImporter
public XmlContentImporter()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
importContent
public void importContent(File file, ModifiableWebContent content, Map<String, String> params) throws IOExceptionDescription copied from interface:ContentImporterExtracts file content and populates the givenContent. Typical usage is to provide a newly created empty Content.- Specified by:
importContentin interfaceContentImporter- Parameters:
file- the source.content- theContentto be populated.params- in/out params to set and get additional data to and from the importer.- Throws:
IOException- if an error occurs processing the stream.
-
getMimeTypes
Description copied from interface:ContentImporterReturns all mime types handled by this importer.- Specified by:
getMimeTypesin interfaceContentImporter- Returns:
- all mime types handled by this importer.
-
postTreatment
Description copied from interface:ContentImporterPost treatment after import process- Specified by:
postTreatmentin interfaceContentImporter- Parameters:
page- The created pagecontent- The created contentfile- The imported file- Throws:
IOException- if an error occurred
-