org.exoplatform.faq.service
Class InitialDataPlugin

java.lang.Object
  extended by org.exoplatform.container.component.BaseComponentPlugin
      extended by org.exoplatform.forum.common.conf.ManagedPlugin
          extended by 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 :


Field Summary
 
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name
 
Constructor Summary
InitialDataPlugin(org.exoplatform.container.xml.InitParams params)
           
 
Method Summary
protected  void createCategory(FAQService service, String categoryName)
           
 String getLocation()
           
 boolean importData(FAQService service, org.exoplatform.container.configuration.ConfigurationManager configurationService)
           
 boolean isForceXML()
           
protected  String readCategoryFromXml(org.exoplatform.container.configuration.ConfigurationManager configurationService)
          Look for the name of the category in the input file
 void setForceXML(boolean forceXML)
           
 void setLocation(String location)
           
 String toString()
           
 
Methods inherited from class org.exoplatform.forum.common.conf.ManagedPlugin
getDescription, getName
 
Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InitialDataPlugin

public InitialDataPlugin(org.exoplatform.container.xml.InitParams params)
Method Detail

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 © 2013 eXo Platform SAS. All Rights Reserved.