com.liferay.portlet.imagegallery.lar
Class IGPortletDataHandlerImpl

java.lang.Object
  extended by com.liferay.portlet.imagegallery.lar.IGPortletDataHandlerImpl
All Implemented Interfaces:
com.liferay.portal.lar.PortletDataHandler

public class IGPortletDataHandlerImpl
extends java.lang.Object
implements com.liferay.portal.lar.PortletDataHandler

View Source

Author:
Bruno Farache, Raymond Augé

Constructor Summary
IGPortletDataHandlerImpl()
           
 
Method Summary
 javax.portlet.PortletPreferences deleteData(com.liferay.portal.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences prefs)
           
 java.lang.String exportData(com.liferay.portal.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences prefs)
           
protected static void exportFolder(com.liferay.portal.lar.PortletDataContext context, com.liferay.portal.kernel.xml.Element foldersEl, com.liferay.portal.kernel.xml.Element imagesEl, com.liferay.portlet.imagegallery.model.IGFolder folder)
           
static void exportImage(com.liferay.portal.lar.PortletDataContext context, com.liferay.portal.kernel.xml.Element foldersEl, com.liferay.portal.kernel.xml.Element imagesEl, com.liferay.portlet.imagegallery.model.IGImage image)
           
protected static void exportParentFolder(com.liferay.portal.lar.PortletDataContext context, com.liferay.portal.kernel.xml.Element foldersEl, long folderId)
           
 com.liferay.portal.lar.PortletDataHandlerControl[] getExportControls()
           
protected static java.lang.String getFolderName(long companyId, long groupId, long parentFolderId, java.lang.String name, int count)
           
protected static java.lang.String getFolderPath(com.liferay.portal.lar.PortletDataContext context, long folderId)
           
protected static java.lang.String getImageBinPath(com.liferay.portal.lar.PortletDataContext context, com.liferay.portlet.imagegallery.model.IGImage image)
           
protected static java.lang.String getImagePath(com.liferay.portal.lar.PortletDataContext context, com.liferay.portlet.imagegallery.model.IGImage image)
           
 com.liferay.portal.lar.PortletDataHandlerControl[] getImportControls()
           
protected static java.lang.String getImportFolderPath(com.liferay.portal.lar.PortletDataContext context, long folderId)
           
 javax.portlet.PortletPreferences importData(com.liferay.portal.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences prefs, java.lang.String data)
           
static void importFolder(com.liferay.portal.lar.PortletDataContext context, java.util.Map<java.lang.Long,java.lang.Long> folderPKs, com.liferay.portlet.imagegallery.model.IGFolder folder)
           
static void importImage(com.liferay.portal.lar.PortletDataContext context, java.util.Map<java.lang.Long,java.lang.Long> folderPKs, com.liferay.portlet.imagegallery.model.IGImage image, java.lang.String binPath)
           
 boolean isPublishToLiveByDefault()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IGPortletDataHandlerImpl

public IGPortletDataHandlerImpl()
Method Detail

exportImage

public static void exportImage(com.liferay.portal.lar.PortletDataContext context,
                               com.liferay.portal.kernel.xml.Element foldersEl,
                               com.liferay.portal.kernel.xml.Element imagesEl,
                               com.liferay.portlet.imagegallery.model.IGImage image)
                        throws com.liferay.portal.PortalException,
                               com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

importFolder

public static void importFolder(com.liferay.portal.lar.PortletDataContext context,
                                java.util.Map<java.lang.Long,java.lang.Long> folderPKs,
                                com.liferay.portlet.imagegallery.model.IGFolder folder)
                         throws java.lang.Exception
Throws:
java.lang.Exception

importImage

public static void importImage(com.liferay.portal.lar.PortletDataContext context,
                               java.util.Map<java.lang.Long,java.lang.Long> folderPKs,
                               com.liferay.portlet.imagegallery.model.IGImage image,
                               java.lang.String binPath)
                        throws java.lang.Exception
Throws:
java.lang.Exception

deleteData

public javax.portlet.PortletPreferences deleteData(com.liferay.portal.lar.PortletDataContext context,
                                                   java.lang.String portletId,
                                                   javax.portlet.PortletPreferences prefs)
                                            throws com.liferay.portal.lar.PortletDataException
Specified by:
deleteData in interface com.liferay.portal.lar.PortletDataHandler
Throws:
com.liferay.portal.lar.PortletDataException

exportData

public java.lang.String exportData(com.liferay.portal.lar.PortletDataContext context,
                                   java.lang.String portletId,
                                   javax.portlet.PortletPreferences prefs)
                            throws com.liferay.portal.lar.PortletDataException
Specified by:
exportData in interface com.liferay.portal.lar.PortletDataHandler
Throws:
com.liferay.portal.lar.PortletDataException

getExportControls

public com.liferay.portal.lar.PortletDataHandlerControl[] getExportControls()
Specified by:
getExportControls in interface com.liferay.portal.lar.PortletDataHandler

getImportControls

public com.liferay.portal.lar.PortletDataHandlerControl[] getImportControls()
Specified by:
getImportControls in interface com.liferay.portal.lar.PortletDataHandler

importData

public javax.portlet.PortletPreferences importData(com.liferay.portal.lar.PortletDataContext context,
                                                   java.lang.String portletId,
                                                   javax.portlet.PortletPreferences prefs,
                                                   java.lang.String data)
                                            throws com.liferay.portal.lar.PortletDataException
Specified by:
importData in interface com.liferay.portal.lar.PortletDataHandler
Throws:
com.liferay.portal.lar.PortletDataException

isPublishToLiveByDefault

public boolean isPublishToLiveByDefault()
Specified by:
isPublishToLiveByDefault in interface com.liferay.portal.lar.PortletDataHandler

exportFolder

protected static void exportFolder(com.liferay.portal.lar.PortletDataContext context,
                                   com.liferay.portal.kernel.xml.Element foldersEl,
                                   com.liferay.portal.kernel.xml.Element imagesEl,
                                   com.liferay.portlet.imagegallery.model.IGFolder folder)
                            throws com.liferay.portal.PortalException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportParentFolder

protected static void exportParentFolder(com.liferay.portal.lar.PortletDataContext context,
                                         com.liferay.portal.kernel.xml.Element foldersEl,
                                         long folderId)
                                  throws com.liferay.portal.PortalException,
                                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getFolderName

protected static java.lang.String getFolderName(long companyId,
                                                long groupId,
                                                long parentFolderId,
                                                java.lang.String name,
                                                int count)
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getFolderPath

protected static java.lang.String getFolderPath(com.liferay.portal.lar.PortletDataContext context,
                                                long folderId)

getImageBinPath

protected static java.lang.String getImageBinPath(com.liferay.portal.lar.PortletDataContext context,
                                                  com.liferay.portlet.imagegallery.model.IGImage image)

getImagePath

protected static java.lang.String getImagePath(com.liferay.portal.lar.PortletDataContext context,
                                               com.liferay.portlet.imagegallery.model.IGImage image)

getImportFolderPath

protected static java.lang.String getImportFolderPath(com.liferay.portal.lar.PortletDataContext context,
                                                      long folderId)