com.liferay.portlet.polls.lar
Class PollsPortletDataHandlerImpl

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

public class PollsPortletDataHandlerImpl
extends com.liferay.portal.kernel.lar.BasePortletDataHandler

View Source

Author:
Bruno Farache, Marcellus Tavares

Constructor Summary
PollsPortletDataHandlerImpl()
           
 
Method Summary
 javax.portlet.PortletPreferences deleteData(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences preferences)
           
protected static void exportChoice(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portal.kernel.xml.Element questionsEl, com.liferay.portlet.polls.model.PollsChoice choice)
           
 java.lang.String exportData(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences preferences)
           
static void exportQuestion(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portal.kernel.xml.Element questionsEl, com.liferay.portal.kernel.xml.Element choicesEl, com.liferay.portal.kernel.xml.Element votesEl, com.liferay.portlet.polls.model.PollsQuestion question)
           
protected static void exportVote(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portal.kernel.xml.Element questionsEl, com.liferay.portlet.polls.model.PollsVote vote)
           
protected static java.lang.String getChoicePath(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portlet.polls.model.PollsChoice choice)
           
 com.liferay.portal.kernel.lar.PortletDataHandlerControl[] getExportControls()
           
 com.liferay.portal.kernel.lar.PortletDataHandlerControl[] getImportControls()
           
protected static java.lang.String getQuestionPath(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portlet.polls.model.PollsQuestion question)
           
protected static java.lang.String getVotePath(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portlet.polls.model.PollsVote vote)
           
static void importChoice(com.liferay.portal.kernel.lar.PortletDataContext context, java.util.Map<java.lang.Long,java.lang.Long> questionPKs, java.util.Map<java.lang.Long,java.lang.Long> choicePKs, com.liferay.portlet.polls.model.PollsChoice choice)
           
 javax.portlet.PortletPreferences importData(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences preferences, java.lang.String data)
           
static void importQuestion(com.liferay.portal.kernel.lar.PortletDataContext context, java.util.Map<java.lang.Long,java.lang.Long> questionPKs, com.liferay.portlet.polls.model.PollsQuestion question)
           
static void importVote(com.liferay.portal.kernel.lar.PortletDataContext context, java.util.Map<java.lang.Long,java.lang.Long> questionPKs, java.util.Map<java.lang.Long,java.lang.Long> choicePKs, com.liferay.portlet.polls.model.PollsVote vote)
           
 boolean isAlwaysExportable()
           
 
Methods inherited from class com.liferay.portal.kernel.lar.BasePortletDataHandler
isPublishToLiveByDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PollsPortletDataHandlerImpl

public PollsPortletDataHandlerImpl()
Method Detail

exportQuestion

public static void exportQuestion(com.liferay.portal.kernel.lar.PortletDataContext context,
                                  com.liferay.portal.kernel.xml.Element questionsEl,
                                  com.liferay.portal.kernel.xml.Element choicesEl,
                                  com.liferay.portal.kernel.xml.Element votesEl,
                                  com.liferay.portlet.polls.model.PollsQuestion question)
                           throws com.liferay.portal.kernel.exception.PortalException,
                                  com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException

importChoice

public static void importChoice(com.liferay.portal.kernel.lar.PortletDataContext context,
                                java.util.Map<java.lang.Long,java.lang.Long> questionPKs,
                                java.util.Map<java.lang.Long,java.lang.Long> choicePKs,
                                com.liferay.portlet.polls.model.PollsChoice choice)
                         throws java.lang.Exception
Throws:
java.lang.Exception

importQuestion

public static void importQuestion(com.liferay.portal.kernel.lar.PortletDataContext context,
                                  java.util.Map<java.lang.Long,java.lang.Long> questionPKs,
                                  com.liferay.portlet.polls.model.PollsQuestion question)
                           throws com.liferay.portal.kernel.exception.SystemException,
                                  com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalException

importVote

public static void importVote(com.liferay.portal.kernel.lar.PortletDataContext context,
                              java.util.Map<java.lang.Long,java.lang.Long> questionPKs,
                              java.util.Map<java.lang.Long,java.lang.Long> choicePKs,
                              com.liferay.portlet.polls.model.PollsVote vote)
                       throws java.lang.Exception
Throws:
java.lang.Exception

deleteData

public javax.portlet.PortletPreferences deleteData(com.liferay.portal.kernel.lar.PortletDataContext context,
                                                   java.lang.String portletId,
                                                   javax.portlet.PortletPreferences preferences)
                                            throws com.liferay.portal.kernel.lar.PortletDataException
Throws:
com.liferay.portal.kernel.lar.PortletDataException

exportData

public java.lang.String exportData(com.liferay.portal.kernel.lar.PortletDataContext context,
                                   java.lang.String portletId,
                                   javax.portlet.PortletPreferences preferences)
                            throws com.liferay.portal.kernel.lar.PortletDataException
Throws:
com.liferay.portal.kernel.lar.PortletDataException

getExportControls

public com.liferay.portal.kernel.lar.PortletDataHandlerControl[] getExportControls()

getImportControls

public com.liferay.portal.kernel.lar.PortletDataHandlerControl[] getImportControls()

importData

public javax.portlet.PortletPreferences importData(com.liferay.portal.kernel.lar.PortletDataContext context,
                                                   java.lang.String portletId,
                                                   javax.portlet.PortletPreferences preferences,
                                                   java.lang.String data)
                                            throws com.liferay.portal.kernel.lar.PortletDataException
Throws:
com.liferay.portal.kernel.lar.PortletDataException

isAlwaysExportable

public boolean isAlwaysExportable()
Specified by:
isAlwaysExportable in interface com.liferay.portal.kernel.lar.PortletDataHandler
Overrides:
isAlwaysExportable in class com.liferay.portal.kernel.lar.BasePortletDataHandler

exportChoice

protected static void exportChoice(com.liferay.portal.kernel.lar.PortletDataContext context,
                                   com.liferay.portal.kernel.xml.Element questionsEl,
                                   com.liferay.portlet.polls.model.PollsChoice choice)
                            throws com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.SystemException

exportVote

protected static void exportVote(com.liferay.portal.kernel.lar.PortletDataContext context,
                                 com.liferay.portal.kernel.xml.Element questionsEl,
                                 com.liferay.portlet.polls.model.PollsVote vote)
                          throws com.liferay.portal.kernel.exception.SystemException
Throws:
com.liferay.portal.kernel.exception.SystemException

getChoicePath

protected static java.lang.String getChoicePath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                                com.liferay.portlet.polls.model.PollsChoice choice)

getQuestionPath

protected static java.lang.String getQuestionPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                                  com.liferay.portlet.polls.model.PollsQuestion question)

getVotePath

protected static java.lang.String getVotePath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                              com.liferay.portlet.polls.model.PollsVote vote)