com.liferay.portlet.documentlibrary.lar
Class DLPortletDataHandlerImpl
java.lang.Object
com.liferay.portal.kernel.lar.BasePortletDataHandler
com.liferay.portlet.documentlibrary.lar.DLPortletDataHandlerImpl
- All Implemented Interfaces:
- PortletDataHandler
public class DLPortletDataHandlerImpl
- extends BasePortletDataHandler
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)
|
static void |
exportFileEntry(PortletDataContext context,
Element foldersElement,
Element fileEntriesElement,
Element fileRanksElement,
DLFileEntry fileEntry)
|
protected static void |
exportFileRank(PortletDataContext context,
Element fileRanksElement,
DLFileRank fileRank)
|
protected static void |
exportFileShortcut(PortletDataContext context,
Element foldersElement,
Element fileShortcutsElement,
DLFileShortcut fileShortcut)
|
protected static void |
exportFolder(PortletDataContext context,
Element foldersElement,
Element fileEntriesElement,
Element fileShortcutsElement,
Element fileRanksElement,
DLFolder folder)
|
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 |
getFileEntryBinPath(PortletDataContext context,
DLFileEntry fileEntry)
|
static String |
getFileEntryPath(PortletDataContext context,
DLFileEntry fileEntry)
|
protected static String |
getFileRankPath(PortletDataContext context,
DLFileRank fileRank)
|
protected static String |
getFileShortcutPath(PortletDataContext context,
DLFileShortcut fileShortcut)
|
protected static String |
getFolderName(long companyId,
long groupId,
long parentFolderId,
String name,
int count)
|
protected static String |
getFolderPath(PortletDataContext context,
DLFolder folder)
|
PortletDataHandlerControl[] |
getImportControls()
Returns an array of the controls defined for this data handler. |
protected static String |
getImportFolderPath(PortletDataContext context,
long folderId)
|
protected static long |
getRepositoryId(long groupId,
long folderId)
|
static void |
importFileEntry(PortletDataContext context,
Element fileEntryElement)
|
protected static void |
importFileRank(PortletDataContext context,
DLFileRank rank)
|
static void |
importFileRank(PortletDataContext context,
Element fileRankElement)
|
protected static void |
importFileShortcut(PortletDataContext context,
DLFileShortcut fileShortcut)
|
protected static void |
importFileShortcut(PortletDataContext context,
Element fileShortcutElement)
|
protected static void |
importFolder(PortletDataContext context,
DLFolder folder)
|
static void |
importFolder(PortletDataContext context,
Element folderElement)
|
boolean |
isAlwaysExportable()
Returns true to allow the user to export data for this
portlet even though it may not belong to any pages. |
protected static boolean |
isDuplicateFileEntry(DLFileEntry fileEntry1,
DLFileEntry fileEntry2)
|
boolean |
isPublishToLiveByDefault()
Returns whether the data exported by this handler should be included by
default when publishing to live. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DLPortletDataHandlerImpl
public DLPortletDataHandlerImpl()
exportFileEntry
public static void exportFileEntry(PortletDataContext context,
Element foldersElement,
Element fileEntriesElement,
Element fileRanksElement,
DLFileEntry fileEntry)
throws Exception
- Throws:
Exception
getFileEntryPath
public static String getFileEntryPath(PortletDataContext context,
DLFileEntry fileEntry)
importFileEntry
public static void importFileEntry(PortletDataContext context,
Element fileEntryElement)
throws Exception
- Throws:
Exception
importFileRank
public static void importFileRank(PortletDataContext context,
Element fileRankElement)
throws Exception
- Throws:
Exception
importFolder
public static void importFolder(PortletDataContext context,
Element folderElement)
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
exportFileRank
protected static void exportFileRank(PortletDataContext context,
Element fileRanksElement,
DLFileRank fileRank)
throws Exception
- Throws:
Exception
exportFileShortcut
protected static void exportFileShortcut(PortletDataContext context,
Element foldersElement,
Element fileShortcutsElement,
DLFileShortcut fileShortcut)
throws Exception
- Throws:
Exception
exportFolder
protected static void exportFolder(PortletDataContext context,
Element foldersElement,
Element fileEntriesElement,
Element fileShortcutsElement,
Element fileRanksElement,
DLFolder folder)
throws Exception
- Throws:
Exception
exportParentFolder
protected static void exportParentFolder(PortletDataContext context,
Element foldersElement,
long folderId)
throws Exception
- Throws:
Exception
getFileEntryBinPath
protected static String getFileEntryBinPath(PortletDataContext context,
DLFileEntry fileEntry)
getFileRankPath
protected static String getFileRankPath(PortletDataContext context,
DLFileRank fileRank)
getFileShortcutPath
protected static String getFileShortcutPath(PortletDataContext context,
DLFileShortcut fileShortcut)
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,
DLFolder folder)
getImportFolderPath
protected static String getImportFolderPath(PortletDataContext context,
long folderId)
getRepositoryId
protected static long getRepositoryId(long groupId,
long folderId)
importFileRank
protected static void importFileRank(PortletDataContext context,
DLFileRank rank)
throws Exception
- Throws:
Exception
importFileShortcut
protected static void importFileShortcut(PortletDataContext context,
DLFileShortcut fileShortcut)
throws Exception
- Throws:
Exception
importFileShortcut
protected static void importFileShortcut(PortletDataContext context,
Element fileShortcutElement)
throws Exception
- Throws:
Exception
importFolder
protected static void importFolder(PortletDataContext context,
DLFolder folder)
throws Exception
- Throws:
Exception
isDuplicateFileEntry
protected static boolean isDuplicateFileEntry(DLFileEntry fileEntry1,
DLFileEntry fileEntry2)
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