Liferay 6.1.2-ce-ga3

com.liferay.portlet.documentlibrary.lar
Class DLPortletDataHandlerImpl

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

public class DLPortletDataHandlerImpl
extends BasePortletDataHandler


Constructor Summary
DLPortletDataHandlerImpl()
           
 
Method Summary
protected  PortletPreferences doDeleteData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences)
           
protected  String doExportData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences)
           
protected  PortletPreferences doImportData(PortletDataContext portletDataContext, String portletId, PortletPreferences portletPreferences, String data)
           
static void exportFileEntry(PortletDataContext portletDataContext, Element fileEntryTypesElement, Element foldersElement, Element fileEntriesElement, Element fileRanksElement, Element repositoriesElement, Element repositoryEntriesElement, FileEntry fileEntry, boolean checkDateRange)
           
protected static void exportFileEntryType(PortletDataContext portletDataContext, Element fileEntryTypesElement, DLFileEntryType dlFileEntryType)
           
protected static void exportFileRank(PortletDataContext portletDataContext, Element fileRanksElement, DLFileRank fileRank)
           
protected static void exportFileShortcut(PortletDataContext portletDataContext, Element fileEntryTypesElement, Element foldersElement, Element fileShortcutsElement, Element repositoriesElement, Element repositoryEntriesElement, DLFileShortcut fileShortcut)
           
protected static void exportFolder(PortletDataContext portletDataContext, Element fileEntryTypesElement, Element foldersElement, Element fileEntriesElement, Element fileShortcutsElement, Element fileRanksElement, Element repositoriesElement, Element repositoryEntriesElement, Folder folder, boolean recurse)
           
protected static void exportFolderFileEntryTypes(PortletDataContext portletDataContext, Folder folder, Element fileEntryTypesElement, Element folderElement)
           
protected static void exportMetaData(PortletDataContext portletDataContext, Element fileEntryTypesElement, Element fileEntryElement, FileEntry fileEntry)
           
protected static void exportParentFolder(PortletDataContext portletDataContext, Element fileEntryTypesElement, Element foldersElement, Element repositoriesElement, Element repositoryEntriesElement, long folderId)
           
protected static void exportRepository(PortletDataContext portletDataContext, Element repositoriesElement, Element repositoryEntriesElement, Repository repository)
           
protected static void exportRepositoryEntry(PortletDataContext portletDataContext, Element repositoryEntriesElement, RepositoryEntry repositoryEntry)
           
 String[] getDataPortletPreferences()
          Returns an array of the portlet preferences that reference data.
 PortletDataHandlerControl[] getExportControls()
          Returns an array of the controls defined for this data handler.
 PortletDataHandlerControl[] getExportMetadataControls()
          Returns an array of the metadata controls defined for this data handler.
protected static String getFileEntryBinPath(PortletDataContext portletDataContext, FileEntry fileEntry)
           
protected static String getFileEntryFileEntryTypeStructureFieldsPath(PortletDataContext portletDataContext, FileEntry fileEntry, String fileEntryTypeUuid, long structureId)
           
static String getFileEntryPath(PortletDataContext portletDataContext, FileEntry fileEntry)
           
protected static String getFileEntryTypeName(String uuid, long groupId, String name, int count)
           
protected static String getFileEntryTypePath(PortletDataContext portletDataContext, DLFileEntryType dlFileEntryType)
           
protected static String getFileRankPath(PortletDataContext portletDataContext, DLFileRank fileRank)
           
protected static String getFileShortcutPath(PortletDataContext portletDataContext, DLFileShortcut fileShortcut)
           
protected static String getFolderName(String uuid, long groupId, long parentFolderId, String name, int count)
           
protected static String getFolderPath(PortletDataContext portletDataContext, Folder folder)
           
 PortletDataHandlerControl[] getImportControls()
          Returns an array of the controls defined for this data handler.
protected static String getImportFolderPath(PortletDataContext portletDataContext, long folderId)
           
 PortletDataHandlerControl[] getImportMetadataControls()
          Returns an array of the metadata controls defined for this data handler.
static PortletDataHandlerControl[] getMetadataControls()
           
static String getRepositoryEntryPath(PortletDataContext portletDataContext, long repositoryEntryId)
           
protected static String getRepositoryEntryPath(PortletDataContext portletDataContext, RepositoryEntry repositoryEntry)
           
protected static String getRepositoryPath(PortletDataContext portletDataContext, Repository repository)
           
static void importFileEntry(PortletDataContext portletDataContext, Element fileEntryElement)
           
static void importFileEntry(PortletDataContext portletDataContext, Element fileEntryElement, String path)
           
protected static void importFileEntryType(PortletDataContext portletDataContext, Element fileEntryTypeElement)
           
protected static void importFileRank(PortletDataContext portletDataContext, DLFileRank fileRank, String fileEntryUuid)
           
static void importFileRank(PortletDataContext portletDataContext, Element fileRankElement)
           
protected static void importFileShortcut(PortletDataContext portletDataContext, Element fileShortcutElement)
           
protected static void importFileShortcut(PortletDataContext portletDataContext, Element fileShortcutElement, DLFileShortcut fileShortcut)
           
static void importFolder(PortletDataContext portletDataContext, Element folderElement)
           
protected static void importFolder(PortletDataContext portletDataContext, String folderPath, Element folderElement, Folder folder)
           
protected static void importFolderFileEntryTypes(PortletDataContext portletDataContext, Element folderElement, Folder folder, ServiceContext serviceContext)
           
protected static void importMetaData(PortletDataContext portletDataContext, Element fileEntryElement, ServiceContext serviceContext)
           
static void importRepository(PortletDataContext portletDataContext, Element repositoryElement)
           
static void importRepositoryEntry(PortletDataContext portletDataContext, Element repositoryEntryElement)
           
 boolean isAlwaysExportable()
          Returns true to allow the user to export data for this portlet even though it may not belong to any pages.
 boolean isDataLocalized()
           
protected static boolean isFileEntryTypeExportable(DLFileEntryType dlFileEntryType)
           
protected static boolean isFileEntryTypeGlobal(long companyId, DLFileEntryType dlFileEntryType)
           
 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, isAlwaysStaged
 
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(PortletDataContext portletDataContext,
                                   Element fileEntryTypesElement,
                                   Element foldersElement,
                                   Element fileEntriesElement,
                                   Element fileRanksElement,
                                   Element repositoriesElement,
                                   Element repositoryEntriesElement,
                                   FileEntry fileEntry,
                                   boolean checkDateRange)
                            throws Exception
Throws:
Exception

getFileEntryPath

public static String getFileEntryPath(PortletDataContext portletDataContext,
                                      FileEntry fileEntry)

getMetadataControls

public static PortletDataHandlerControl[] getMetadataControls()

getRepositoryEntryPath

public static String getRepositoryEntryPath(PortletDataContext portletDataContext,
                                            long repositoryEntryId)

importFileEntry

public static void importFileEntry(PortletDataContext portletDataContext,
                                   Element fileEntryElement)
                            throws Exception
Throws:
Exception

importFileEntry

public static void importFileEntry(PortletDataContext portletDataContext,
                                   Element fileEntryElement,
                                   String path)
                            throws Exception
Throws:
Exception

importFileRank

public static void importFileRank(PortletDataContext portletDataContext,
                                  Element fileRankElement)
                           throws Exception
Throws:
Exception

importFolder

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

importRepository

public static void importRepository(PortletDataContext portletDataContext,
                                    Element repositoryElement)
                             throws Exception
Throws:
Exception

importRepositoryEntry

public static void importRepositoryEntry(PortletDataContext portletDataContext,
                                         Element repositoryEntryElement)
                                  throws Exception
Throws:
Exception

getDataPortletPreferences

public String[] getDataPortletPreferences()
Description copied from interface: PortletDataHandler
Returns an array of the portlet preferences that reference data. These preferences should only be updated if the referenced data is imported.

Specified by:
getDataPortletPreferences in interface PortletDataHandler
Overrides:
getDataPortletPreferences in class BasePortletDataHandler
Returns:
A String array

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.

Specified by:
getExportControls in interface PortletDataHandler
Overrides:
getExportControls in class BasePortletDataHandler
Returns:
an array of PortletDataHandlerControls

getExportMetadataControls

public PortletDataHandlerControl[] getExportMetadataControls()
Description copied from interface: PortletDataHandler
Returns an array of the metadata controls defined for this data handler. These controls enable the developer to create fine grained controls over export behavior of metadata such as tags, categories, ratings or comments. The controls are rendered in the export UI.

Specified by:
getExportMetadataControls in interface PortletDataHandler
Overrides:
getExportMetadataControls in class BasePortletDataHandler
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.

Specified by:
getImportControls in interface PortletDataHandler
Overrides:
getImportControls in class BasePortletDataHandler
Returns:
An array of PortletDataHandlerControls

getImportMetadataControls

public PortletDataHandlerControl[] getImportMetadataControls()
Description copied from interface: PortletDataHandler
Returns an array of the metadata controls defined for this data handler. These controls enable the developer to create fine grained controls over import behavior of metadata such as tags, categories, ratings or comments. The controls are rendered in the export UI.

Specified by:
getImportMetadataControls in interface PortletDataHandler
Overrides:
getImportMetadataControls in class BasePortletDataHandler
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

isDataLocalized

public boolean isDataLocalized()
Specified by:
isDataLocalized in interface PortletDataHandler
Overrides:
isDataLocalized in class BasePortletDataHandler

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

exportFileEntryType

protected static void exportFileEntryType(PortletDataContext portletDataContext,
                                          Element fileEntryTypesElement,
                                          DLFileEntryType dlFileEntryType)
                                   throws Exception
Throws:
Exception

exportFileRank

protected static void exportFileRank(PortletDataContext portletDataContext,
                                     Element fileRanksElement,
                                     DLFileRank fileRank)
                              throws Exception
Throws:
Exception

exportFileShortcut

protected static void exportFileShortcut(PortletDataContext portletDataContext,
                                         Element fileEntryTypesElement,
                                         Element foldersElement,
                                         Element fileShortcutsElement,
                                         Element repositoriesElement,
                                         Element repositoryEntriesElement,
                                         DLFileShortcut fileShortcut)
                                  throws Exception
Throws:
Exception

exportFolder

protected static void exportFolder(PortletDataContext portletDataContext,
                                   Element fileEntryTypesElement,
                                   Element foldersElement,
                                   Element fileEntriesElement,
                                   Element fileShortcutsElement,
                                   Element fileRanksElement,
                                   Element repositoriesElement,
                                   Element repositoryEntriesElement,
                                   Folder folder,
                                   boolean recurse)
                            throws Exception
Throws:
Exception

exportFolderFileEntryTypes

protected static void exportFolderFileEntryTypes(PortletDataContext portletDataContext,
                                                 Folder folder,
                                                 Element fileEntryTypesElement,
                                                 Element folderElement)
                                          throws Exception
Throws:
Exception

exportMetaData

protected static void exportMetaData(PortletDataContext portletDataContext,
                                     Element fileEntryTypesElement,
                                     Element fileEntryElement,
                                     FileEntry fileEntry)
                              throws Exception
Throws:
Exception

exportParentFolder

protected static void exportParentFolder(PortletDataContext portletDataContext,
                                         Element fileEntryTypesElement,
                                         Element foldersElement,
                                         Element repositoriesElement,
                                         Element repositoryEntriesElement,
                                         long folderId)
                                  throws Exception
Throws:
Exception

exportRepository

protected static void exportRepository(PortletDataContext portletDataContext,
                                       Element repositoriesElement,
                                       Element repositoryEntriesElement,
                                       Repository repository)
                                throws Exception
Throws:
Exception

exportRepositoryEntry

protected static void exportRepositoryEntry(PortletDataContext portletDataContext,
                                            Element repositoryEntriesElement,
                                            RepositoryEntry repositoryEntry)
                                     throws Exception
Throws:
Exception

getFileEntryBinPath

protected static String getFileEntryBinPath(PortletDataContext portletDataContext,
                                            FileEntry fileEntry)

getFileEntryFileEntryTypeStructureFieldsPath

protected static String getFileEntryFileEntryTypeStructureFieldsPath(PortletDataContext portletDataContext,
                                                                     FileEntry fileEntry,
                                                                     String fileEntryTypeUuid,
                                                                     long structureId)

getFileEntryTypeName

protected static String getFileEntryTypeName(String uuid,
                                             long groupId,
                                             String name,
                                             int count)
                                      throws Exception
Throws:
Exception
See Also:
PortletImporter#getAssetCategoryName(String, long, long, String, int)}, PortletImporter#getAssetVocabularyName(String, long, String, int)}

getFileEntryTypePath

protected static String getFileEntryTypePath(PortletDataContext portletDataContext,
                                             DLFileEntryType dlFileEntryType)

getFileRankPath

protected static String getFileRankPath(PortletDataContext portletDataContext,
                                        DLFileRank fileRank)

getFileShortcutPath

protected static String getFileShortcutPath(PortletDataContext portletDataContext,
                                            DLFileShortcut fileShortcut)

getFolderName

protected static String getFolderName(String uuid,
                                      long groupId,
                                      long parentFolderId,
                                      String name,
                                      int count)
                               throws Exception
Throws:
Exception
See Also:
PortletImporter#getAssetCategoryName(String, long, long, String, int)}, PortletImporter#getAssetVocabularyName(String, long, String, int)}

getFolderPath

protected static String getFolderPath(PortletDataContext portletDataContext,
                                      Folder folder)

getImportFolderPath

protected static String getImportFolderPath(PortletDataContext portletDataContext,
                                            long folderId)

getRepositoryEntryPath

protected static String getRepositoryEntryPath(PortletDataContext portletDataContext,
                                               RepositoryEntry repositoryEntry)

getRepositoryPath

protected static String getRepositoryPath(PortletDataContext portletDataContext,
                                          Repository repository)

importFileEntryType

protected static void importFileEntryType(PortletDataContext portletDataContext,
                                          Element fileEntryTypeElement)
                                   throws Exception
Throws:
Exception

importFileRank

protected static void importFileRank(PortletDataContext portletDataContext,
                                     DLFileRank fileRank,
                                     String fileEntryUuid)
                              throws Exception
Throws:
Exception

importFileShortcut

protected static void importFileShortcut(PortletDataContext portletDataContext,
                                         Element fileShortcutElement)
                                  throws Exception
Throws:
Exception

importFileShortcut

protected static void importFileShortcut(PortletDataContext portletDataContext,
                                         Element fileShortcutElement,
                                         DLFileShortcut fileShortcut)
                                  throws Exception
Throws:
Exception

importFolder

protected static void importFolder(PortletDataContext portletDataContext,
                                   String folderPath,
                                   Element folderElement,
                                   Folder folder)
                            throws Exception
Throws:
Exception

importFolderFileEntryTypes

protected static void importFolderFileEntryTypes(PortletDataContext portletDataContext,
                                                 Element folderElement,
                                                 Folder folder,
                                                 ServiceContext serviceContext)
                                          throws Exception
Throws:
Exception

importMetaData

protected static void importMetaData(PortletDataContext portletDataContext,
                                     Element fileEntryElement,
                                     ServiceContext serviceContext)
                              throws Exception
Throws:
Exception

isFileEntryTypeExportable

protected static boolean isFileEntryTypeExportable(DLFileEntryType dlFileEntryType)

isFileEntryTypeGlobal

protected static boolean isFileEntryTypeGlobal(long companyId,
                                               DLFileEntryType dlFileEntryType)
                                        throws PortalException,
                                               SystemException
Throws:
PortalException
SystemException

doDeleteData

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

doExportData

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

doImportData

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

Liferay 6.1.2-ce-ga3