Liferay 6.2-ce-ga5

com.liferay.portal.kernel.lar
Class BaseStagedModelDataHandler<T extends StagedModel>

java.lang.Object
  extended by com.liferay.portal.kernel.lar.BaseStagedModelDataHandler<T>
All Implemented Interfaces:
StagedModelDataHandler<T>

public abstract class BaseStagedModelDataHandler<T extends StagedModel>
extends Object
implements StagedModelDataHandler<T>


Field Summary
protected  SessionFactory sessionFactory
           
static int STAGING_HIBERNATE_CACHE_FLUSH_FREQUENCY
           
 
Constructor Summary
BaseStagedModelDataHandler()
           
 
Method Summary
protected  boolean countStagedModel(PortletDataContext portletDataContext, T stagedModel)
           
abstract  void deleteStagedModel(String uuid, long groupId, String className, String extraData)
           
protected abstract  void doExportStagedModel(PortletDataContext portletDataContext, T stagedModel)
           
protected  void doImportCompanyStagedModel(PortletDataContext portletDataContext, String uuid, long classPK)
           
protected abstract  void doImportStagedModel(PortletDataContext portletDataContext, T stagedModel)
           
protected  void doRestoreStagedModel(PortletDataContext portletDataContext, T stagedModel)
           
 void exportStagedModel(PortletDataContext portletDataContext, T stagedModel)
           
abstract  String[] getClassNames()
           
 String getDisplayName(T stagedModel)
           
 int[] getExportableStatuses()
           
 Map<String,String> getReferenceAttributes(PortletDataContext portletDataContext, T stagedModel)
           
 void importCompanyStagedModel(PortletDataContext portletDataContext, Element element)
           
 void importCompanyStagedModel(PortletDataContext portletDataContext, String uuid, long classPK)
           
 void importStagedModel(PortletDataContext portletDataContext, T stagedModel)
           
protected  void maintainSessionCache(PortletDataContext portletDataContext)
           
 void restoreStagedModel(PortletDataContext portletDataContext, T stagedModel)
           
protected  void validateExport(PortletDataContext portletDataContext, T stagedModel)
           
protected  boolean validateMissingReference(String uuid, long companyId, long groupId)
           
 boolean validateReference(PortletDataContext portletDataContext, Element referenceElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STAGING_HIBERNATE_CACHE_FLUSH_FREQUENCY

public static final int STAGING_HIBERNATE_CACHE_FLUSH_FREQUENCY

sessionFactory

protected final SessionFactory sessionFactory
Constructor Detail

BaseStagedModelDataHandler

public BaseStagedModelDataHandler()
Method Detail

deleteStagedModel

public abstract void deleteStagedModel(String uuid,
                                       long groupId,
                                       String className,
                                       String extraData)
                                throws PortalException,
                                       SystemException
Specified by:
deleteStagedModel in interface StagedModelDataHandler<T extends StagedModel>
Throws:
PortalException
SystemException

exportStagedModel

public void exportStagedModel(PortletDataContext portletDataContext,
                              T stagedModel)
                       throws PortletDataException
Specified by:
exportStagedModel in interface StagedModelDataHandler<T extends StagedModel>
Throws:
PortletDataException

getClassNames

public abstract String[] getClassNames()
Specified by:
getClassNames in interface StagedModelDataHandler<T extends StagedModel>

getDisplayName

public String getDisplayName(T stagedModel)
Specified by:
getDisplayName in interface StagedModelDataHandler<T extends StagedModel>

getExportableStatuses

public int[] getExportableStatuses()
Specified by:
getExportableStatuses in interface StagedModelDataHandler<T extends StagedModel>

getReferenceAttributes

public Map<String,String> getReferenceAttributes(PortletDataContext portletDataContext,
                                                 T stagedModel)
Specified by:
getReferenceAttributes in interface StagedModelDataHandler<T extends StagedModel>

importCompanyStagedModel

public void importCompanyStagedModel(PortletDataContext portletDataContext,
                                     Element element)
                              throws PortletDataException
Specified by:
importCompanyStagedModel in interface StagedModelDataHandler<T extends StagedModel>
Throws:
PortletDataException

importCompanyStagedModel

public void importCompanyStagedModel(PortletDataContext portletDataContext,
                                     String uuid,
                                     long classPK)
                              throws PortletDataException
Specified by:
importCompanyStagedModel in interface StagedModelDataHandler<T extends StagedModel>
Throws:
PortletDataException

importStagedModel

public void importStagedModel(PortletDataContext portletDataContext,
                              T stagedModel)
                       throws PortletDataException
Specified by:
importStagedModel in interface StagedModelDataHandler<T extends StagedModel>
Throws:
PortletDataException

maintainSessionCache

protected void maintainSessionCache(PortletDataContext portletDataContext)

restoreStagedModel

public void restoreStagedModel(PortletDataContext portletDataContext,
                               T stagedModel)
                        throws PortletDataException
Specified by:
restoreStagedModel in interface StagedModelDataHandler<T extends StagedModel>
Throws:
PortletDataException

validateReference

public boolean validateReference(PortletDataContext portletDataContext,
                                 Element referenceElement)
Specified by:
validateReference in interface StagedModelDataHandler<T extends StagedModel>

countStagedModel

protected boolean countStagedModel(PortletDataContext portletDataContext,
                                   T stagedModel)

doExportStagedModel

protected abstract void doExportStagedModel(PortletDataContext portletDataContext,
                                            T stagedModel)
                                     throws Exception
Throws:
Exception

doImportCompanyStagedModel

protected void doImportCompanyStagedModel(PortletDataContext portletDataContext,
                                          String uuid,
                                          long classPK)
                                   throws Exception
Throws:
Exception

doImportStagedModel

protected abstract void doImportStagedModel(PortletDataContext portletDataContext,
                                            T stagedModel)
                                     throws Exception
Throws:
Exception

doRestoreStagedModel

protected void doRestoreStagedModel(PortletDataContext portletDataContext,
                                    T stagedModel)
                             throws Exception
Throws:
Exception

validateExport

protected void validateExport(PortletDataContext portletDataContext,
                              T stagedModel)
                       throws PortletDataException
Throws:
PortletDataException

validateMissingReference

protected boolean validateMissingReference(String uuid,
                                           long companyId,
                                           long groupId)
                                    throws Exception
Throws:
Exception

Liferay 6.2-ce-ga5