001
014
015 package com.liferay.portlet.documentlibrary.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class DLFileEntryServiceUtil {
033 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
034 long groupId, long folderId, java.lang.String name,
035 java.lang.String title, java.lang.String description,
036 java.lang.String changeLog, java.lang.String extraSettings,
037 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
038 throws com.liferay.portal.kernel.exception.PortalException,
039 com.liferay.portal.kernel.exception.SystemException {
040 return getService()
041 .addFileEntry(groupId, folderId, name, title, description,
042 changeLog, extraSettings, bytes, serviceContext);
043 }
044
045 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
046 long groupId, long folderId, java.lang.String name,
047 java.lang.String title, java.lang.String description,
048 java.lang.String changeLog, java.lang.String extraSettings,
049 java.io.File file,
050 com.liferay.portal.service.ServiceContext serviceContext)
051 throws com.liferay.portal.kernel.exception.PortalException,
052 com.liferay.portal.kernel.exception.SystemException {
053 return getService()
054 .addFileEntry(groupId, folderId, name, title, description,
055 changeLog, extraSettings, file, serviceContext);
056 }
057
058 public static void deleteFileEntry(long groupId, long folderId,
059 java.lang.String name)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 getService().deleteFileEntry(groupId, folderId, name);
063 }
064
065 public static 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 getService().deleteFileEntry(groupId, folderId, name, version);
070 }
071
072 public static void deleteFileEntryByTitle(long groupId, long folderId,
073 java.lang.String titleWithExtension)
074 throws com.liferay.portal.kernel.exception.PortalException,
075 com.liferay.portal.kernel.exception.SystemException {
076 getService()
077 .deleteFileEntryByTitle(groupId, folderId, titleWithExtension);
078 }
079
080 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
081 long groupId, long folderId)
082 throws com.liferay.portal.kernel.exception.PortalException,
083 com.liferay.portal.kernel.exception.SystemException {
084 return getService().getFileEntries(groupId, folderId);
085 }
086
087 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
088 long groupId, long folderId, int start, int end)
089 throws com.liferay.portal.kernel.exception.PortalException,
090 com.liferay.portal.kernel.exception.SystemException {
091 return getService().getFileEntries(groupId, folderId, start, end);
092 }
093
094 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
095 long groupId, long folderId, int start, int end,
096 com.liferay.portal.kernel.util.OrderByComparator obc)
097 throws com.liferay.portal.kernel.exception.PortalException,
098 com.liferay.portal.kernel.exception.SystemException {
099 return getService().getFileEntries(groupId, folderId, start, end, obc);
100 }
101
102 public static int getFileEntriesCount(long groupId, long folderId)
103 throws com.liferay.portal.kernel.exception.PortalException,
104 com.liferay.portal.kernel.exception.SystemException {
105 return getService().getFileEntriesCount(groupId, folderId);
106 }
107
108 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
109 long groupId, long folderId, java.lang.String name)
110 throws com.liferay.portal.kernel.exception.PortalException,
111 com.liferay.portal.kernel.exception.SystemException {
112 return getService().getFileEntry(groupId, folderId, name);
113 }
114
115 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
116 long groupId, long folderId, java.lang.String titleWithExtension)
117 throws com.liferay.portal.kernel.exception.PortalException,
118 com.liferay.portal.kernel.exception.SystemException {
119 return getService()
120 .getFileEntryByTitle(groupId, folderId, titleWithExtension);
121 }
122
123 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByUuidAndGroupId(
124 java.lang.String uuid, long groupId)
125 throws com.liferay.portal.kernel.exception.PortalException,
126 com.liferay.portal.kernel.exception.SystemException {
127 return getService().getFileEntryByUuidAndGroupId(uuid, groupId);
128 }
129
130 public static int getFoldersFileEntriesCount(long groupId,
131 java.util.List<java.lang.Long> folderIds, int status)
132 throws com.liferay.portal.kernel.exception.SystemException {
133 return getService()
134 .getFoldersFileEntriesCount(groupId, folderIds, status);
135 }
136
137 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
138 long groupId, long userId, int start, int end)
139 throws com.liferay.portal.kernel.exception.SystemException {
140 return getService().getGroupFileEntries(groupId, userId, start, end);
141 }
142
143 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getGroupFileEntries(
144 long groupId, long userId, int start, int end,
145 com.liferay.portal.kernel.util.OrderByComparator obc)
146 throws com.liferay.portal.kernel.exception.SystemException {
147 return getService().getGroupFileEntries(groupId, userId, start, end, obc);
148 }
149
150 public static int getGroupFileEntriesCount(long groupId, long userId)
151 throws com.liferay.portal.kernel.exception.SystemException {
152 return getService().getGroupFileEntriesCount(groupId, userId);
153 }
154
155 public static boolean hasFileEntryLock(long groupId, long folderId,
156 java.lang.String name)
157 throws com.liferay.portal.kernel.exception.PortalException,
158 com.liferay.portal.kernel.exception.SystemException {
159 return getService().hasFileEntryLock(groupId, folderId, name);
160 }
161
162 public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
163 long folderId, java.lang.String name)
164 throws com.liferay.portal.kernel.exception.PortalException,
165 com.liferay.portal.kernel.exception.SystemException {
166 return getService().lockFileEntry(groupId, folderId, name);
167 }
168
169 public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
170 long folderId, java.lang.String name, java.lang.String owner,
171 long expirationTime)
172 throws com.liferay.portal.kernel.exception.PortalException,
173 com.liferay.portal.kernel.exception.SystemException {
174 return getService()
175 .lockFileEntry(groupId, folderId, name, owner, expirationTime);
176 }
177
178 public static com.liferay.portlet.documentlibrary.model.DLFileEntry moveFileEntry(
179 long groupId, long folderId, long newFolderId, java.lang.String name,
180 com.liferay.portal.service.ServiceContext serviceContext)
181 throws com.liferay.portal.kernel.exception.PortalException,
182 com.liferay.portal.kernel.exception.SystemException {
183 return getService()
184 .moveFileEntry(groupId, folderId, newFolderId, name,
185 serviceContext);
186 }
187
188 public static com.liferay.portal.model.Lock refreshFileEntryLock(
189 java.lang.String lockUuid, long expirationTime)
190 throws com.liferay.portal.kernel.exception.PortalException,
191 com.liferay.portal.kernel.exception.SystemException {
192 return getService().refreshFileEntryLock(lockUuid, expirationTime);
193 }
194
195 public static void unlockFileEntry(long groupId, long folderId,
196 java.lang.String name)
197 throws com.liferay.portal.kernel.exception.SystemException {
198 getService().unlockFileEntry(groupId, folderId, name);
199 }
200
201 public static void unlockFileEntry(long groupId, long folderId,
202 java.lang.String name, java.lang.String lockUuid)
203 throws com.liferay.portal.kernel.exception.PortalException,
204 com.liferay.portal.kernel.exception.SystemException {
205 getService().unlockFileEntry(groupId, folderId, name, lockUuid);
206 }
207
208 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
209 long groupId, long folderId, java.lang.String name,
210 java.lang.String sourceFileName, java.lang.String title,
211 java.lang.String description, java.lang.String changeLog,
212 boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
213 com.liferay.portal.service.ServiceContext serviceContext)
214 throws com.liferay.portal.kernel.exception.PortalException,
215 com.liferay.portal.kernel.exception.SystemException {
216 return getService()
217 .updateFileEntry(groupId, folderId, name, sourceFileName,
218 title, description, changeLog, majorVersion, extraSettings, bytes,
219 serviceContext);
220 }
221
222 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
223 long groupId, long folderId, java.lang.String name,
224 java.lang.String sourceFileName, java.lang.String title,
225 java.lang.String description, java.lang.String changeLog,
226 boolean majorVersion, java.lang.String extraSettings,
227 java.io.File file,
228 com.liferay.portal.service.ServiceContext serviceContext)
229 throws com.liferay.portal.kernel.exception.PortalException,
230 com.liferay.portal.kernel.exception.SystemException {
231 return getService()
232 .updateFileEntry(groupId, folderId, name, sourceFileName,
233 title, description, changeLog, majorVersion, extraSettings, file,
234 serviceContext);
235 }
236
237 public static boolean verifyFileEntryLock(long groupId, long folderId,
238 java.lang.String name, java.lang.String lockUuid)
239 throws com.liferay.portal.kernel.exception.PortalException,
240 com.liferay.portal.kernel.exception.SystemException {
241 return getService()
242 .verifyFileEntryLock(groupId, folderId, name, lockUuid);
243 }
244
245 public static DLFileEntryService getService() {
246 if (_service == null) {
247 _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
248 }
249
250 return _service;
251 }
252
253 public void setService(DLFileEntryService service) {
254 _service = service;
255 }
256
257 private static DLFileEntryService _service;
258 }