com.liferay.portlet.documentlibrary.lar
Class DLPortletDataHandlerImpl

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.lar.DLPortletDataHandlerImpl
All Implemented Interfaces:
com.liferay.portal.kernel.lar.PortletDataHandler

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

View Source

Author:
Bruno Farache, Raymond Augé

Constructor Summary
DLPortletDataHandlerImpl()
           
 
Method Summary
 javax.portlet.PortletPreferences deleteData(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences prefs)
           
 java.lang.String exportData(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences prefs)
           
static void exportFileEntry(com.liferay.portal.kernel.lar.PortletDataContext context, org.dom4j.Element foldersEl, org.dom4j.Element fileEntriesEl, org.dom4j.Element fileRanksEl, com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
           
protected static void exportFileRank(com.liferay.portal.kernel.lar.PortletDataContext context, org.dom4j.Element fileRanksEl, com.liferay.portlet.documentlibrary.model.DLFileRank fileRank)
           
protected static void exportFileShortcut(com.liferay.portal.kernel.lar.PortletDataContext context, org.dom4j.Element foldersEl, org.dom4j.Element fileShortcutsEl, com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut)
           
static void exportFolder(com.liferay.portal.kernel.lar.PortletDataContext context, org.dom4j.Element foldersEl, org.dom4j.Element fileEntriesEl, org.dom4j.Element fileShortcutsEl, org.dom4j.Element fileRanksEl, com.liferay.portlet.documentlibrary.model.DLFolder folder)
           
protected static void exportParentFolder(com.liferay.portal.kernel.lar.PortletDataContext context, org.dom4j.Element foldersEl, long folderId)
           
 com.liferay.portal.kernel.lar.PortletDataHandlerControl[] getExportControls()
           
protected static java.lang.String getFileEntryBinPath(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
           
protected static java.lang.String getFileEntryPath(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
           
protected static java.lang.String getFileRankPath(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portlet.documentlibrary.model.DLFileRank fileRank)
           
protected static java.lang.String getFileShortcutPath(com.liferay.portal.kernel.lar.PortletDataContext context, com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut)
           
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.kernel.lar.PortletDataContext context, com.liferay.portlet.documentlibrary.model.DLFolder folder)
           
 com.liferay.portal.kernel.lar.PortletDataHandlerControl[] getImportControls()
           
 javax.portlet.PortletPreferences importData(com.liferay.portal.kernel.lar.PortletDataContext context, java.lang.String portletId, javax.portlet.PortletPreferences prefs, java.lang.String data)
           
static void importFileEntry(com.liferay.portal.kernel.lar.PortletDataContext context, java.util.Map<java.lang.Long,java.lang.Long> folderPKs, java.util.Map<java.lang.String,java.lang.String> fileEntryNames, com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry, java.lang.String binPath)
           
static void importFileRank(com.liferay.portal.kernel.lar.PortletDataContext context, java.util.Map<java.lang.Long,java.lang.Long> folderPKs, java.util.Map<java.lang.String,java.lang.String> fileEntryNames, com.liferay.portlet.documentlibrary.model.DLFileRank rank)
           
protected static void importFileShortcut(com.liferay.portal.kernel.lar.PortletDataContext context, java.util.Map<java.lang.Long,java.lang.Long> folderPKs, java.util.Map<java.lang.String,java.lang.String> fileEntryNames, com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut)
           
static void importFolder(com.liferay.portal.kernel.lar.PortletDataContext context, java.util.Map<java.lang.Long,java.lang.Long> folderPKs, com.liferay.portlet.documentlibrary.model.DLFolder folder)
           
 boolean isPublishToLiveByDefault()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DLPortletDataHandlerImpl

public DLPortletDataHandlerImpl()
Method Detail

exportFileEntry

public static void exportFileEntry(com.liferay.portal.kernel.lar.PortletDataContext context,
                                   org.dom4j.Element foldersEl,
                                   org.dom4j.Element fileEntriesEl,
                                   org.dom4j.Element fileRanksEl,
                                   com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)
                            throws com.liferay.portal.PortalException,
                                   com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

exportFolder

public static void exportFolder(com.liferay.portal.kernel.lar.PortletDataContext context,
                                org.dom4j.Element foldersEl,
                                org.dom4j.Element fileEntriesEl,
                                org.dom4j.Element fileShortcutsEl,
                                org.dom4j.Element fileRanksEl,
                                com.liferay.portlet.documentlibrary.model.DLFolder folder)
                         throws com.liferay.portal.PortalException,
                                com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

importFileEntry

public static void importFileEntry(com.liferay.portal.kernel.lar.PortletDataContext context,
                                   java.util.Map<java.lang.Long,java.lang.Long> folderPKs,
                                   java.util.Map<java.lang.String,java.lang.String> fileEntryNames,
                                   com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry,
                                   java.lang.String binPath)
                            throws java.lang.Exception
Throws:
java.lang.Exception

importFileRank

public static void importFileRank(com.liferay.portal.kernel.lar.PortletDataContext context,
                                  java.util.Map<java.lang.Long,java.lang.Long> folderPKs,
                                  java.util.Map<java.lang.String,java.lang.String> fileEntryNames,
                                  com.liferay.portlet.documentlibrary.model.DLFileRank rank)
                           throws java.lang.Exception
Throws:
java.lang.Exception

importFolder

public static void importFolder(com.liferay.portal.kernel.lar.PortletDataContext context,
                                java.util.Map<java.lang.Long,java.lang.Long> folderPKs,
                                com.liferay.portlet.documentlibrary.model.DLFolder folder)
                         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 prefs)
                                            throws com.liferay.portal.kernel.lar.PortletDataException
Specified by:
deleteData in interface com.liferay.portal.kernel.lar.PortletDataHandler
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 prefs)
                            throws com.liferay.portal.kernel.lar.PortletDataException
Specified by:
exportData in interface com.liferay.portal.kernel.lar.PortletDataHandler
Throws:
com.liferay.portal.kernel.lar.PortletDataException

getExportControls

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

getImportControls

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

importData

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

isPublishToLiveByDefault

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

exportFileRank

protected static void exportFileRank(com.liferay.portal.kernel.lar.PortletDataContext context,
                                     org.dom4j.Element fileRanksEl,
                                     com.liferay.portlet.documentlibrary.model.DLFileRank fileRank)
                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

exportFileShortcut

protected static void exportFileShortcut(com.liferay.portal.kernel.lar.PortletDataContext context,
                                         org.dom4j.Element foldersEl,
                                         org.dom4j.Element fileShortcutsEl,
                                         com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut)
                                  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.kernel.lar.PortletDataContext context,
                                         org.dom4j.Element foldersEl,
                                         long folderId)
                                  throws com.liferay.portal.PortalException,
                                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getFileEntryBinPath

protected static java.lang.String getFileEntryBinPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                                      com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)

getFileEntryPath

protected static java.lang.String getFileEntryPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                                   com.liferay.portlet.documentlibrary.model.DLFileEntry fileEntry)

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.kernel.lar.PortletDataContext context,
                                                com.liferay.portlet.documentlibrary.model.DLFolder folder)

getFileRankPath

protected static java.lang.String getFileRankPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                                  com.liferay.portlet.documentlibrary.model.DLFileRank fileRank)

getFileShortcutPath

protected static java.lang.String getFileShortcutPath(com.liferay.portal.kernel.lar.PortletDataContext context,
                                                      com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut)

importFileShortcut

protected static void importFileShortcut(com.liferay.portal.kernel.lar.PortletDataContext context,
                                         java.util.Map<java.lang.Long,java.lang.Long> folderPKs,
                                         java.util.Map<java.lang.String,java.lang.String> fileEntryNames,
                                         com.liferay.portlet.documentlibrary.model.DLFileShortcut fileShortcut)
                                  throws java.lang.Exception
Throws:
java.lang.Exception