1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.documentlibrary.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="DLFileEntryServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link DLFileEntryService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       DLFileEntryService
37   * @generated
38   */
39  public class DLFileEntryServiceUtil {
40      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
41          long groupId, long folderId, java.lang.String name,
42          java.lang.String title, java.lang.String description,
43          java.lang.String versionDescription, java.lang.String extraSettings,
44          byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
45          throws com.liferay.portal.kernel.exception.PortalException,
46              com.liferay.portal.kernel.exception.SystemException {
47          return getService()
48                     .addFileEntry(groupId, folderId, name, title, description,
49              versionDescription, extraSettings, bytes, serviceContext);
50      }
51  
52      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
53          long groupId, long folderId, java.lang.String name,
54          java.lang.String title, java.lang.String description,
55          java.lang.String versionDescription, java.lang.String extraSettings,
56          java.io.File file,
57          com.liferay.portal.service.ServiceContext serviceContext)
58          throws com.liferay.portal.kernel.exception.PortalException,
59              com.liferay.portal.kernel.exception.SystemException {
60          return getService()
61                     .addFileEntry(groupId, folderId, name, title, description,
62              versionDescription, extraSettings, file, serviceContext);
63      }
64  
65      public static void deleteFileEntry(long groupId, long folderId,
66          java.lang.String name)
67          throws com.liferay.portal.kernel.exception.PortalException,
68              com.liferay.portal.kernel.exception.SystemException {
69          getService().deleteFileEntry(groupId, folderId, name);
70      }
71  
72      public static void deleteFileEntry(long groupId, long folderId,
73          java.lang.String name, java.lang.String version)
74          throws com.liferay.portal.kernel.exception.PortalException,
75              com.liferay.portal.kernel.exception.SystemException {
76          getService().deleteFileEntry(groupId, folderId, name, version);
77      }
78  
79      public static void deleteFileEntryByTitle(long groupId, long folderId,
80          java.lang.String titleWithExtension)
81          throws com.liferay.portal.kernel.exception.PortalException,
82              com.liferay.portal.kernel.exception.SystemException {
83          getService()
84              .deleteFileEntryByTitle(groupId, folderId, titleWithExtension);
85      }
86  
87      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
88          long groupId, long folderId)
89          throws com.liferay.portal.kernel.exception.PortalException,
90              com.liferay.portal.kernel.exception.SystemException {
91          return getService().getFileEntries(groupId, folderId);
92      }
93  
94      public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
95          long groupId, long folderId, java.lang.String name)
96          throws com.liferay.portal.kernel.exception.PortalException,
97              com.liferay.portal.kernel.exception.SystemException {
98          return getService().getFileEntry(groupId, folderId, name);
99      }
100 
101     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
102         long groupId, long folderId, java.lang.String titleWithExtension)
103         throws com.liferay.portal.kernel.exception.PortalException,
104             com.liferay.portal.kernel.exception.SystemException {
105         return getService()
106                    .getFileEntryByTitle(groupId, folderId, titleWithExtension);
107     }
108 
109     public static boolean hasFileEntryLock(long groupId, long folderId,
110         java.lang.String name)
111         throws com.liferay.portal.kernel.exception.PortalException,
112             com.liferay.portal.kernel.exception.SystemException {
113         return getService().hasFileEntryLock(groupId, folderId, name);
114     }
115 
116     public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
117         long folderId, java.lang.String name)
118         throws com.liferay.portal.kernel.exception.PortalException,
119             com.liferay.portal.kernel.exception.SystemException {
120         return getService().lockFileEntry(groupId, folderId, name);
121     }
122 
123     public static com.liferay.portal.model.Lock lockFileEntry(long groupId,
124         long folderId, java.lang.String name, java.lang.String owner,
125         long expirationTime)
126         throws com.liferay.portal.kernel.exception.PortalException,
127             com.liferay.portal.kernel.exception.SystemException {
128         return getService()
129                    .lockFileEntry(groupId, folderId, name, owner, expirationTime);
130     }
131 
132     public static com.liferay.portal.model.Lock refreshFileEntryLock(
133         java.lang.String lockUuid, long expirationTime)
134         throws com.liferay.portal.kernel.exception.PortalException,
135             com.liferay.portal.kernel.exception.SystemException {
136         return getService().refreshFileEntryLock(lockUuid, expirationTime);
137     }
138 
139     public static void unlockFileEntry(long groupId, long folderId,
140         java.lang.String name)
141         throws com.liferay.portal.kernel.exception.SystemException {
142         getService().unlockFileEntry(groupId, folderId, name);
143     }
144 
145     public static void unlockFileEntry(long groupId, long folderId,
146         java.lang.String name, java.lang.String lockUuid)
147         throws com.liferay.portal.kernel.exception.PortalException,
148             com.liferay.portal.kernel.exception.SystemException {
149         getService().unlockFileEntry(groupId, folderId, name, lockUuid);
150     }
151 
152     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
153         long groupId, long folderId, long newFolderId, java.lang.String name,
154         java.lang.String sourceFileName, java.lang.String title,
155         java.lang.String description, java.lang.String versionDescription,
156         boolean majorVersion, java.lang.String extraSettings, byte[] bytes,
157         com.liferay.portal.service.ServiceContext serviceContext)
158         throws com.liferay.portal.kernel.exception.PortalException,
159             com.liferay.portal.kernel.exception.SystemException {
160         return getService()
161                    .updateFileEntry(groupId, folderId, newFolderId, name,
162             sourceFileName, title, description, versionDescription,
163             majorVersion, extraSettings, bytes, serviceContext);
164     }
165 
166     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
167         long groupId, long folderId, long newFolderId, java.lang.String name,
168         java.lang.String sourceFileName, java.lang.String title,
169         java.lang.String description, java.lang.String versionDescription,
170         boolean majorVersion, java.lang.String extraSettings,
171         java.io.File file,
172         com.liferay.portal.service.ServiceContext serviceContext)
173         throws com.liferay.portal.kernel.exception.PortalException,
174             com.liferay.portal.kernel.exception.SystemException {
175         return getService()
176                    .updateFileEntry(groupId, folderId, newFolderId, name,
177             sourceFileName, title, description, versionDescription,
178             majorVersion, extraSettings, file, serviceContext);
179     }
180 
181     public static boolean verifyFileEntryLock(long groupId, long folderId,
182         java.lang.String name, java.lang.String lockUuid)
183         throws com.liferay.portal.kernel.exception.PortalException,
184             com.liferay.portal.kernel.exception.SystemException {
185         return getService()
186                    .verifyFileEntryLock(groupId, folderId, name, lockUuid);
187     }
188 
189     public static DLFileEntryService getService() {
190         if (_service == null) {
191             _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
192         }
193 
194         return _service;
195     }
196 
197     public void setService(DLFileEntryService service) {
198         _service = service;
199     }
200 
201     private static DLFileEntryService _service;
202 }