Class XmlContentImporter
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.webcontentio.xml.XmlContentImporter
-
- All Implemented Interfaces:
ContentImporter
,LogEnabled
,Serviceable
public class XmlContentImporter extends AbstractLogEnabled implements ContentImporter, Serviceable
Default XML content importer
-
-
Constructor Summary
Constructors Constructor Description XmlContentImporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getMimeTypes()
Returns all mime types handled by this importer.void
importContent(File file, ModifiableWebContent content, Map<String,String> params)
Extracts file content and populates the givenContent
.void
postTreatment(ModifiablePage page, Content content, File file)
Post treatment after import processvoid
service(ServiceManager manager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
XmlContentImporter
public XmlContentImporter()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
importContent
public void importContent(File file, ModifiableWebContent content, Map<String,String> params) throws IOException
Description copied from interface:ContentImporter
Extracts file content and populates the givenContent
. Typical usage is to provide a newly created empty Content.- Specified by:
importContent
in interfaceContentImporter
- Parameters:
file
- the source.content
- theContent
to 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
public String[] getMimeTypes()
Description copied from interface:ContentImporter
Returns all mime types handled by this importer.- Specified by:
getMimeTypes
in interfaceContentImporter
- Returns:
- all mime types handled by this importer.
-
postTreatment
public void postTreatment(ModifiablePage page, Content content, File file) throws IOException
Description copied from interface:ContentImporter
Post treatment after import process- Specified by:
postTreatment
in interfaceContentImporter
- Parameters:
page
- The created pagecontent
- The created contentfile
- The imported file- Throws:
IOException
- if an error occurred
-
-