org.exoplatform.faq.service
Class InitialDataPlugin
java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.forum.common.conf.ManagedPlugin
org.exoplatform.faq.service.InitialDataPlugin
- All Implemented Interfaces:
- org.exoplatform.container.component.ComponentPlugin
public class InitialDataPlugin
- extends org.exoplatform.forum.common.conf.ManagedPlugin
A plugin to initialize FAQ data from xml export. By default the data will be imported to root category only if it does not already exist
are :
- location : configuration url for the data to import
- forceXML (optional) : indicates if XML data should override existing data
| Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin |
desc, name |
|
Constructor Summary |
InitialDataPlugin(org.exoplatform.container.xml.InitParams params)
|
| Methods inherited from class org.exoplatform.forum.common.conf.ManagedPlugin |
getDescription, getName |
| Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin |
setDescription, setName |
InitialDataPlugin
public InitialDataPlugin(org.exoplatform.container.xml.InitParams params)
setLocation
public void setLocation(String location)
setForceXML
public void setForceXML(boolean forceXML)
getLocation
public String getLocation()
isForceXML
public boolean isForceXML()
importData
public boolean importData(FAQService service,
org.exoplatform.container.configuration.ConfigurationManager configurationService)
throws RuntimeException
- Throws:
RuntimeException
readCategoryFromXml
protected String readCategoryFromXml(org.exoplatform.container.configuration.ConfigurationManager configurationService)
throws Exception,
UnsupportedEncodingException,
IOException
- Look for the name of the category in the input file
- Parameters:
configurationService -
- Returns:
-
- Throws:
Exception
UnsupportedEncodingException
IOException
createCategory
protected void createCategory(FAQService service,
String categoryName)
throws Exception
- Throws:
Exception
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.