com.liferay.portlet.documentlibrary.util
Class DLUtil
java.lang.Object
com.liferay.portlet.documentlibrary.util.DLUtil
public class DLUtil
- extends Object
|
Method Summary |
static int |
compareVersions(String version1,
String version2)
|
static String |
getAbsolutePath(PortletRequest portletRequest,
long folderId)
|
static Set<String> |
getAllMediaGalleryMimeTypes()
|
static String |
getDDMStructureKey(DLFileEntryType dlFileEntryType)
|
static String |
getDDMStructureKey(String fileEntryTypeUuid)
|
static String |
getDeprecatedDDMStructureKey(DLFileEntryType dlFileEntryType)
|
static String |
getDeprecatedDDMStructureKey(long fileEntryTypeId)
|
static String |
getDividedPath(long id)
|
static DL |
getDL()
|
static String |
getDLFileEntryControlPanelLink(PortletRequest portletRequest,
long fileEntryId)
|
static String |
getDLFolderControlPanelLink(PortletRequest portletRequest,
long folderId)
|
static String |
getDownloadURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay,
String queryString)
|
static String |
getDownloadURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay,
String queryString,
boolean appendVersion,
boolean absoluteURL)
|
static Map<String,String> |
getEmailDefinitionTerms(RenderRequest request,
String emailFromAddress,
String emailFromName)
|
static Map<String,String> |
getEmailFromDefinitionTerms(RenderRequest request,
String emailFromAddress,
String emailFromName)
|
static List<FileEntry> |
getFileEntries(Hits hits)
|
static String |
getFileEntryImage(FileEntry fileEntry,
ThemeDisplay themeDisplay)
|
static Set<Long> |
getFileEntryTypeSubscriptionClassPKs(long userId)
|
static String |
getFileIcon(String extension)
|
static String |
getFileIconCssClass(String extension)
|
static String |
getGenericName(String extension)
|
static String |
getImagePreviewURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay)
|
static String |
getImagePreviewURL(FileEntry fileEntry,
ThemeDisplay themeDisplay)
|
static String |
getPreviewURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay,
String queryString)
|
static String |
getPreviewURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay,
String queryString,
boolean appendToken)
Deprecated. As of 6.2.0, replaced by getPreviewURL(FileEntry,
FileVersion, ThemeDisplay, String, boolean, boolean) |
static String |
getPreviewURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay,
String queryString,
boolean appendVersion,
boolean absoluteURL)
|
static
|
getRepositoryModelOrderByComparator(String orderByCol,
String orderByType)
|
static
|
getRepositoryModelOrderByComparator(String orderByCol,
String orderByType,
boolean orderByModel)
|
static String |
getSanitizedFileName(String title,
String extension)
|
static String |
getTempFileId(long id,
String version)
|
static String |
getTempFileId(long id,
String version,
String languageId)
|
static String |
getThumbnailSrc(FileEntry fileEntry,
DLFileShortcut dlFileShortcut,
ThemeDisplay themeDisplay)
Deprecated. As of 7.0.0, replaced by getThumbnailSrc(FileEntry,
ThemeDisplay) |
static String |
getThumbnailSrc(FileEntry fileEntry,
FileVersion fileVersion,
DLFileShortcut dlFileShortcut,
ThemeDisplay themeDisplay)
Deprecated. As of 7.0.0, replaced by getThumbnailSrc(FileEntry,
FileVersion, ThemeDisplay) |
static String |
getThumbnailSrc(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay)
|
static String |
getThumbnailSrc(FileEntry fileEntry,
ThemeDisplay themeDisplay)
|
static String |
getThumbnailStyle()
|
static String |
getThumbnailStyle(boolean max,
int margin)
|
static String |
getThumbnailStyle(boolean max,
int margin,
int height,
int width)
|
static String |
getTitleWithExtension(FileEntry fileEntry)
|
static String |
getTitleWithExtension(String title,
String extension)
|
static String |
getUniqueFileName(long groupId,
long folderId,
String fileName)
|
static String |
getWebDavURL(ThemeDisplay themeDisplay,
Folder folder,
FileEntry fileEntry)
|
static String |
getWebDavURL(ThemeDisplay themeDisplay,
Folder folder,
FileEntry fileEntry,
boolean manualCheckInRequired)
|
static String |
getWebDavURL(ThemeDisplay themeDisplay,
Folder folder,
FileEntry fileEntry,
boolean manualCheckInRequired,
boolean officeExtensionRequired)
|
static boolean |
hasWorkflowDefinitionLink(long companyId,
long groupId,
long folderId,
long fileEntryTypeId)
|
static boolean |
isAutoGeneratedDLFileEntryTypeDDMStructureKey(String ddmStructureKey)
|
static boolean |
isOfficeExtension(String extension)
|
static boolean |
isSubscribedToFileEntryType(long companyId,
long groupId,
long userId,
long fileEntryTypeId)
|
static boolean |
isSubscribedToFolder(long companyId,
long groupId,
long userId,
long folderId)
|
static boolean |
isSubscribedToFolder(long companyId,
long groupId,
long userId,
long folderId,
boolean recursive)
|
static boolean |
isValidVersion(String version)
|
void |
setDL(DL dl)
|
static void |
startWorkflowInstance(long userId,
DLFileVersion dlFileVersion,
String syncEventType,
ServiceContext serviceContext)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DLUtil
public DLUtil()
compareVersions
public static int compareVersions(String version1,
String version2)
getAbsolutePath
public static String getAbsolutePath(PortletRequest portletRequest,
long folderId)
throws PortalException
- Throws:
PortalException
getAllMediaGalleryMimeTypes
public static Set<String> getAllMediaGalleryMimeTypes()
getDDMStructureKey
public static String getDDMStructureKey(DLFileEntryType dlFileEntryType)
getDDMStructureKey
public static String getDDMStructureKey(String fileEntryTypeUuid)
getDeprecatedDDMStructureKey
public static String getDeprecatedDDMStructureKey(DLFileEntryType dlFileEntryType)
getDeprecatedDDMStructureKey
public static String getDeprecatedDDMStructureKey(long fileEntryTypeId)
getDividedPath
public static String getDividedPath(long id)
getDL
public static DL getDL()
getDLFileEntryControlPanelLink
public static String getDLFileEntryControlPanelLink(PortletRequest portletRequest,
long fileEntryId)
throws PortalException
- Throws:
PortalException
getDLFolderControlPanelLink
public static String getDLFolderControlPanelLink(PortletRequest portletRequest,
long folderId)
throws PortalException
- Throws:
PortalException
getDownloadURL
public static String getDownloadURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay,
String queryString)
getDownloadURL
public static String getDownloadURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay,
String queryString,
boolean appendVersion,
boolean absoluteURL)
getEmailDefinitionTerms
public static Map<String,String> getEmailDefinitionTerms(RenderRequest request,
String emailFromAddress,
String emailFromName)
getEmailFromDefinitionTerms
public static Map<String,String> getEmailFromDefinitionTerms(RenderRequest request,
String emailFromAddress,
String emailFromName)
getFileEntries
public static List<FileEntry> getFileEntries(Hits hits)
getFileEntryImage
public static String getFileEntryImage(FileEntry fileEntry,
ThemeDisplay themeDisplay)
getFileEntryTypeSubscriptionClassPKs
public static Set<Long> getFileEntryTypeSubscriptionClassPKs(long userId)
getFileIcon
public static String getFileIcon(String extension)
getFileIconCssClass
public static String getFileIconCssClass(String extension)
getGenericName
public static String getGenericName(String extension)
getImagePreviewURL
public static String getImagePreviewURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay)
throws Exception
- Throws:
Exception
getImagePreviewURL
public static String getImagePreviewURL(FileEntry fileEntry,
ThemeDisplay themeDisplay)
throws Exception
- Throws:
Exception
getPreviewURL
public static String getPreviewURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay,
String queryString)
getPreviewURL
@Deprecated
public static String getPreviewURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay,
String queryString,
boolean appendToken)
- Deprecated. As of 6.2.0, replaced by
getPreviewURL(FileEntry,
FileVersion, ThemeDisplay, String, boolean, boolean)
getPreviewURL
public static String getPreviewURL(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay,
String queryString,
boolean appendVersion,
boolean absoluteURL)
getRepositoryModelOrderByComparator
public static <T> OrderByComparator<T> getRepositoryModelOrderByComparator(String orderByCol,
String orderByType)
getRepositoryModelOrderByComparator
public static <T> OrderByComparator<T> getRepositoryModelOrderByComparator(String orderByCol,
String orderByType,
boolean orderByModel)
getSanitizedFileName
public static String getSanitizedFileName(String title,
String extension)
getTempFileId
public static String getTempFileId(long id,
String version)
getTempFileId
public static String getTempFileId(long id,
String version,
String languageId)
getThumbnailSrc
@Deprecated
public static String getThumbnailSrc(FileEntry fileEntry,
DLFileShortcut dlFileShortcut,
ThemeDisplay themeDisplay)
throws Exception
- Deprecated. As of 7.0.0, replaced by
getThumbnailSrc(FileEntry,
ThemeDisplay)
- Throws:
Exception
getThumbnailSrc
@Deprecated
public static String getThumbnailSrc(FileEntry fileEntry,
FileVersion fileVersion,
DLFileShortcut dlFileShortcut,
ThemeDisplay themeDisplay)
throws Exception
- Deprecated. As of 7.0.0, replaced by
getThumbnailSrc(FileEntry,
FileVersion, ThemeDisplay)
- Throws:
Exception
getThumbnailSrc
public static String getThumbnailSrc(FileEntry fileEntry,
FileVersion fileVersion,
ThemeDisplay themeDisplay)
throws Exception
- Throws:
Exception
getThumbnailSrc
public static String getThumbnailSrc(FileEntry fileEntry,
ThemeDisplay themeDisplay)
throws Exception
- Throws:
Exception
getThumbnailStyle
public static String getThumbnailStyle()
getThumbnailStyle
public static String getThumbnailStyle(boolean max,
int margin)
getThumbnailStyle
public static String getThumbnailStyle(boolean max,
int margin,
int height,
int width)
getTitleWithExtension
public static String getTitleWithExtension(FileEntry fileEntry)
getTitleWithExtension
public static String getTitleWithExtension(String title,
String extension)
getUniqueFileName
public static String getUniqueFileName(long groupId,
long folderId,
String fileName)
getWebDavURL
public static String getWebDavURL(ThemeDisplay themeDisplay,
Folder folder,
FileEntry fileEntry)
throws PortalException
- Throws:
PortalException
getWebDavURL
public static String getWebDavURL(ThemeDisplay themeDisplay,
Folder folder,
FileEntry fileEntry,
boolean manualCheckInRequired)
throws PortalException
- Throws:
PortalException
getWebDavURL
public static String getWebDavURL(ThemeDisplay themeDisplay,
Folder folder,
FileEntry fileEntry,
boolean manualCheckInRequired,
boolean officeExtensionRequired)
throws PortalException
- Throws:
PortalException
hasWorkflowDefinitionLink
public static boolean hasWorkflowDefinitionLink(long companyId,
long groupId,
long folderId,
long fileEntryTypeId)
throws Exception
- Throws:
Exception
isAutoGeneratedDLFileEntryTypeDDMStructureKey
public static boolean isAutoGeneratedDLFileEntryTypeDDMStructureKey(String ddmStructureKey)
isOfficeExtension
public static boolean isOfficeExtension(String extension)
isSubscribedToFileEntryType
public static boolean isSubscribedToFileEntryType(long companyId,
long groupId,
long userId,
long fileEntryTypeId)
isSubscribedToFolder
public static boolean isSubscribedToFolder(long companyId,
long groupId,
long userId,
long folderId)
throws PortalException
- Throws:
PortalException
isSubscribedToFolder
public static boolean isSubscribedToFolder(long companyId,
long groupId,
long userId,
long folderId,
boolean recursive)
throws PortalException
- Throws:
PortalException
isValidVersion
public static boolean isValidVersion(String version)
startWorkflowInstance
public static void startWorkflowInstance(long userId,
DLFileVersion dlFileVersion,
String syncEventType,
ServiceContext serviceContext)
throws PortalException
- Throws:
PortalException
setDL
public void setDL(DL dl)