com.liferay.portlet.documentlibrary.util
Class DLUtil

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.util.DLUtil

public class DLUtil
extends java.lang.Object

Author:
Brian Wing Shun Chan, Julio Camarero

Method Summary
static void addPortletBreadcrumbEntries(DLFileShortcut dlFileShortcut, javax.servlet.http.HttpServletRequest request, javax.portlet.RenderResponse renderResponse)
           
static void addPortletBreadcrumbEntries(FileEntry fileEntry, javax.servlet.http.HttpServletRequest request, javax.portlet.RenderResponse renderResponse)
           
static void addPortletBreadcrumbEntries(Folder folder, javax.servlet.http.HttpServletRequest request, LiferayPortletResponse liferayPortletResponse)
           
static void addPortletBreadcrumbEntries(Folder folder, javax.servlet.http.HttpServletRequest request, javax.portlet.PortletURL portletURL)
           
static void addPortletBreadcrumbEntries(Folder folder, javax.servlet.http.HttpServletRequest request, javax.portlet.RenderResponse renderResponse)
           
static void addPortletBreadcrumbEntries(long folderId, javax.servlet.http.HttpServletRequest request, javax.portlet.RenderResponse renderResponse)
           
static int compareVersions(java.lang.String version1, java.lang.String version2)
           
static java.util.Set<java.lang.String> getAllMediaGalleryMimeTypes()
           
static java.lang.String getDDMStructureKey(DLFileEntryType dlFileEntryType)
           
static java.lang.String getDDMStructureKey(java.lang.String fileEntryTypeUuid)
           
static java.lang.String getDeprecatedDDMStructureKey(DLFileEntryType dlFileEntryType)
           
static java.lang.String getDeprecatedDDMStructureKey(long fileEntryTypeId)
           
static java.lang.String getDividedPath(long id)
           
static java.lang.String getFileEntryImage(FileEntry fileEntry, ThemeDisplay themeDisplay)
           
static java.lang.String getFileIcon(java.lang.String extension)
           
static java.lang.String getGenericName(java.lang.String extension)
           
static long[] getGroupIds(long groupId)
           
static long[] getGroupIds(ThemeDisplay themeDisplay)
           
static java.lang.String[] getMediaGalleryMimeTypes(javax.portlet.PortletPreferences portletPreferences, javax.portlet.PortletRequest portletRequest)
           
static java.lang.String getPreviewURL(FileEntry fileEntry, FileVersion fileVersion, ThemeDisplay themeDisplay, java.lang.String queryString)
           
static java.lang.String getPreviewURL(FileEntry fileEntry, FileVersion fileVersion, ThemeDisplay themeDisplay, java.lang.String queryString, boolean appendToken)
          Deprecated. getPreviewURL(FileEntry, FileVersion, ThemeDisplay, String, boolean, boolean)
static java.lang.String getPreviewURL(FileEntry fileEntry, FileVersion fileVersion, ThemeDisplay themeDisplay, java.lang.String queryString, boolean appendVersion, boolean absoluteURL)
           
static OrderByComparator getRepositoryModelOrderByComparator(java.lang.String orderByCol, java.lang.String orderByType)
           
static java.lang.String getTempFileId(long id, java.lang.String version)
           
static java.lang.String getTempFileId(long id, java.lang.String version, java.lang.String languageId)
           
static java.lang.String getThumbnailSrc(FileEntry fileEntry, DLFileShortcut dlFileShortcut, ThemeDisplay themeDisplay)
           
static java.lang.String getThumbnailSrc(FileEntry fileEntry, FileVersion fileVersion, DLFileShortcut dlFileShortcut, ThemeDisplay themeDisplay)
           
static java.lang.String getThumbnailStyle()
           
static java.lang.String getTitleWithExtension(FileEntry fileEntry)
           
static java.lang.String getTitleWithExtension(java.lang.String title, java.lang.String extension)
           
static java.lang.String getWebDavURL(ThemeDisplay themeDisplay, Folder folder, FileEntry fileEntry)
           
static boolean hasWorkflowDefinitionLink(long companyId, long groupId, long folderId, long fileEntryTypeId)
           
static boolean isAutoGeneratedDLFileEntryTypeDDMStructureKey(java.lang.String ddmStructureKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addPortletBreadcrumbEntries

public static void addPortletBreadcrumbEntries(DLFileShortcut dlFileShortcut,
                                               javax.servlet.http.HttpServletRequest request,
                                               javax.portlet.RenderResponse renderResponse)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

addPortletBreadcrumbEntries

public static void addPortletBreadcrumbEntries(FileEntry fileEntry,
                                               javax.servlet.http.HttpServletRequest request,
                                               javax.portlet.RenderResponse renderResponse)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

addPortletBreadcrumbEntries

public static void addPortletBreadcrumbEntries(Folder folder,
                                               javax.servlet.http.HttpServletRequest request,
                                               LiferayPortletResponse liferayPortletResponse)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

addPortletBreadcrumbEntries

public static void addPortletBreadcrumbEntries(Folder folder,
                                               javax.servlet.http.HttpServletRequest request,
                                               javax.portlet.PortletURL portletURL)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

addPortletBreadcrumbEntries

public static void addPortletBreadcrumbEntries(Folder folder,
                                               javax.servlet.http.HttpServletRequest request,
                                               javax.portlet.RenderResponse renderResponse)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

addPortletBreadcrumbEntries

public static void addPortletBreadcrumbEntries(long folderId,
                                               javax.servlet.http.HttpServletRequest request,
                                               javax.portlet.RenderResponse renderResponse)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

compareVersions

public static int compareVersions(java.lang.String version1,
                                  java.lang.String version2)

getAllMediaGalleryMimeTypes

public static java.util.Set<java.lang.String> getAllMediaGalleryMimeTypes()

getDDMStructureKey

public static java.lang.String getDDMStructureKey(DLFileEntryType dlFileEntryType)

getDDMStructureKey

public static java.lang.String getDDMStructureKey(java.lang.String fileEntryTypeUuid)

getDeprecatedDDMStructureKey

public static java.lang.String getDeprecatedDDMStructureKey(DLFileEntryType dlFileEntryType)

getDeprecatedDDMStructureKey

public static java.lang.String getDeprecatedDDMStructureKey(long fileEntryTypeId)

getDividedPath

public static java.lang.String getDividedPath(long id)

getFileEntryImage

public static java.lang.String getFileEntryImage(FileEntry fileEntry,
                                                 ThemeDisplay themeDisplay)

getFileIcon

public static java.lang.String getFileIcon(java.lang.String extension)

getGenericName

public static java.lang.String getGenericName(java.lang.String extension)

getGroupIds

public static long[] getGroupIds(long groupId)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getGroupIds

public static long[] getGroupIds(ThemeDisplay themeDisplay)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getMediaGalleryMimeTypes

public static java.lang.String[] getMediaGalleryMimeTypes(javax.portlet.PortletPreferences portletPreferences,
                                                          javax.portlet.PortletRequest portletRequest)

getPreviewURL

public static java.lang.String getPreviewURL(FileEntry fileEntry,
                                             FileVersion fileVersion,
                                             ThemeDisplay themeDisplay,
                                             java.lang.String queryString)

getPreviewURL

public static java.lang.String getPreviewURL(FileEntry fileEntry,
                                             FileVersion fileVersion,
                                             ThemeDisplay themeDisplay,
                                             java.lang.String queryString,
                                             boolean appendToken)
Deprecated. getPreviewURL(FileEntry, FileVersion, ThemeDisplay, String, boolean, boolean)


getPreviewURL

public static java.lang.String getPreviewURL(FileEntry fileEntry,
                                             FileVersion fileVersion,
                                             ThemeDisplay themeDisplay,
                                             java.lang.String queryString,
                                             boolean appendVersion,
                                             boolean absoluteURL)

getRepositoryModelOrderByComparator

public static OrderByComparator getRepositoryModelOrderByComparator(java.lang.String orderByCol,
                                                                    java.lang.String orderByType)

getTempFileId

public static java.lang.String getTempFileId(long id,
                                             java.lang.String version)

getTempFileId

public static java.lang.String getTempFileId(long id,
                                             java.lang.String version,
                                             java.lang.String languageId)

getThumbnailSrc

public static java.lang.String getThumbnailSrc(FileEntry fileEntry,
                                               DLFileShortcut dlFileShortcut,
                                               ThemeDisplay themeDisplay)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

getThumbnailSrc

public static java.lang.String getThumbnailSrc(FileEntry fileEntry,
                                               FileVersion fileVersion,
                                               DLFileShortcut dlFileShortcut,
                                               ThemeDisplay themeDisplay)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

getThumbnailStyle

public static java.lang.String getThumbnailStyle()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

getTitleWithExtension

public static java.lang.String getTitleWithExtension(FileEntry fileEntry)

getTitleWithExtension

public static java.lang.String getTitleWithExtension(java.lang.String title,
                                                     java.lang.String extension)

getWebDavURL

public static java.lang.String getWebDavURL(ThemeDisplay themeDisplay,
                                            Folder folder,
                                            FileEntry fileEntry)
                                     throws PortalException,
                                            SystemException
Throws:
PortalException
SystemException

hasWorkflowDefinitionLink

public static boolean hasWorkflowDefinitionLink(long companyId,
                                                long groupId,
                                                long folderId,
                                                long fileEntryTypeId)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

isAutoGeneratedDLFileEntryTypeDDMStructureKey

public static boolean isAutoGeneratedDLFileEntryTypeDDMStructureKey(java.lang.String ddmStructureKey)