Liferay 6.1.2-ce-ga3

com.liferay.portlet.messageboards.lar
Class MBPortletDataHandlerImpl

java.lang.Object
  extended by com.liferay.portal.kernel.lar.BasePortletDataHandler
      extended by com.liferay.portlet.messageboards.lar.MBPortletDataHandlerImpl
All Implemented Interfaces:
PortletDataHandler

public class MBPortletDataHandlerImpl
extends BasePortletDataHandler


Constructor Summary
MBPortletDataHandlerImpl()
           
 
Method Summary
protected  PortletPreferences doDeleteData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences)
           
protected  String doExportData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences)
           
protected  PortletPreferences doImportData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences, String data)
           
protected  void exportBan(PortletDataContext portletDataContext, Element userBansElement, MBBan ban)
           
protected  void exportCategory(PortletDataContext portletDataContext, Element categoriesElement, Element messagesElement, Element threadFlagsElement, MBCategory category)
           
protected  void exportMessage(PortletDataContext portletDataContext, Element categoriesElement, Element messagesElement, Element threadFlagsElement, MBMessage message)
           
protected  void exportParentCategory(PortletDataContext portletDataContext, Element categoriesElement, long categoryId)
           
protected  void exportThreadFlag(PortletDataContext portletDataContext, Element threadFlagsElement, MBThreadFlag threadFlag)
           
protected  List<ObjectValuePair<String,InputStream>> getAttachments(PortletDataContext portletDataContext, Element messageElement, MBMessage message)
           
protected  long getCategoryId(PortletDataContext portletDataContext, MBMessage message, Map<Long,Long> categoryIds, long categoryId)
           
protected  String getCategoryPath(PortletDataContext portletDataContext, MBCategory category)
           
 PortletDataHandlerControl[] getExportControls()
          Returns an array of the controls defined for this data handler.
 PortletDataHandlerControl[] getExportMetadataControls()
          Returns an array of the metadata controls defined for this data handler.
protected  String getImportCategoryPath(PortletDataContext portletDataContext, long categoryId)
           
 PortletDataHandlerControl[] getImportControls()
          Returns an array of the controls defined for this data handler.
 PortletDataHandlerControl[] getImportMetadataControls()
          Returns an array of the metadata controls defined for this data handler.
protected  String getMessageAttachementBinPath(PortletDataContext portletDataContext, MBMessage message, String attachment)
           
protected  String getMessagePath(PortletDataContext portletDataContext, MBMessage message)
           
protected  String getThreadFlagPath(PortletDataContext portletDataContext, MBThreadFlag threadFlag)
           
protected  String getUserBanPath(PortletDataContext portletDataContext, MBBan ban)
           
protected  void importBan(PortletDataContext portletDataContext, Element userBanElement, MBBan ban)
           
protected  void importCategory(PortletDataContext portletDataContext, String categoryPath, MBCategory category)
           
protected  void importMessage(PortletDataContext portletDataContext, Element messageElement, MBMessage message)
           
protected  void importThreadFlag(PortletDataContext portletDataContext, Element threadFlagElement, MBThreadFlag threadFlag)
           
 boolean isAlwaysExportable()
          Returns true to allow the user to export data for this portlet even though it may not belong to any pages.
 boolean isPublishToLiveByDefault()
          Returns whether the data exported by this handler should be included by default when publishing to live.
 
Methods inherited from class com.liferay.portal.kernel.lar.BasePortletDataHandler
deleteData, exportData, getDataPortletPreferences, importData, isAlwaysStaged, isDataLocalized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBPortletDataHandlerImpl

public MBPortletDataHandlerImpl()
Method Detail

getExportControls

public PortletDataHandlerControl[] getExportControls()
Description copied from interface: PortletDataHandler
Returns an array of the controls defined for this data handler. These controls enable the developer to create fine grained controls over export behavior. The controls are rendered in the export UI.

Specified by:
getExportControls in interface PortletDataHandler
Overrides:
getExportControls in class BasePortletDataHandler
Returns:
an array of PortletDataHandlerControls

getExportMetadataControls

public PortletDataHandlerControl[] getExportMetadataControls()
Description copied from interface: PortletDataHandler
Returns an array of the metadata controls defined for this data handler. These controls enable the developer to create fine grained controls over export behavior of metadata such as tags, categories, ratings or comments. The controls are rendered in the export UI.

Specified by:
getExportMetadataControls in interface PortletDataHandler
Overrides:
getExportMetadataControls in class BasePortletDataHandler
Returns:
an array of PortletDataHandlerControls

getImportControls

public PortletDataHandlerControl[] getImportControls()
Description copied from interface: PortletDataHandler
Returns an array of the controls defined for this data handler. These controls enable the developer to create fine grained controls over import behavior. The controls are rendered in the import UI.

Specified by:
getImportControls in interface PortletDataHandler
Overrides:
getImportControls in class BasePortletDataHandler
Returns:
An array of PortletDataHandlerControls

getImportMetadataControls

public PortletDataHandlerControl[] getImportMetadataControls()
Description copied from interface: PortletDataHandler
Returns an array of the metadata controls defined for this data handler. These controls enable the developer to create fine grained controls over import behavior of metadata such as tags, categories, ratings or comments. The controls are rendered in the export UI.

Specified by:
getImportMetadataControls in interface PortletDataHandler
Overrides:
getImportMetadataControls in class BasePortletDataHandler
Returns:
an array of PortletDataHandlerControls

isAlwaysExportable

public boolean isAlwaysExportable()
Description copied from interface: PortletDataHandler
Returns true to allow the user to export data for this portlet even though it may not belong to any pages. See LPS-1624.

Specified by:
isAlwaysExportable in interface PortletDataHandler
Overrides:
isAlwaysExportable in class BasePortletDataHandler
Returns:
true to allow the user to export data for this portlet even though it may not belong to any pages

isPublishToLiveByDefault

public boolean isPublishToLiveByDefault()
Description copied from interface: PortletDataHandler
Returns whether the data exported by this handler should be included by default when publishing to live. This should only be true for data that is meant to be managed in an staging environment such as CMS content, but not for data meant to be input by users such as wiki pages or message board posts.

Specified by:
isPublishToLiveByDefault in interface PortletDataHandler
Overrides:
isPublishToLiveByDefault in class BasePortletDataHandler
Returns:
true to publish to live by default

doDeleteData

protected PortletPreferences doDeleteData(PortletDataContext portletDataContext,
                                          String portletId,
                                          PortletPreferences portletPreferences)
                                   throws Exception
Overrides:
doDeleteData in class BasePortletDataHandler
Throws:
Exception

doExportData

protected String doExportData(PortletDataContext portletDataContext,
                              String portletId,
                              PortletPreferences portletPreferences)
                       throws Exception
Overrides:
doExportData in class BasePortletDataHandler
Throws:
Exception

doImportData

protected PortletPreferences doImportData(PortletDataContext portletDataContext,
                                          String portletId,
                                          PortletPreferences portletPreferences,
                                          String data)
                                   throws Exception
Overrides:
doImportData in class BasePortletDataHandler
Throws:
Exception

exportBan

protected void exportBan(PortletDataContext portletDataContext,
                         Element userBansElement,
                         MBBan ban)
                  throws Exception
Throws:
Exception

exportCategory

protected void exportCategory(PortletDataContext portletDataContext,
                              Element categoriesElement,
                              Element messagesElement,
                              Element threadFlagsElement,
                              MBCategory category)
                       throws Exception
Throws:
Exception

exportMessage

protected void exportMessage(PortletDataContext portletDataContext,
                             Element categoriesElement,
                             Element messagesElement,
                             Element threadFlagsElement,
                             MBMessage message)
                      throws Exception
Throws:
Exception

exportParentCategory

protected void exportParentCategory(PortletDataContext portletDataContext,
                                    Element categoriesElement,
                                    long categoryId)
                             throws Exception
Throws:
Exception

exportThreadFlag

protected void exportThreadFlag(PortletDataContext portletDataContext,
                                Element threadFlagsElement,
                                MBThreadFlag threadFlag)
                         throws Exception
Throws:
Exception

getAttachments

protected List<ObjectValuePair<String,InputStream>> getAttachments(PortletDataContext portletDataContext,
                                                                   Element messageElement,
                                                                   MBMessage message)

getCategoryId

protected long getCategoryId(PortletDataContext portletDataContext,
                             MBMessage message,
                             Map<Long,Long> categoryIds,
                             long categoryId)
                      throws Exception
Throws:
Exception

getCategoryPath

protected String getCategoryPath(PortletDataContext portletDataContext,
                                 MBCategory category)

getImportCategoryPath

protected String getImportCategoryPath(PortletDataContext portletDataContext,
                                       long categoryId)

getMessageAttachementBinPath

protected String getMessageAttachementBinPath(PortletDataContext portletDataContext,
                                              MBMessage message,
                                              String attachment)

getMessagePath

protected String getMessagePath(PortletDataContext portletDataContext,
                                MBMessage message)

getThreadFlagPath

protected String getThreadFlagPath(PortletDataContext portletDataContext,
                                   MBThreadFlag threadFlag)

getUserBanPath

protected String getUserBanPath(PortletDataContext portletDataContext,
                                MBBan ban)

importBan

protected void importBan(PortletDataContext portletDataContext,
                         Element userBanElement,
                         MBBan ban)
                  throws Exception
Throws:
Exception

importCategory

protected void importCategory(PortletDataContext portletDataContext,
                              String categoryPath,
                              MBCategory category)
                       throws Exception
Throws:
Exception

importMessage

protected void importMessage(PortletDataContext portletDataContext,
                             Element messageElement,
                             MBMessage message)
                      throws Exception
Throws:
Exception

importThreadFlag

protected void importThreadFlag(PortletDataContext portletDataContext,
                                Element threadFlagElement,
                                MBThreadFlag threadFlag)
                         throws Exception
Throws:
Exception

Liferay 6.1.2-ce-ga3