Liferay 7.0-ce-b8 portal-impl

com.liferay.portlet.documentlibrary.util
Class DLImpl

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.util.DLImpl
All Implemented Interfaces:
com.liferay.document.library.kernel.util.DL

public class DLImpl
extends Object
implements com.liferay.document.library.kernel.util.DL


Field Summary
 
Fields inherited from interface com.liferay.document.library.kernel.util.DL
MANUAL_CHECK_IN_REQUIRED, MANUAL_CHECK_IN_REQUIRED_PATH, OFFICE_EXTENSION, OFFICE_EXTENSION_PATH, WEBDAV_CHECK_IN_MODE
 
Constructor Summary
DLImpl()
           
 
Method Summary
 int compareVersions(String version1, String version2)
           
 void destroy()
           
 String getAbsolutePath(PortletRequest portletRequest, long folderId)
           
 Set<String> getAllMediaGalleryMimeTypes()
           
 String getDDMStructureKey(com.liferay.document.library.kernel.model.DLFileEntryType dlFileEntryType)
           
 String getDDMStructureKey(String fileEntryTypeUuid)
           
 String getDeprecatedDDMStructureKey(com.liferay.document.library.kernel.model.DLFileEntryType dlFileEntryType)
           
 String getDeprecatedDDMStructureKey(long fileEntryTypeId)
           
 String getDividedPath(long id)
           
 String getDLFileEntryControlPanelLink(PortletRequest portletRequest, long fileEntryId)
           
 String getDLFolderControlPanelLink(PortletRequest portletRequest, long folderId)
           
 String getDownloadURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, String queryString)
           
 String getDownloadURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, String queryString, boolean appendVersion, boolean absoluteURL)
           
 Map<String,String> getEmailDefinitionTerms(PortletRequest portletRequest, String emailFromAddress, String emailFromName)
           
 Map<String,String> getEmailFromDefinitionTerms(PortletRequest portletRequest, String emailFromAddress, String emailFromName)
           
protected  String getEntryURL(com.liferay.document.library.kernel.model.DLFileVersion dlFileVersion, com.liferay.portal.kernel.service.ServiceContext serviceContext)
           
 List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(com.liferay.portal.kernel.search.Hits hits)
           
 String getFileEntryImage(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
           
 Set<Long> getFileEntryTypeSubscriptionClassPKs(long userId)
           
 String getFileIcon(String extension)
           
 String getFileIconCssClass(String extension)
           
 String getGenericName(String extension)
           
 String getImagePreviewURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
           
 String getImagePreviewURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
           
protected  String getImageSrc(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, String queryString)
           
 String getPreviewURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, String queryString)
           
 String getPreviewURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, String queryString, boolean appendVersion, boolean absoluteURL)
           
<T> com.liferay.portal.kernel.util.OrderByComparator<T>
getRepositoryModelOrderByComparator(String orderByCol, String orderByType)
           
<T> com.liferay.portal.kernel.util.OrderByComparator<T>
getRepositoryModelOrderByComparator(String orderByCol, String orderByType, boolean orderByModel)
           
 String getSanitizedFileName(String title, String extension)
           
 String getTempFileId(long id, String version)
           
 String getTempFileId(long id, String version, String languageId)
           
 String getThumbnailSrc(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.document.library.kernel.model.DLFileShortcut dlFileShortcut, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
          Deprecated. As of 7.0.0, replaced by getThumbnailSrc(FileEntry, ThemeDisplay)
 String getThumbnailSrc(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, com.liferay.document.library.kernel.model.DLFileShortcut dlFileShortcut, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
          Deprecated. As of 7.0.0, replaced by getThumbnailSrc(FileEntry, FileVersion, ThemeDisplay)
 String getThumbnailSrc(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
           
 String getThumbnailSrc(com.liferay.portal.kernel.repository.model.FileEntry fileEntry, com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
           
 String getThumbnailStyle()
           
 String getThumbnailStyle(boolean max, int margin)
           
 String getThumbnailStyle(boolean max, int margin, int height, int width)
           
 String getTitleWithExtension(com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
           
 String getTitleWithExtension(String title, String extension)
           
 String getUniqueFileName(long groupId, long folderId, String fileName)
           
 String getWebDavURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, com.liferay.portal.kernel.repository.model.Folder folder, com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
           
 String getWebDavURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, com.liferay.portal.kernel.repository.model.Folder folder, com.liferay.portal.kernel.repository.model.FileEntry fileEntry, boolean manualCheckInRequired)
           
 String getWebDavURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay, com.liferay.portal.kernel.repository.model.Folder folder, com.liferay.portal.kernel.repository.model.FileEntry fileEntry, boolean manualCheckInRequired, boolean openDocumentUrl)
           
 boolean hasWorkflowDefinitionLink(long companyId, long groupId, long folderId, long fileEntryTypeId)
           
 boolean isAutoGeneratedDLFileEntryTypeDDMStructureKey(String ddmStructureKey)
           
 boolean isOfficeExtension(String extension)
           
 boolean isSubscribedToFileEntryType(long companyId, long groupId, long userId, long fileEntryTypeId)
           
 boolean isSubscribedToFolder(long companyId, long groupId, long userId, long folderId)
           
 boolean isSubscribedToFolder(long companyId, long groupId, long userId, long folderId, boolean recursive)
           
 boolean isValidVersion(String version)
           
 void startWorkflowInstance(long userId, com.liferay.document.library.kernel.model.DLFileVersion dlFileVersion, String syncEventType, com.liferay.portal.kernel.service.ServiceContext serviceContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DLImpl

public DLImpl()
Method Detail

compareVersions

public int compareVersions(String version1,
                           String version2)
Specified by:
compareVersions in interface com.liferay.document.library.kernel.util.DL

destroy

public void destroy()

getAbsolutePath

public String getAbsolutePath(PortletRequest portletRequest,
                              long folderId)
                       throws com.liferay.portal.kernel.exception.PortalException
Specified by:
getAbsolutePath in interface com.liferay.document.library.kernel.util.DL
Throws:
com.liferay.portal.kernel.exception.PortalException

getAllMediaGalleryMimeTypes

public Set<String> getAllMediaGalleryMimeTypes()
Specified by:
getAllMediaGalleryMimeTypes in interface com.liferay.document.library.kernel.util.DL

getDDMStructureKey

public String getDDMStructureKey(com.liferay.document.library.kernel.model.DLFileEntryType dlFileEntryType)
Specified by:
getDDMStructureKey in interface com.liferay.document.library.kernel.util.DL

getDDMStructureKey

public String getDDMStructureKey(String fileEntryTypeUuid)
Specified by:
getDDMStructureKey in interface com.liferay.document.library.kernel.util.DL

getDeprecatedDDMStructureKey

public String getDeprecatedDDMStructureKey(com.liferay.document.library.kernel.model.DLFileEntryType dlFileEntryType)
Specified by:
getDeprecatedDDMStructureKey in interface com.liferay.document.library.kernel.util.DL

getDeprecatedDDMStructureKey

public String getDeprecatedDDMStructureKey(long fileEntryTypeId)
Specified by:
getDeprecatedDDMStructureKey in interface com.liferay.document.library.kernel.util.DL

getDividedPath

public String getDividedPath(long id)
Specified by:
getDividedPath in interface com.liferay.document.library.kernel.util.DL

getDLFileEntryControlPanelLink

public String getDLFileEntryControlPanelLink(PortletRequest portletRequest,
                                             long fileEntryId)
Specified by:
getDLFileEntryControlPanelLink in interface com.liferay.document.library.kernel.util.DL

getDLFolderControlPanelLink

public String getDLFolderControlPanelLink(PortletRequest portletRequest,
                                          long folderId)
Specified by:
getDLFolderControlPanelLink in interface com.liferay.document.library.kernel.util.DL

getDownloadURL

public String getDownloadURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                             com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
                             com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay,
                             String queryString)
Specified by:
getDownloadURL in interface com.liferay.document.library.kernel.util.DL

getDownloadURL

public String getDownloadURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                             com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
                             com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay,
                             String queryString,
                             boolean appendVersion,
                             boolean absoluteURL)
Specified by:
getDownloadURL in interface com.liferay.document.library.kernel.util.DL

getEmailDefinitionTerms

public Map<String,String> getEmailDefinitionTerms(PortletRequest portletRequest,
                                                  String emailFromAddress,
                                                  String emailFromName)
Specified by:
getEmailDefinitionTerms in interface com.liferay.document.library.kernel.util.DL

getEmailFromDefinitionTerms

public Map<String,String> getEmailFromDefinitionTerms(PortletRequest portletRequest,
                                                      String emailFromAddress,
                                                      String emailFromName)
Specified by:
getEmailFromDefinitionTerms in interface com.liferay.document.library.kernel.util.DL

getFileEntries

public List<com.liferay.portal.kernel.repository.model.FileEntry> getFileEntries(com.liferay.portal.kernel.search.Hits hits)
Specified by:
getFileEntries in interface com.liferay.document.library.kernel.util.DL

getFileEntryImage

public String getFileEntryImage(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                                com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
Specified by:
getFileEntryImage in interface com.liferay.document.library.kernel.util.DL

getFileEntryTypeSubscriptionClassPKs

public Set<Long> getFileEntryTypeSubscriptionClassPKs(long userId)
Specified by:
getFileEntryTypeSubscriptionClassPKs in interface com.liferay.document.library.kernel.util.DL

getFileIcon

public String getFileIcon(String extension)
Specified by:
getFileIcon in interface com.liferay.document.library.kernel.util.DL

getFileIconCssClass

public String getFileIconCssClass(String extension)
Specified by:
getFileIconCssClass in interface com.liferay.document.library.kernel.util.DL

getGenericName

public String getGenericName(String extension)
Specified by:
getGenericName in interface com.liferay.document.library.kernel.util.DL

getImagePreviewURL

public String getImagePreviewURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                                 com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
                                 com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
                          throws Exception
Specified by:
getImagePreviewURL in interface com.liferay.document.library.kernel.util.DL
Throws:
Exception

getImagePreviewURL

public String getImagePreviewURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                                 com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
                          throws Exception
Specified by:
getImagePreviewURL in interface com.liferay.document.library.kernel.util.DL
Throws:
Exception

getPreviewURL

public String getPreviewURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                            com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
                            com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay,
                            String queryString)
Specified by:
getPreviewURL in interface com.liferay.document.library.kernel.util.DL

getPreviewURL

public String getPreviewURL(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                            com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
                            com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay,
                            String queryString,
                            boolean appendVersion,
                            boolean absoluteURL)
Specified by:
getPreviewURL in interface com.liferay.document.library.kernel.util.DL

getRepositoryModelOrderByComparator

public <T> com.liferay.portal.kernel.util.OrderByComparator<T> getRepositoryModelOrderByComparator(String orderByCol,
                                                                                                   String orderByType)
Specified by:
getRepositoryModelOrderByComparator in interface com.liferay.document.library.kernel.util.DL

getRepositoryModelOrderByComparator

public <T> com.liferay.portal.kernel.util.OrderByComparator<T> getRepositoryModelOrderByComparator(String orderByCol,
                                                                                                   String orderByType,
                                                                                                   boolean orderByModel)
Specified by:
getRepositoryModelOrderByComparator in interface com.liferay.document.library.kernel.util.DL

getSanitizedFileName

public String getSanitizedFileName(String title,
                                   String extension)
Specified by:
getSanitizedFileName in interface com.liferay.document.library.kernel.util.DL

getTempFileId

public String getTempFileId(long id,
                            String version)
Specified by:
getTempFileId in interface com.liferay.document.library.kernel.util.DL

getTempFileId

public String getTempFileId(long id,
                            String version,
                            String languageId)
Specified by:
getTempFileId in interface com.liferay.document.library.kernel.util.DL

getThumbnailSrc

@Deprecated
public String getThumbnailSrc(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                                         com.liferay.document.library.kernel.model.DLFileShortcut dlFileShortcut,
                                         com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
                       throws Exception
Deprecated. As of 7.0.0, replaced by getThumbnailSrc(FileEntry, ThemeDisplay)

Specified by:
getThumbnailSrc in interface com.liferay.document.library.kernel.util.DL
Throws:
Exception

getThumbnailSrc

@Deprecated
public String getThumbnailSrc(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                                         com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
                                         com.liferay.document.library.kernel.model.DLFileShortcut dlFileShortcut,
                                         com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
                       throws Exception
Deprecated. As of 7.0.0, replaced by getThumbnailSrc(FileEntry, FileVersion, ThemeDisplay)

Specified by:
getThumbnailSrc in interface com.liferay.document.library.kernel.util.DL
Throws:
Exception

getThumbnailSrc

public String getThumbnailSrc(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                              com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
                              com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
                       throws Exception
Specified by:
getThumbnailSrc in interface com.liferay.document.library.kernel.util.DL
Throws:
Exception

getThumbnailSrc

public String getThumbnailSrc(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                              com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
                       throws Exception
Specified by:
getThumbnailSrc in interface com.liferay.document.library.kernel.util.DL
Throws:
Exception

getThumbnailStyle

public String getThumbnailStyle()
Specified by:
getThumbnailStyle in interface com.liferay.document.library.kernel.util.DL

getThumbnailStyle

public String getThumbnailStyle(boolean max,
                                int margin)
Specified by:
getThumbnailStyle in interface com.liferay.document.library.kernel.util.DL

getThumbnailStyle

public String getThumbnailStyle(boolean max,
                                int margin,
                                int height,
                                int width)
Specified by:
getThumbnailStyle in interface com.liferay.document.library.kernel.util.DL

getTitleWithExtension

public String getTitleWithExtension(com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
Specified by:
getTitleWithExtension in interface com.liferay.document.library.kernel.util.DL

getTitleWithExtension

public String getTitleWithExtension(String title,
                                    String extension)
Specified by:
getTitleWithExtension in interface com.liferay.document.library.kernel.util.DL

getUniqueFileName

public String getUniqueFileName(long groupId,
                                long folderId,
                                String fileName)
Specified by:
getUniqueFileName in interface com.liferay.document.library.kernel.util.DL

getWebDavURL

public String getWebDavURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay,
                           com.liferay.portal.kernel.repository.model.Folder folder,
                           com.liferay.portal.kernel.repository.model.FileEntry fileEntry)
                    throws com.liferay.portal.kernel.exception.PortalException
Specified by:
getWebDavURL in interface com.liferay.document.library.kernel.util.DL
Throws:
com.liferay.portal.kernel.exception.PortalException

getWebDavURL

public String getWebDavURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay,
                           com.liferay.portal.kernel.repository.model.Folder folder,
                           com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                           boolean manualCheckInRequired)
                    throws com.liferay.portal.kernel.exception.PortalException
Specified by:
getWebDavURL in interface com.liferay.document.library.kernel.util.DL
Throws:
com.liferay.portal.kernel.exception.PortalException

getWebDavURL

public String getWebDavURL(com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay,
                           com.liferay.portal.kernel.repository.model.Folder folder,
                           com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                           boolean manualCheckInRequired,
                           boolean openDocumentUrl)
                    throws com.liferay.portal.kernel.exception.PortalException
Specified by:
getWebDavURL in interface com.liferay.document.library.kernel.util.DL
Throws:
com.liferay.portal.kernel.exception.PortalException

hasWorkflowDefinitionLink

public boolean hasWorkflowDefinitionLink(long companyId,
                                         long groupId,
                                         long folderId,
                                         long fileEntryTypeId)
                                  throws Exception
Specified by:
hasWorkflowDefinitionLink in interface com.liferay.document.library.kernel.util.DL
Throws:
Exception

isAutoGeneratedDLFileEntryTypeDDMStructureKey

public boolean isAutoGeneratedDLFileEntryTypeDDMStructureKey(String ddmStructureKey)
Specified by:
isAutoGeneratedDLFileEntryTypeDDMStructureKey in interface com.liferay.document.library.kernel.util.DL

isOfficeExtension

public boolean isOfficeExtension(String extension)
Specified by:
isOfficeExtension in interface com.liferay.document.library.kernel.util.DL

isSubscribedToFileEntryType

public boolean isSubscribedToFileEntryType(long companyId,
                                           long groupId,
                                           long userId,
                                           long fileEntryTypeId)
Specified by:
isSubscribedToFileEntryType in interface com.liferay.document.library.kernel.util.DL

isSubscribedToFolder

public boolean isSubscribedToFolder(long companyId,
                                    long groupId,
                                    long userId,
                                    long folderId)
                             throws com.liferay.portal.kernel.exception.PortalException
Specified by:
isSubscribedToFolder in interface com.liferay.document.library.kernel.util.DL
Throws:
com.liferay.portal.kernel.exception.PortalException

isSubscribedToFolder

public boolean isSubscribedToFolder(long companyId,
                                    long groupId,
                                    long userId,
                                    long folderId,
                                    boolean recursive)
                             throws com.liferay.portal.kernel.exception.PortalException
Specified by:
isSubscribedToFolder in interface com.liferay.document.library.kernel.util.DL
Throws:
com.liferay.portal.kernel.exception.PortalException

isValidVersion

public boolean isValidVersion(String version)
Specified by:
isValidVersion in interface com.liferay.document.library.kernel.util.DL

startWorkflowInstance

public void startWorkflowInstance(long userId,
                                  com.liferay.document.library.kernel.model.DLFileVersion dlFileVersion,
                                  String syncEventType,
                                  com.liferay.portal.kernel.service.ServiceContext serviceContext)
                           throws com.liferay.portal.kernel.exception.PortalException
Specified by:
startWorkflowInstance in interface com.liferay.document.library.kernel.util.DL
Throws:
com.liferay.portal.kernel.exception.PortalException

getEntryURL

protected String getEntryURL(com.liferay.document.library.kernel.model.DLFileVersion dlFileVersion,
                             com.liferay.portal.kernel.service.ServiceContext serviceContext)
                      throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

getImageSrc

protected String getImageSrc(com.liferay.portal.kernel.repository.model.FileEntry fileEntry,
                             com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
                             com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay,
                             String queryString)
                      throws Exception
Throws:
Exception

Liferay 7.0-ce-b8 portal-impl