001
014
015 package com.liferay.portlet.documentlibrary.service;
016
017 import com.liferay.portal.kernel.annotation.Isolation;
018 import com.liferay.portal.kernel.annotation.Propagation;
019 import com.liferay.portal.kernel.annotation.Transactional;
020 import com.liferay.portal.kernel.exception.PortalException;
021 import com.liferay.portal.kernel.exception.SystemException;
022
023
040 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
041 PortalException.class, SystemException.class})
042 public interface DLFileEntryService {
043 public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
044 long groupId, long folderId, java.lang.String name,
045 java.lang.String title, java.lang.String description,
046 java.lang.String changeLog, java.lang.String extraSettings,
047 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
048 throws com.liferay.portal.kernel.exception.PortalException,
049 com.liferay.portal.kernel.exception.SystemException;
050
051 public com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
052 long groupId, long folderId, java.lang.String name,
053 java.lang.String title, java.lang.String description,
054 java.lang.String changeLog, java.lang.String extraSettings,
055 java.io.File file,
056 com.liferay.portal.service.ServiceContext serviceContext)
057 throws com.liferay.portal.kernel.exception.PortalException,
058 com.liferay.portal.kernel.exception.SystemException;
059
060 public void deleteFileEntry(long groupId, long folderId,
061 java.lang.String name)
062 throws com.liferay.portal.kernel.exception.PortalException,
063 com.liferay.portal.kernel.exception.SystemException;
064
065 public void deleteFileEntry(long groupId, long folderId,
066 java.lang.String name, java.lang.String version)
067 throws com.liferay.portal.kernel.exception.PortalException,
068 com.liferay.portal.kernel.exception.SystemException;
069
070 public void deleteFileEntryByTitle(long groupId, long folderId,
071 java.lang.String titleWithExtension)
072 throws com.liferay.portal.kernel.exception.PortalException,
073 com.liferay.portal.kernel.exception.SystemException;
074
075 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
076 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
077 long groupId, long folderId)
078 throws com.liferay.portal.kernel.exception.PortalException,
079 com.liferay.portal.kernel.exception.SystemException;
080
081 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
082 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
083 long groupId, long folderId, int start, int end)
084 throws com.liferay.portal.kernel.exception.PortalException,
085 com.liferay.portal.kernel.exception.SystemException;
086
087 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
088 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
089 long groupId, long folderId, int start, int end,
090 com.liferay.portal.kernel.util.OrderByComparator obc)
091 throws com.liferay.portal.kernel.exception.PortalException,
092 com.liferay.portal.kernel.exception.SystemException;
093
094 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
095 public int getFileEntriesCount(long groupId, long folderId)
096 throws com.liferay.portal.kernel.exception.PortalException,
097 com.liferay.portal.kernel.exception.SystemException;
098
099 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
100 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
101 long groupId, long folderId, java.lang.String name)
102 throws com.liferay.portal.kernel.exception.PortalException,
103 com.liferay.portal.kernel.exception.SystemException;
104
105 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
106 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
107 long groupId, long folderId, java.lang.String titleWithExtension)
108 throws com.liferay.portal.kernel.exception.PortalException,
109 com.liferay.portal.kernel.exception.SystemException;
110
111 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112 public com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
113 java.lang.String uuid, long groupId)
114 throws com.liferay.portal.kernel.exception.PortalException,
115 com.liferay.portal.kernel.exception.SystemException;
116
117 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118 public int getFoldersFileEntriesCount(long groupId,
119 java.util.List<java.lang.Long> folderIds, int status)
120 throws com.liferay.portal.kernel.exception.SystemException;
121
122 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
124 long groupId, long userId, int start, int end)
125 throws com.liferay.portal.kernel.exception.SystemException;
126
127 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128 public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
129 long groupId, long userId, int start, int end,
130 com.liferay.portal.kernel.util.OrderByComparator obc)
131 throws com.liferay.portal.kernel.exception.SystemException;
132
133 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134 public int getGroupFileEntriesCount(long groupId, long userId)
135 throws com.liferay.portal.kernel.exception.SystemException;
136
137 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138 public com.liferay.portal.model.Lock getFileEntryLock(long groupId,
139 long folderId, java.lang.String name)
140 throws com.liferay.portal.kernel.exception.PortalException,
141 com.liferay.portal.kernel.exception.SystemException;
142
143 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144 public boolean hasFileEntryLock(long groupId, long folderId,
145 java.lang.String name)
146 throws com.liferay.portal.kernel.exception.PortalException,
147 com.liferay.portal.kernel.exception.SystemException;
148
149 public com.liferay.portal.model.Lock lockFileEntry(long groupId,
150 long folderId, java.lang.String name)
151 throws com.liferay.portal.kernel.exception.PortalException,
152 com.liferay.portal.kernel.exception.SystemException;
153
154 public com.liferay.portal.model.Lock lockFileEntry(long groupId,
155 long folderId, java.lang.String name, java.lang.String owner,
156 long expirationTime)
157 throws com.liferay.portal.kernel.exception.PortalException,
158 com.liferay.portal.kernel.exception.SystemException;
159
160 public com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
161 long groupId, long folderId, long newFolderId, java.lang.String name,
162 com.liferay.portal.service.ServiceContext serviceContext)
163 throws com.liferay.portal.kernel.exception.PortalException,
164 com.liferay.portal.kernel.exception.SystemException;
165
166 public com.liferay.portal.model.Lock refreshFileEntryLock(
167 java.lang.String lockUuid, long expirationTime)
168 throws com.liferay.portal.kernel.exception.PortalException,
169 com.liferay.portal.kernel.exception.SystemException;
170
171 public void unlockFileEntry(long groupId, long folderId,
172 java.lang.String name)
173 throws com.liferay.portal.kernel.exception.SystemException;
174
175 public void unlockFileEntry(long groupId, long folderId,
176 java.lang.String name, java.lang.String lockUuid)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException;
179
180 public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
181 long groupId, long folderId, java.lang.String name,
182 java.lang.String sourceFileName, java.lang.String title,
183 java.lang.String description, java.lang.String changeLog,
184 boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
185 com.liferay.portal.service.ServiceContext serviceContext)
186 throws com.liferay.portal.kernel.exception.PortalException,
187 com.liferay.portal.kernel.exception.SystemException;
188
189 public com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
190 long groupId, long folderId, java.lang.String name,
191 java.lang.String sourceFileName, java.lang.String title,
192 java.lang.String description, java.lang.String changeLog,
193 boolean majorVersion, java.lang.String extraSettings,
194 java.io.File file,
195 com.liferay.portal.service.ServiceContext serviceContext)
196 throws com.liferay.portal.kernel.exception.PortalException,
197 com.liferay.portal.kernel.exception.SystemException;
198
199 public boolean verifyFileEntryLock(long groupId, long folderId,
200 java.lang.String name, java.lang.String lockUuid)
201 throws com.liferay.portal.kernel.exception.PortalException,
202 com.liferay.portal.kernel.exception.SystemException;
203 }