001
014
015 package com.liferay.portlet.documentlibrary.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class DLContentLocalServiceUtil {
035
040
041
048 public static com.liferay.portlet.documentlibrary.model.DLContent addDLContent(
049 com.liferay.portlet.documentlibrary.model.DLContent dlContent)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addDLContent(dlContent);
052 }
053
054
060 public static com.liferay.portlet.documentlibrary.model.DLContent createDLContent(
061 long contentId) {
062 return getService().createDLContent(contentId);
063 }
064
065
072 public static void deleteDLContent(long contentId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().deleteDLContent(contentId);
076 }
077
078
084 public static void deleteDLContent(
085 com.liferay.portlet.documentlibrary.model.DLContent dlContent)
086 throws com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteDLContent(dlContent);
088 }
089
090
097 @SuppressWarnings("rawtypes")
098 public static java.util.List dynamicQuery(
099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().dynamicQuery(dynamicQuery);
102 }
103
104
117 @SuppressWarnings("rawtypes")
118 public static java.util.List dynamicQuery(
119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120 int end) throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().dynamicQuery(dynamicQuery, start, end);
122 }
123
124
138 @SuppressWarnings("rawtypes")
139 public static java.util.List dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141 int end,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146 }
147
148
155 public static long dynamicQueryCount(
156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().dynamicQueryCount(dynamicQuery);
159 }
160
161 public static com.liferay.portlet.documentlibrary.model.DLContent fetchDLContent(
162 long contentId)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getService().fetchDLContent(contentId);
165 }
166
167
175 public static com.liferay.portlet.documentlibrary.model.DLContent getDLContent(
176 long contentId)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException {
179 return getService().getDLContent(contentId);
180 }
181
182 public static com.liferay.portal.model.PersistedModel getPersistedModel(
183 java.io.Serializable primaryKeyObj)
184 throws com.liferay.portal.kernel.exception.PortalException,
185 com.liferay.portal.kernel.exception.SystemException {
186 return getService().getPersistedModel(primaryKeyObj);
187 }
188
189
201 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> getDLContents(
202 int start, int end)
203 throws com.liferay.portal.kernel.exception.SystemException {
204 return getService().getDLContents(start, end);
205 }
206
207
213 public static int getDLContentsCount()
214 throws com.liferay.portal.kernel.exception.SystemException {
215 return getService().getDLContentsCount();
216 }
217
218
225 public static com.liferay.portlet.documentlibrary.model.DLContent updateDLContent(
226 com.liferay.portlet.documentlibrary.model.DLContent dlContent)
227 throws com.liferay.portal.kernel.exception.SystemException {
228 return getService().updateDLContent(dlContent);
229 }
230
231
239 public static com.liferay.portlet.documentlibrary.model.DLContent updateDLContent(
240 com.liferay.portlet.documentlibrary.model.DLContent dlContent,
241 boolean merge)
242 throws com.liferay.portal.kernel.exception.SystemException {
243 return getService().updateDLContent(dlContent, merge);
244 }
245
246 public static com.liferay.portlet.documentlibrary.model.DLContentDataBlobModel getDataBlobModel(
247 java.io.Serializable primaryKey)
248 throws com.liferay.portal.kernel.exception.SystemException {
249 return getService().getDataBlobModel(primaryKey);
250 }
251
252
257 public static java.lang.String getBeanIdentifier() {
258 return getService().getBeanIdentifier();
259 }
260
261
266 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
267 getService().setBeanIdentifier(beanIdentifier);
268 }
269
270 public static com.liferay.portlet.documentlibrary.model.DLContent addContent(
271 long companyId, long repositoryId, java.lang.String path,
272 java.lang.String version, byte[] bytes)
273 throws com.liferay.portal.kernel.exception.SystemException {
274 return getService()
275 .addContent(companyId, repositoryId, path, version, bytes);
276 }
277
278 public static com.liferay.portlet.documentlibrary.model.DLContent addContent(
279 long companyId, long repositoryId, java.lang.String path,
280 java.lang.String version, java.io.InputStream inputStream, long size)
281 throws com.liferay.portal.kernel.exception.SystemException {
282 return getService()
283 .addContent(companyId, repositoryId, path, version,
284 inputStream, size);
285 }
286
287 public static void deleteContent(long companyId, long repositoryId,
288 java.lang.String path, java.lang.String version)
289 throws com.liferay.portal.kernel.exception.PortalException,
290 com.liferay.portal.kernel.exception.SystemException {
291 getService().deleteContent(companyId, repositoryId, path, version);
292 }
293
294 public static void deleteContents(long companyId, long repositoryId,
295 java.lang.String path)
296 throws com.liferay.portal.kernel.exception.SystemException {
297 getService().deleteContents(companyId, repositoryId, path);
298 }
299
300 public static void deleteContentsByDirectory(long companyId,
301 long repositoryId, java.lang.String dirName)
302 throws com.liferay.portal.kernel.exception.SystemException {
303 getService().deleteContentsByDirectory(companyId, repositoryId, dirName);
304 }
305
306 public static com.liferay.portlet.documentlibrary.model.DLContent getContent(
307 long companyId, long repositoryId, java.lang.String path)
308 throws com.liferay.portal.kernel.exception.SystemException,
309 com.liferay.portlet.documentlibrary.NoSuchContentException {
310 return getService().getContent(companyId, repositoryId, path);
311 }
312
313 public static com.liferay.portlet.documentlibrary.model.DLContent getContent(
314 long companyId, long repositoryId, java.lang.String path,
315 java.lang.String version)
316 throws com.liferay.portal.kernel.exception.SystemException,
317 com.liferay.portlet.documentlibrary.NoSuchContentException {
318 return getService().getContent(companyId, repositoryId, path, version);
319 }
320
321 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> getContents(
322 long companyId, long repositoryId)
323 throws com.liferay.portal.kernel.exception.SystemException {
324 return getService().getContents(companyId, repositoryId);
325 }
326
327 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> getContents(
328 long companyId, long repositoryId, java.lang.String path)
329 throws com.liferay.portal.kernel.exception.SystemException {
330 return getService().getContents(companyId, repositoryId, path);
331 }
332
333 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> getContentsByDirectory(
334 long companyId, long repositoryId, java.lang.String dirName)
335 throws com.liferay.portal.kernel.exception.SystemException {
336 return getService()
337 .getContentsByDirectory(companyId, repositoryId, dirName);
338 }
339
340 public static boolean hasContent(long companyId, long repositoryId,
341 java.lang.String path, java.lang.String version)
342 throws com.liferay.portal.kernel.exception.SystemException {
343 return getService().hasContent(companyId, repositoryId, path, version);
344 }
345
346 public static void updateDLContent(long companyId, long oldRepositoryId,
347 long newRepositoryId, java.lang.String oldPath, java.lang.String newPath)
348 throws com.liferay.portal.kernel.exception.SystemException {
349 getService()
350 .updateDLContent(companyId, oldRepositoryId, newRepositoryId,
351 oldPath, newPath);
352 }
353
354 public static DLContentLocalService getService() {
355 if (_service == null) {
356 _service = (DLContentLocalService)PortalBeanLocatorUtil.locate(DLContentLocalService.class.getName());
357
358 ReferenceRegistry.registerReference(DLContentLocalServiceUtil.class,
359 "_service");
360 MethodCache.remove(DLContentLocalService.class);
361 }
362
363 return _service;
364 }
365
366 public void setService(DLContentLocalService service) {
367 MethodCache.remove(DLContentLocalService.class);
368
369 _service = service;
370
371 ReferenceRegistry.registerReference(DLContentLocalServiceUtil.class,
372 "_service");
373 MethodCache.remove(DLContentLocalService.class);
374 }
375
376 private static DLContentLocalService _service;
377 }