Class DLFileEntryServiceImpl

Object
com.liferay.portal.kernel.service.BaseServiceImpl
com.liferay.portlet.documentlibrary.service.base.DLFileEntryServiceBaseImpl
com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl
All Implemented Interfaces:
com.liferay.document.library.kernel.service.DLFileEntryService, com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService, com.liferay.portal.kernel.service.BaseService

public class DLFileEntryServiceImpl extends DLFileEntryServiceBaseImpl
Provides the remote service for accessing, adding, checking in/out, deleting, locking/unlocking, moving, reverting, updating, and verifying document library file entries. Its methods include permission checks.
Author:
Brian Wing Shun Chan, Alexander Chow
  • Constructor Details

    • DLFileEntryServiceImpl

      public DLFileEntryServiceImpl()
  • Method Details

    • addFileEntry

      public com.liferay.document.library.kernel.model.DLFileEntry addFileEntry(String externalReferenceCode, long groupId, long repositoryId, long folderId, String sourceFileName, String mimeType, String title, String urlTitle, String description, String changeLog, long fileEntryTypeId, Map<String,com.liferay.dynamic.data.mapping.kernel.DDMFormValues> ddmFormValuesMap, File file, InputStream inputStream, long size, Date displayDate, Date expirationDate, Date reviewDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • cancelCheckOut

      public com.liferay.document.library.kernel.model.DLFileVersion cancelCheckOut(long fileEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkInFileEntry

      public void checkInFileEntry(long fileEntryId, com.liferay.document.library.kernel.model.DLVersionNumberIncrease dlVersionNumberIncrease, String changeLog, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkInFileEntry

      public void checkInFileEntry(long fileEntryId, String lockUuid, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkOutFileEntry

      public com.liferay.document.library.kernel.model.DLFileEntry checkOutFileEntry(long fileEntryId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • checkOutFileEntry

      public com.liferay.document.library.kernel.model.DLFileEntry checkOutFileEntry(long fileEntryId, String owner, long expirationTime, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • copyFileEntry

      public com.liferay.document.library.kernel.model.DLFileEntry copyFileEntry(long groupId, long repositoryId, long sourceFileEntryId, long targetFolderId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteFileEntry

      public void deleteFileEntry(long fileEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteFileEntry

      public void deleteFileEntry(long groupId, long folderId, String title) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteFileEntryByExternalReferenceCode

      public void deleteFileEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteFileVersion

      public void deleteFileVersion(long fileEntryId, String version) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchFileEntry

      public com.liferay.document.library.kernel.model.DLFileEntry fetchFileEntry(long groupId, long folderId, String title) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchFileEntryByExternalReferenceCode

      public com.liferay.document.library.kernel.model.DLFileEntry fetchFileEntryByExternalReferenceCode(long groupId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchFileEntryByImageId

      public com.liferay.document.library.kernel.model.DLFileEntry fetchFileEntryByImageId(long imageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileAsStream

      public InputStream getFileAsStream(long fileEntryId, String version) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileAsStream

      public InputStream getFileAsStream(long fileEntryId, String version, boolean incrementCounter) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntries

      public List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(long groupId, double score, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntries

      public List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(long groupId, long folderId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntries

      public List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(long groupId, long folderId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntries

      public List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(long groupId, long folderId, long fileEntryTypeId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntries

      public List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(long groupId, long folderId, String[] mimeTypes, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntries

      public List<com.liferay.document.library.kernel.model.DLFileEntry> getFileEntries(long groupId, long folderId, String[] mimeTypes, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntriesCount

      public int getFileEntriesCount(long groupId, double score) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntriesCount

      public int getFileEntriesCount(long groupId, long folderId)
    • getFileEntriesCount

      public int getFileEntriesCount(long groupId, long folderId, int status)
    • getFileEntriesCount

      public int getFileEntriesCount(long groupId, long folderId, long fileEntryTypeId)
    • getFileEntriesCount

      public int getFileEntriesCount(long groupId, long folderId, String[] mimeTypes)
    • getFileEntriesCount

      public int getFileEntriesCount(long groupId, long folderId, String[] mimeTypes, int status)
    • getFileEntry

      public com.liferay.document.library.kernel.model.DLFileEntry getFileEntry(long fileEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntry

      public com.liferay.document.library.kernel.model.DLFileEntry getFileEntry(long groupId, long folderId, String title) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntryByExternalReferenceCode

      public com.liferay.document.library.kernel.model.DLFileEntry getFileEntryByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntryByFileName

      public com.liferay.document.library.kernel.model.DLFileEntry getFileEntryByFileName(long groupId, long folderId, String fileName) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntryByUuidAndGroupId

      public com.liferay.document.library.kernel.model.DLFileEntry getFileEntryByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFileEntryLock

      public com.liferay.portal.kernel.lock.Lock getFileEntryLock(long fileEntryId)
    • getFoldersFileEntriesCount

      public int getFoldersFileEntriesCount(long groupId, List<Long> folderIds, int status)
    • getGroupFileEntries

      public List<com.liferay.document.library.kernel.model.DLFileEntry> getGroupFileEntries(long groupId, long userId, long rootFolderId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getGroupFileEntries

      public List<com.liferay.document.library.kernel.model.DLFileEntry> getGroupFileEntries(long groupId, long userId, long repositoryId, long rootFolderId, String[] mimeTypes, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getGroupFileEntries

      public List<com.liferay.document.library.kernel.model.DLFileEntry> getGroupFileEntries(long groupId, long userId, long rootFolderId, String[] mimeTypes, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.document.library.kernel.model.DLFileEntry> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getGroupFileEntriesCount

      public int getGroupFileEntriesCount(long groupId, long userId, long rootFolderId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getGroupFileEntriesCount

      public int getGroupFileEntriesCount(long groupId, long userId, long repositoryId, long rootFolderId, String[] mimeTypes, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getGroupFileEntriesCount

      public int getGroupFileEntriesCount(long groupId, long userId, long rootFolderId, String[] mimeTypes, int status) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasFileEntryLock

      public boolean hasFileEntryLock(long fileEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • isFileEntryCheckedOut

      public boolean isFileEntryCheckedOut(long fileEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • moveFileEntry

      public com.liferay.document.library.kernel.model.DLFileEntry moveFileEntry(long fileEntryId, long newFolderId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • refreshFileEntryLock

      public com.liferay.portal.kernel.lock.Lock refreshFileEntryLock(String lockUuid, long companyId, long expirationTime) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • revertFileEntry

      public void revertFileEntry(long fileEntryId, String version, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • search

      public com.liferay.portal.kernel.search.Hits search(long groupId, long creatorUserId, int status, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • search

      public com.liferay.portal.kernel.search.Hits search(long groupId, long creatorUserId, long folderId, String[] mimeTypes, int status, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateFileEntry

      public com.liferay.document.library.kernel.model.DLFileEntry updateFileEntry(long fileEntryId, String sourceFileName, String mimeType, String title, String urlTitle, String description, String changeLog, com.liferay.document.library.kernel.model.DLVersionNumberIncrease dlVersionNumberIncrease, long fileEntryTypeId, Map<String,com.liferay.dynamic.data.mapping.kernel.DDMFormValues> ddmFormValuesMap, File file, InputStream inputStream, long size, Date displayDate, Date expirationDate, Date reviewDate, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateStatus

      public com.liferay.document.library.kernel.model.DLFileEntry updateStatus(long userId, long fileVersionId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext, Map<String,Serializable> workflowContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • verifyFileEntryCheckOut

      public boolean verifyFileEntryCheckOut(long fileEntryId, String lockUuid) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • verifyFileEntryLock

      public boolean verifyFileEntryLock(long fileEntryId, String lockUuid) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException