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 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 }