Liferay 6.0.5

com.liferay.portlet.documentlibrary.service.impl
Class DLFileEntryLocalServiceImpl

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.service.base.DLFileEntryLocalServiceBaseImpl
      extended by com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl
All Implemented Interfaces:
DLFileEntryLocalService

public class DLFileEntryLocalServiceImpl
extends DLFileEntryLocalServiceBaseImpl

For DLFileEntries, the naming convention for some of the variables is not very informative, due to legacy code. Each DLFileEntry has a corresponding name and title. The "name" is a unique identifier for a given file and usually follows the format "1234" whereas the "title" is the actual name specified by the user (e.g., "Budget.xls").


Field Summary
 
Fields inherited from class com.liferay.portlet.documentlibrary.service.base.DLFileEntryLocalServiceBaseImpl
assetCategoryFinder, assetCategoryLocalService, assetCategoryPersistence, assetCategoryService, assetEntryFinder, assetEntryLocalService, assetEntryPersistence, assetEntryService, assetTagFinder, assetTagLocalService, assetTagPersistence, assetTagService, counterLocalService, dlFileEntryFinder, dlFileEntryLocalService, dlFileEntryPersistence, dlFileEntryService, dlFileRankLocalService, dlFileRankPersistence, dlFileShortcutLocalService, dlFileShortcutPersistence, dlFileShortcutService, dlFileVersionLocalService, dlFileVersionPersistence, dlFileVersionService, dlFolderFinder, dlFolderLocalService, dlFolderPersistence, dlFolderService, dlLocalService, dlService, expandoValueLocalService, expandoValuePersistence, expandoValueService, lockLocalService, lockPersistence, mbDiscussionLocalService, mbDiscussionPersistence, mbMessageFinder, mbMessageLocalService, mbMessagePersistence, mbMessageService, ratingsEntryFinder, ratingsEntryLocalService, ratingsEntryPersistence, ratingsEntryService, ratingsStatsFinder, ratingsStatsLocalService, ratingsStatsPersistence, resourceFinder, resourceLocalService, resourcePersistence, resourceService, socialActivityFinder, socialActivityLocalService, socialActivityPersistence, userFinder, userLocalService, userPersistence, userService, webDAVPropsLocalService, webDAVPropsPersistence, workflowInstanceLinkLocalService, workflowInstanceLinkPersistence
 
Constructor Summary
DLFileEntryLocalServiceImpl()
           
 
Method Summary
 DLFileEntry addFileEntry(long userId, long groupId, long folderId, String name, String title, String description, String changeLog, String extraSettings, byte[] bytes, ServiceContext serviceContext)
           
 DLFileEntry addFileEntry(long userId, long groupId, long folderId, String name, String title, String description, String changeLog, String extraSettings, File file, ServiceContext serviceContext)
           
 DLFileEntry addFileEntry(long userId, long groupId, long folderId, String name, String title, String description, String changeLog, String extraSettings, InputStream is, long size, ServiceContext serviceContext)
           
 void addFileEntryResources(DLFileEntry fileEntry, boolean addCommunityPermissions, boolean addGuestPermissions)
           
 void addFileEntryResources(DLFileEntry fileEntry, String[] communityPermissions, String[] guestPermissions)
           
 void addFileEntryResources(long fileEntryId, boolean addCommunityPermissions, boolean addGuestPermissions)
           
 void addFileEntryResources(long fileEntryId, String[] communityPermissions, String[] guestPermissions)
           
protected  DLFileVersion addFileVersion(User user, DLFileEntry fileEntry, Date modifiedDate, String extension, String title, String description, String changeLog, String extraSettings, String version, long size, int status, ServiceContext serviceContext)
           
 DLFileEntry addOrOverwriteFileEntry(long userId, long groupId, long folderId, String name, String sourceName, String title, String description, String changeLog, String extraSettings, File file, ServiceContext serviceContext)
           
 void deleteFileEntries(long groupId, long folderId)
           
 void deleteFileEntry(DLFileEntry fileEntry)
           
 void deleteFileEntry(long groupId, long folderId, String name)
           
 void deleteFileEntry(long groupId, long folderId, String name, String version)
           
 List<DLFileEntry> getCompanyFileEntries(long companyId, int start, int end)
           
 List<DLFileEntry> getCompanyFileEntries(long companyId, int start, int end, OrderByComparator obc)
           
 int getCompanyFileEntriesCount(long companyId)
           
 InputStream getFileAsStream(long companyId, long userId, long groupId, long folderId, String name)
           
 InputStream getFileAsStream(long companyId, long userId, long groupId, long folderId, String name, String version)
           
 List<DLFileEntry> getFileEntries(long groupId, long folderId)
           
 List<DLFileEntry> getFileEntries(long groupId, long folderId, int start, int end)
           
 List<DLFileEntry> getFileEntries(long groupId, long folderId, int start, int end, OrderByComparator obc)
           
 int getFileEntriesCount(long groupId, long folderId)
           
 DLFileEntry getFileEntry(long fileEntryId)
           
 DLFileEntry getFileEntry(long groupId, long folderId, String name)
           
 DLFileEntry getFileEntryByTitle(long groupId, long folderId, String title)
           
 DLFileEntry getFileEntryByUuidAndGroupId(String uuid, long groupId)
           
protected  long getFolderId(long companyId, long folderId)
           
 int getFoldersFileEntriesCount(long groupId, List<Long> folderIds, int status)
           
 List<DLFileEntry> getGroupFileEntries(long groupId, int start, int end)
           
 List<DLFileEntry> getGroupFileEntries(long groupId, int start, int end, OrderByComparator obc)
           
 List<DLFileEntry> getGroupFileEntries(long groupId, long userId, int start, int end)
           
 List<DLFileEntry> getGroupFileEntries(long groupId, long userId, int start, int end, OrderByComparator obc)
           
 int getGroupFileEntriesCount(long groupId)
           
 int getGroupFileEntriesCount(long groupId, long userId)
           
protected  String getNextVersion(DLFileEntry fileEntry, boolean majorVersion, int workflowAction)
           
 List<DLFileEntry> getNoAssetFileEntries()
           
 DLFileEntry moveFileEntry(long userId, long groupId, long folderId, long newFolderId, String name, ServiceContext serviceContext)
           
 void updateAsset(long userId, DLFileEntry fileEntry, DLFileVersion fileVersion, long[] assetCategoryIds, String[] assetTagNames)
           
 DLFileEntry updateFileEntry(long userId, long groupId, long folderId, String name, String sourceFileName, String title, String description, String changeLog, boolean majorVersion, String extraSettings, byte[] bytes, ServiceContext serviceContext)
           
 DLFileEntry updateFileEntry(long userId, long groupId, long folderId, String name, String sourceFileName, String title, String description, String changeLog, boolean majorVersion, String extraSettings, File file, ServiceContext serviceContext)
           
 DLFileEntry updateFileEntry(long userId, long groupId, long folderId, String name, String sourceFileName, String title, String description, String changeLog, boolean majorVersion, String extraSettings, InputStream is, long size, ServiceContext serviceContext)
           
protected  void updateFileVersion(User user, DLFileVersion fileVersion, String sourceFileName, String extension, String title, String description, String changeLog, String extraSettings, String version, long size, int status, Date statusDate, ServiceContext serviceContext)
           
 DLFileEntry updateStatus(long userId, long fileEntryId, int status, ServiceContext serviceContext)
           
protected  void validate(long groupId, long folderId, String title, InputStream is)
           
protected  void validate(long groupId, long folderId, String name, String title)
           
protected  void validate(long groupId, long folderId, String name, String extension, String title, String sourceFileName, InputStream is)
           
 
Methods inherited from class com.liferay.portlet.documentlibrary.service.base.DLFileEntryLocalServiceBaseImpl
addDLFileEntry, createDLFileEntry, deleteDLFileEntry, deleteDLFileEntry, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, getAssetCategoryFinder, getAssetCategoryLocalService, getAssetCategoryPersistence, getAssetCategoryService, getAssetEntryFinder, getAssetEntryLocalService, getAssetEntryPersistence, getAssetEntryService, getAssetTagFinder, getAssetTagLocalService, getAssetTagPersistence, getAssetTagService, getCounterLocalService, getDLFileEntries, getDLFileEntriesCount, getDLFileEntry, getDLFileEntryByUuidAndGroupId, getDLFileEntryFinder, getDLFileEntryLocalService, getDLFileEntryPersistence, getDLFileEntryService, getDLFileRankLocalService, getDLFileRankPersistence, getDLFileShortcutLocalService, getDLFileShortcutPersistence, getDLFileShortcutService, getDLFileVersionLocalService, getDLFileVersionPersistence, getDLFileVersionService, getDLFolderFinder, getDLFolderLocalService, getDLFolderPersistence, getDLFolderService, getDLLocalService, getDLService, getExpandoValueLocalService, getExpandoValuePersistence, getExpandoValueService, getLockLocalService, getLockPersistence, getMBDiscussionLocalService, getMBDiscussionPersistence, getMBMessageFinder, getMBMessageLocalService, getMBMessagePersistence, getMBMessageService, getRatingsEntryFinder, getRatingsEntryLocalService, getRatingsEntryPersistence, getRatingsEntryService, getRatingsStatsFinder, getRatingsStatsLocalService, getRatingsStatsPersistence, getResourceFinder, getResourceLocalService, getResourcePersistence, getResourceService, getSocialActivityFinder, getSocialActivityLocalService, getSocialActivityPersistence, getUserFinder, getUserLocalService, getUserPersistence, getUserService, getWebDAVPropsLocalService, getWebDAVPropsPersistence, getWorkflowInstanceLinkLocalService, getWorkflowInstanceLinkPersistence, runSQL, setAssetCategoryFinder, setAssetCategoryLocalService, setAssetCategoryPersistence, setAssetCategoryService, setAssetEntryFinder, setAssetEntryLocalService, setAssetEntryPersistence, setAssetEntryService, setAssetTagFinder, setAssetTagLocalService, setAssetTagPersistence, setAssetTagService, setCounterLocalService, setDLFileEntryFinder, setDLFileEntryLocalService, setDLFileEntryPersistence, setDLFileEntryService, setDLFileRankLocalService, setDLFileRankPersistence, setDLFileShortcutLocalService, setDLFileShortcutPersistence, setDLFileShortcutService, setDLFileVersionLocalService, setDLFileVersionPersistence, setDLFileVersionService, setDLFolderFinder, setDLFolderLocalService, setDLFolderPersistence, setDLFolderService, setDLLocalService, setDLService, setExpandoValueLocalService, setExpandoValuePersistence, setExpandoValueService, setLockLocalService, setLockPersistence, setMBDiscussionLocalService, setMBDiscussionPersistence, setMBMessageFinder, setMBMessageLocalService, setMBMessagePersistence, setMBMessageService, setRatingsEntryFinder, setRatingsEntryLocalService, setRatingsEntryPersistence, setRatingsEntryService, setRatingsStatsFinder, setRatingsStatsLocalService, setRatingsStatsPersistence, setResourceFinder, setResourceLocalService, setResourcePersistence, setResourceService, setSocialActivityFinder, setSocialActivityLocalService, setSocialActivityPersistence, setUserFinder, setUserLocalService, setUserPersistence, setUserService, setWebDAVPropsLocalService, setWebDAVPropsPersistence, setWorkflowInstanceLinkLocalService, setWorkflowInstanceLinkPersistence, updateDLFileEntry, updateDLFileEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DLFileEntryLocalServiceImpl

public DLFileEntryLocalServiceImpl()
Method Detail

addFileEntry

public DLFileEntry addFileEntry(long userId,
                                long groupId,
                                long folderId,
                                String name,
                                String title,
                                String description,
                                String changeLog,
                                String extraSettings,
                                byte[] bytes,
                                ServiceContext serviceContext)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

addFileEntry

public DLFileEntry addFileEntry(long userId,
                                long groupId,
                                long folderId,
                                String name,
                                String title,
                                String description,
                                String changeLog,
                                String extraSettings,
                                File file,
                                ServiceContext serviceContext)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

addFileEntry

public DLFileEntry addFileEntry(long userId,
                                long groupId,
                                long folderId,
                                String name,
                                String title,
                                String description,
                                String changeLog,
                                String extraSettings,
                                InputStream is,
                                long size,
                                ServiceContext serviceContext)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

addFileEntryResources

public void addFileEntryResources(DLFileEntry fileEntry,
                                  boolean addCommunityPermissions,
                                  boolean addGuestPermissions)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

addFileEntryResources

public void addFileEntryResources(DLFileEntry fileEntry,
                                  String[] communityPermissions,
                                  String[] guestPermissions)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

addFileEntryResources

public void addFileEntryResources(long fileEntryId,
                                  boolean addCommunityPermissions,
                                  boolean addGuestPermissions)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

addFileEntryResources

public void addFileEntryResources(long fileEntryId,
                                  String[] communityPermissions,
                                  String[] guestPermissions)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

addOrOverwriteFileEntry

public DLFileEntry addOrOverwriteFileEntry(long userId,
                                           long groupId,
                                           long folderId,
                                           String name,
                                           String sourceName,
                                           String title,
                                           String description,
                                           String changeLog,
                                           String extraSettings,
                                           File file,
                                           ServiceContext serviceContext)
                                    throws PortalException,
                                           SystemException
Throws:
PortalException
SystemException

deleteFileEntries

public void deleteFileEntries(long groupId,
                              long folderId)
                       throws PortalException,
                              SystemException
Throws:
PortalException
SystemException

deleteFileEntry

public void deleteFileEntry(DLFileEntry fileEntry)
                     throws PortalException,
                            SystemException
Throws:
PortalException
SystemException

deleteFileEntry

public void deleteFileEntry(long groupId,
                            long folderId,
                            String name)
                     throws PortalException,
                            SystemException
Throws:
PortalException
SystemException

deleteFileEntry

public void deleteFileEntry(long groupId,
                            long folderId,
                            String name,
                            String version)
                     throws PortalException,
                            SystemException
Throws:
PortalException
SystemException

getCompanyFileEntries

public List<DLFileEntry> getCompanyFileEntries(long companyId,
                                               int start,
                                               int end)
                                        throws SystemException
Throws:
SystemException

getCompanyFileEntries

public List<DLFileEntry> getCompanyFileEntries(long companyId,
                                               int start,
                                               int end,
                                               OrderByComparator obc)
                                        throws SystemException
Throws:
SystemException

getCompanyFileEntriesCount

public int getCompanyFileEntriesCount(long companyId)
                               throws SystemException
Throws:
SystemException

getFileAsStream

public InputStream getFileAsStream(long companyId,
                                   long userId,
                                   long groupId,
                                   long folderId,
                                   String name)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getFileAsStream

public InputStream getFileAsStream(long companyId,
                                   long userId,
                                   long groupId,
                                   long folderId,
                                   String name,
                                   String version)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getFileEntries

public List<DLFileEntry> getFileEntries(long groupId,
                                        long folderId)
                                 throws SystemException
Throws:
SystemException

getFileEntries

public List<DLFileEntry> getFileEntries(long groupId,
                                        long folderId,
                                        int start,
                                        int end)
                                 throws SystemException
Throws:
SystemException

getFileEntries

public List<DLFileEntry> getFileEntries(long groupId,
                                        long folderId,
                                        int start,
                                        int end,
                                        OrderByComparator obc)
                                 throws SystemException
Throws:
SystemException

getFileEntriesCount

public int getFileEntriesCount(long groupId,
                               long folderId)
                        throws SystemException
Throws:
SystemException

getFileEntry

public DLFileEntry getFileEntry(long fileEntryId)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

getFileEntry

public DLFileEntry getFileEntry(long groupId,
                                long folderId,
                                String name)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

getFileEntryByTitle

public DLFileEntry getFileEntryByTitle(long groupId,
                                       long folderId,
                                       String title)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

getFileEntryByUuidAndGroupId

public DLFileEntry getFileEntryByUuidAndGroupId(String uuid,
                                                long groupId)
                                         throws PortalException,
                                                SystemException
Throws:
PortalException
SystemException

getFoldersFileEntriesCount

public int getFoldersFileEntriesCount(long groupId,
                                      List<Long> folderIds,
                                      int status)
                               throws SystemException
Throws:
SystemException

getGroupFileEntries

public List<DLFileEntry> getGroupFileEntries(long groupId,
                                             int start,
                                             int end)
                                      throws SystemException
Throws:
SystemException

getGroupFileEntries

public List<DLFileEntry> getGroupFileEntries(long groupId,
                                             int start,
                                             int end,
                                             OrderByComparator obc)
                                      throws SystemException
Throws:
SystemException

getGroupFileEntries

public List<DLFileEntry> getGroupFileEntries(long groupId,
                                             long userId,
                                             int start,
                                             int end)
                                      throws SystemException
Throws:
SystemException

getGroupFileEntries

public List<DLFileEntry> getGroupFileEntries(long groupId,
                                             long userId,
                                             int start,
                                             int end,
                                             OrderByComparator obc)
                                      throws SystemException
Throws:
SystemException

getGroupFileEntriesCount

public int getGroupFileEntriesCount(long groupId)
                             throws SystemException
Throws:
SystemException

getGroupFileEntriesCount

public int getGroupFileEntriesCount(long groupId,
                                    long userId)
                             throws SystemException
Throws:
SystemException

getNoAssetFileEntries

public List<DLFileEntry> getNoAssetFileEntries()
                                        throws SystemException
Throws:
SystemException

moveFileEntry

public DLFileEntry moveFileEntry(long userId,
                                 long groupId,
                                 long folderId,
                                 long newFolderId,
                                 String name,
                                 ServiceContext serviceContext)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

updateAsset

public void updateAsset(long userId,
                        DLFileEntry fileEntry,
                        DLFileVersion fileVersion,
                        long[] assetCategoryIds,
                        String[] assetTagNames)
                 throws PortalException,
                        SystemException
Throws:
PortalException
SystemException

updateFileEntry

public DLFileEntry updateFileEntry(long userId,
                                   long groupId,
                                   long folderId,
                                   String name,
                                   String sourceFileName,
                                   String title,
                                   String description,
                                   String changeLog,
                                   boolean majorVersion,
                                   String extraSettings,
                                   byte[] bytes,
                                   ServiceContext serviceContext)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

updateFileEntry

public DLFileEntry updateFileEntry(long userId,
                                   long groupId,
                                   long folderId,
                                   String name,
                                   String sourceFileName,
                                   String title,
                                   String description,
                                   String changeLog,
                                   boolean majorVersion,
                                   String extraSettings,
                                   File file,
                                   ServiceContext serviceContext)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

updateFileEntry

public DLFileEntry updateFileEntry(long userId,
                                   long groupId,
                                   long folderId,
                                   String name,
                                   String sourceFileName,
                                   String title,
                                   String description,
                                   String changeLog,
                                   boolean majorVersion,
                                   String extraSettings,
                                   InputStream is,
                                   long size,
                                   ServiceContext serviceContext)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

updateStatus

public DLFileEntry updateStatus(long userId,
                                long fileEntryId,
                                int status,
                                ServiceContext serviceContext)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

addFileVersion

protected DLFileVersion addFileVersion(User user,
                                       DLFileEntry fileEntry,
                                       Date modifiedDate,
                                       String extension,
                                       String title,
                                       String description,
                                       String changeLog,
                                       String extraSettings,
                                       String version,
                                       long size,
                                       int status,
                                       ServiceContext serviceContext)
                                throws SystemException
Throws:
SystemException

getFolderId

protected long getFolderId(long companyId,
                           long folderId)
                    throws SystemException
Throws:
SystemException

getNextVersion

protected String getNextVersion(DLFileEntry fileEntry,
                                boolean majorVersion,
                                int workflowAction)

updateFileVersion

protected void updateFileVersion(User user,
                                 DLFileVersion fileVersion,
                                 String sourceFileName,
                                 String extension,
                                 String title,
                                 String description,
                                 String changeLog,
                                 String extraSettings,
                                 String version,
                                 long size,
                                 int status,
                                 Date statusDate,
                                 ServiceContext serviceContext)
                          throws SystemException
Throws:
SystemException

validate

protected void validate(long groupId,
                        long folderId,
                        String title,
                        InputStream is)
                 throws PortalException,
                        SystemException
Throws:
PortalException
SystemException

validate

protected void validate(long groupId,
                        long folderId,
                        String name,
                        String title)
                 throws PortalException,
                        SystemException
Throws:
PortalException
SystemException

validate

protected void validate(long groupId,
                        long folderId,
                        String name,
                        String extension,
                        String title,
                        String sourceFileName,
                        InputStream is)
                 throws PortalException,
                        SystemException
Throws:
PortalException
SystemException

Liferay 6.0.5