Liferay 6.0.5

com.liferay.portlet.imagegallery.lar
Class IGPortletDataHandlerImpl

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

public class IGPortletDataHandlerImpl
extends BasePortletDataHandler


Constructor Summary
IGPortletDataHandlerImpl()
           
 
Method Summary
protected  PortletPreferences doDeleteData(PortletDataContext context, String portletId, PortletPreferences preferences)
           
protected  String doExportData(PortletDataContext context, String portletId, PortletPreferences preferences)
           
protected  PortletPreferences doImportData(PortletDataContext context, String portletId, PortletPreferences preferences, String data)
           
protected static void exportFolder(PortletDataContext context, Element foldersElement, Element imagesElement, IGFolder folder)
           
static void exportImage(PortletDataContext context, Element foldersElement, Element imagesElement, IGImage image)
           
protected static void exportParentFolder(PortletDataContext context, Element foldersElement, long folderId)
           
 PortletDataHandlerControl[] getExportControls()
          Returns an array of the controls defined for this data handler.
protected static String getFolderName(long companyId, long groupId, long parentFolderId, String name, int count)
           
protected static String getFolderPath(PortletDataContext context, long folderId)
           
protected static String getImageBinPath(PortletDataContext context, IGImage image)
           
static String getImagePath(PortletDataContext context, IGImage image)
           
 PortletDataHandlerControl[] getImportControls()
          Returns an array of the controls defined for this data handler.
protected static String getImportFolderPath(PortletDataContext context, long folderId)
           
static void importFolder(PortletDataContext context, Element folderElement)
           
protected static void importFolder(PortletDataContext context, IGFolder folder)
           
static void importImage(PortletDataContext context, Element imageElement)
           
protected static void importImage(PortletDataContext context, IGImage image, String binPath)
           
 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, importData
 
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(PortletDataContext context,
                               Element foldersElement,
                               Element imagesElement,
                               IGImage image)
                        throws Exception
Throws:
Exception

getImagePath

public static String getImagePath(PortletDataContext context,
                                  IGImage image)

importFolder

public static void importFolder(PortletDataContext context,
                                Element folderElement)
                         throws Exception
Throws:
Exception

importImage

public static void importImage(PortletDataContext context,
                               Element imageElement)
                        throws Exception
Throws:
Exception

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.

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.

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

importFolder

protected static void importFolder(PortletDataContext context,
                                   IGFolder folder)
                            throws Exception
Throws:
Exception

importImage

protected static void importImage(PortletDataContext context,
                                  IGImage image,
                                  String binPath)
                           throws Exception
Throws:
Exception

exportFolder

protected static void exportFolder(PortletDataContext context,
                                   Element foldersElement,
                                   Element imagesElement,
                                   IGFolder folder)
                            throws Exception
Throws:
Exception

exportParentFolder

protected static void exportParentFolder(PortletDataContext context,
                                         Element foldersElement,
                                         long folderId)
                                  throws Exception
Throws:
Exception

getFolderName

protected static String getFolderName(long companyId,
                                      long groupId,
                                      long parentFolderId,
                                      String name,
                                      int count)
                               throws Exception
Throws:
Exception

getFolderPath

protected static String getFolderPath(PortletDataContext context,
                                      long folderId)

getImageBinPath

protected static String getImageBinPath(PortletDataContext context,
                                        IGImage image)

getImportFolderPath

protected static String getImportFolderPath(PortletDataContext context,
                                            long folderId)

doDeleteData

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

doExportData

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

doImportData

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

Liferay 6.0.5