1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.documentlibrary.service;
24  
25  
26  /**
27   * <a href="DLFileEntryServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.documentlibrary.service.DLFileEntryService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.documentlibrary.service.DLFileEntryService
45   *
46   */
47  public class DLFileEntryServiceUtil {
48      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
49          long folderId, java.lang.String name, java.lang.String title,
50          java.lang.String description, java.lang.String[] tagsEntries,
51          java.lang.String extraSettings, java.io.File file,
52          boolean addCommunityPermissions, boolean addGuestPermissions)
53          throws com.liferay.portal.PortalException,
54              com.liferay.portal.SystemException, java.rmi.RemoteException {
55          return _service.addFileEntry(folderId, name, title, description,
56              tagsEntries, extraSettings, file, addCommunityPermissions,
57              addGuestPermissions);
58      }
59  
60      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
61          long folderId, java.lang.String name, java.lang.String title,
62          java.lang.String description, java.lang.String[] tagsEntries,
63          java.lang.String extraSettings, byte[] bytes,
64          boolean addCommunityPermissions, boolean addGuestPermissions)
65          throws com.liferay.portal.PortalException,
66              com.liferay.portal.SystemException, java.rmi.RemoteException {
67          return _service.addFileEntry(folderId, name, title, description,
68              tagsEntries, extraSettings, bytes, addCommunityPermissions,
69              addGuestPermissions);
70      }
71  
72      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
73          long folderId, java.lang.String name, java.lang.String title,
74          java.lang.String description, java.lang.String[] tagsEntries,
75          java.lang.String extraSettings, java.io.File file,
76          java.lang.String[] communityPermissions,
77          java.lang.String[] guestPermissions)
78          throws com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException, java.rmi.RemoteException {
80          return _service.addFileEntry(folderId, name, title, description,
81              tagsEntries, extraSettings, file, communityPermissions,
82              guestPermissions);
83      }
84  
85      public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
86          long folderId, java.lang.String name, java.lang.String title,
87          java.lang.String description, java.lang.String[] tagsEntries,
88          java.lang.String extraSettings, byte[] bytes,
89          java.lang.String[] communityPermissions,
90          java.lang.String[] guestPermissions)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException, java.rmi.RemoteException {
93          return _service.addFileEntry(folderId, name, title, description,
94              tagsEntries, extraSettings, bytes, communityPermissions,
95              guestPermissions);
96      }
97  
98      public static void deleteFileEntry(long folderId, java.lang.String name)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException, java.rmi.RemoteException {
101         _service.deleteFileEntry(folderId, name);
102     }
103 
104     public static void deleteFileEntry(long folderId, java.lang.String name,
105         double version)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException, java.rmi.RemoteException {
108         _service.deleteFileEntry(folderId, name, version);
109     }
110 
111     public static void deleteFileEntryByTitle(long folderId,
112         java.lang.String titleWithExtension)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException, java.rmi.RemoteException {
115         _service.deleteFileEntryByTitle(folderId, titleWithExtension);
116     }
117 
118     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
119         long folderId)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException, java.rmi.RemoteException {
122         return _service.getFileEntries(folderId);
123     }
124 
125     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
126         long folderId, java.lang.String name)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException, java.rmi.RemoteException {
129         return _service.getFileEntry(folderId, name);
130     }
131 
132     public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
133         long folderId, java.lang.String titleWithExtension)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException, java.rmi.RemoteException {
136         return _service.getFileEntryByTitle(folderId, titleWithExtension);
137     }
138 
139     public static void lockFileEntry(long folderId, java.lang.String name)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException, java.rmi.RemoteException {
142         _service.lockFileEntry(folderId, name);
143     }
144 
145     public static void unlockFileEntry(long folderId, java.lang.String name)
146         throws java.rmi.RemoteException {
147         _service.unlockFileEntry(folderId, name);
148     }
149 
150     public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
151         long folderId, long newFolderId, java.lang.String name,
152         java.lang.String sourceFileName, java.lang.String title,
153         java.lang.String description, java.lang.String[] tagsEntries,
154         java.lang.String extraSettings, byte[] bytes)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException, java.rmi.RemoteException {
157         return _service.updateFileEntry(folderId, newFolderId, name,
158             sourceFileName, title, description, tagsEntries, extraSettings,
159             bytes);
160     }
161 
162     public static DLFileEntryService getService() {
163         return _service;
164     }
165 
166     public void setService(DLFileEntryService service) {
167         _service = service;
168     }
169 
170     private static DLFileEntryService _service;
171 }