1
14
15 package com.liferay.portlet.documentlibrary.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class DLFileEntryServiceUtil {
40 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
41 long folderId, java.lang.String name, java.lang.String title,
42 java.lang.String description, java.lang.String extraSettings,
43 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
44 throws com.liferay.portal.PortalException,
45 com.liferay.portal.SystemException {
46 return getService()
47 .addFileEntry(folderId, name, title, description,
48 extraSettings, bytes, serviceContext);
49 }
50
51 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
52 long folderId, java.lang.String name, java.lang.String title,
53 java.lang.String description, java.lang.String extraSettings,
54 java.io.File file,
55 com.liferay.portal.service.ServiceContext serviceContext)
56 throws com.liferay.portal.PortalException,
57 com.liferay.portal.SystemException {
58 return getService()
59 .addFileEntry(folderId, name, title, description,
60 extraSettings, file, serviceContext);
61 }
62
63 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
64 long folderId, java.lang.String name, java.lang.String title,
65 java.lang.String description, java.lang.String versionDescription,
66 java.lang.String extraSettings, byte[] bytes,
67 com.liferay.portal.service.ServiceContext serviceContext)
68 throws com.liferay.portal.PortalException,
69 com.liferay.portal.SystemException {
70 return getService()
71 .addFileEntry(folderId, name, title, description,
72 versionDescription, extraSettings, bytes, serviceContext);
73 }
74
75 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
76 long folderId, java.lang.String name, java.lang.String title,
77 java.lang.String description, java.lang.String versionDescription,
78 java.lang.String extraSettings, java.io.File file,
79 com.liferay.portal.service.ServiceContext serviceContext)
80 throws com.liferay.portal.PortalException,
81 com.liferay.portal.SystemException {
82 return getService()
83 .addFileEntry(folderId, name, title, description,
84 versionDescription, extraSettings, file, serviceContext);
85 }
86
87 public static void deleteFileEntry(long folderId, java.lang.String name)
88 throws com.liferay.portal.PortalException,
89 com.liferay.portal.SystemException {
90 getService().deleteFileEntry(folderId, name);
91 }
92
93 public static void deleteFileEntry(long folderId, java.lang.String name,
94 double version)
95 throws com.liferay.portal.PortalException,
96 com.liferay.portal.SystemException {
97 getService().deleteFileEntry(folderId, name, version);
98 }
99
100 public static void deleteFileEntryByTitle(long folderId,
101 java.lang.String titleWithExtension)
102 throws com.liferay.portal.PortalException,
103 com.liferay.portal.SystemException {
104 getService().deleteFileEntryByTitle(folderId, titleWithExtension);
105 }
106
107 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
108 long folderId)
109 throws com.liferay.portal.PortalException,
110 com.liferay.portal.SystemException {
111 return getService().getFileEntries(folderId);
112 }
113
114 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
115 long folderId, java.lang.String name)
116 throws com.liferay.portal.PortalException,
117 com.liferay.portal.SystemException {
118 return getService().getFileEntry(folderId, name);
119 }
120
121 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
122 long folderId, java.lang.String titleWithExtension)
123 throws com.liferay.portal.PortalException,
124 com.liferay.portal.SystemException {
125 return getService().getFileEntryByTitle(folderId, titleWithExtension);
126 }
127
128 public static boolean hasFileEntryLock(long folderId, java.lang.String name)
129 throws com.liferay.portal.PortalException,
130 com.liferay.portal.SystemException {
131 return getService().hasFileEntryLock(folderId, name);
132 }
133
134 public static com.liferay.portal.model.Lock lockFileEntry(long folderId,
135 java.lang.String name)
136 throws com.liferay.portal.PortalException,
137 com.liferay.portal.SystemException {
138 return getService().lockFileEntry(folderId, name);
139 }
140
141 public static com.liferay.portal.model.Lock lockFileEntry(long folderId,
142 java.lang.String name, java.lang.String owner, long expirationTime)
143 throws com.liferay.portal.PortalException,
144 com.liferay.portal.SystemException {
145 return getService().lockFileEntry(folderId, name, owner, expirationTime);
146 }
147
148 public static com.liferay.portal.model.Lock refreshFileEntryLock(
149 java.lang.String lockUuid, long expirationTime)
150 throws com.liferay.portal.PortalException,
151 com.liferay.portal.SystemException {
152 return getService().refreshFileEntryLock(lockUuid, expirationTime);
153 }
154
155 public static void unlockFileEntry(long folderId, java.lang.String name)
156 throws com.liferay.portal.SystemException {
157 getService().unlockFileEntry(folderId, name);
158 }
159
160 public static void unlockFileEntry(long folderId, java.lang.String name,
161 java.lang.String lockUuid)
162 throws com.liferay.portal.PortalException,
163 com.liferay.portal.SystemException {
164 getService().unlockFileEntry(folderId, name, lockUuid);
165 }
166
167 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
168 long folderId, long newFolderId, java.lang.String name,
169 java.lang.String sourceFileName, java.lang.String title,
170 java.lang.String description, java.lang.String extraSettings,
171 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
172 throws com.liferay.portal.PortalException,
173 com.liferay.portal.SystemException {
174 return getService()
175 .updateFileEntry(folderId, newFolderId, name,
176 sourceFileName, title, description, extraSettings, bytes,
177 serviceContext);
178 }
179
180 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
181 long folderId, long newFolderId, java.lang.String name,
182 java.lang.String sourceFileName, java.lang.String title,
183 java.lang.String description, java.lang.String extraSettings,
184 java.io.File file,
185 com.liferay.portal.service.ServiceContext serviceContext)
186 throws com.liferay.portal.PortalException,
187 com.liferay.portal.SystemException {
188 return getService()
189 .updateFileEntry(folderId, newFolderId, name,
190 sourceFileName, title, description, extraSettings, file,
191 serviceContext);
192 }
193
194 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
195 long folderId, long newFolderId, java.lang.String name,
196 java.lang.String sourceFileName, java.lang.String title,
197 java.lang.String description, java.lang.String versionDescription,
198 java.lang.String extraSettings, byte[] bytes,
199 com.liferay.portal.service.ServiceContext serviceContext)
200 throws com.liferay.portal.PortalException,
201 com.liferay.portal.SystemException {
202 return getService()
203 .updateFileEntry(folderId, newFolderId, name,
204 sourceFileName, title, description, versionDescription,
205 extraSettings, bytes, serviceContext);
206 }
207
208 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
209 long folderId, long newFolderId, java.lang.String name,
210 java.lang.String sourceFileName, java.lang.String title,
211 java.lang.String description, java.lang.String versionDescription,
212 java.lang.String extraSettings, java.io.File file,
213 com.liferay.portal.service.ServiceContext serviceContext)
214 throws com.liferay.portal.PortalException,
215 com.liferay.portal.SystemException {
216 return getService()
217 .updateFileEntry(folderId, newFolderId, name,
218 sourceFileName, title, description, versionDescription,
219 extraSettings, file, serviceContext);
220 }
221
222 public static boolean verifyFileEntryLock(long folderId,
223 java.lang.String name, java.lang.String lockUuid)
224 throws com.liferay.portal.PortalException,
225 com.liferay.portal.SystemException {
226 return getService().verifyFileEntryLock(folderId, name, lockUuid);
227 }
228
229 public static DLFileEntryService getService() {
230 if (_service == null) {
231 _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
232 }
233
234 return _service;
235 }
236
237 public void setService(DLFileEntryService service) {
238 _service = service;
239 }
240
241 private static DLFileEntryService _service;
242 }