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[] tagsEntries,
43 java.lang.String extraSettings, byte[] bytes,
44 boolean addCommunityPermissions, boolean addGuestPermissions)
45 throws com.liferay.portal.PortalException,
46 com.liferay.portal.SystemException, java.rmi.RemoteException {
47 return getService()
48 .addFileEntry(folderId, name, title, description,
49 tagsEntries, extraSettings, bytes, addCommunityPermissions,
50 addGuestPermissions);
51 }
52
53 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
54 long folderId, java.lang.String name, java.lang.String title,
55 java.lang.String description, java.lang.String[] tagsEntries,
56 java.lang.String extraSettings, byte[] bytes,
57 java.lang.String[] communityPermissions,
58 java.lang.String[] guestPermissions)
59 throws com.liferay.portal.PortalException,
60 com.liferay.portal.SystemException, java.rmi.RemoteException {
61 return getService()
62 .addFileEntry(folderId, name, title, description,
63 tagsEntries, extraSettings, bytes, communityPermissions,
64 guestPermissions);
65 }
66
67 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
68 long folderId, java.lang.String name, java.lang.String title,
69 java.lang.String description, java.lang.String[] tagsEntries,
70 java.lang.String extraSettings, java.io.File file,
71 boolean addCommunityPermissions, boolean addGuestPermissions)
72 throws com.liferay.portal.PortalException,
73 com.liferay.portal.SystemException, java.rmi.RemoteException {
74 return getService()
75 .addFileEntry(folderId, name, title, description,
76 tagsEntries, extraSettings, file, addCommunityPermissions,
77 addGuestPermissions);
78 }
79
80 public static com.liferay.portlet.documentlibrary.model.DLFileEntry addFileEntry(
81 long folderId, java.lang.String name, java.lang.String title,
82 java.lang.String description, java.lang.String[] tagsEntries,
83 java.lang.String extraSettings, java.io.File file,
84 java.lang.String[] communityPermissions,
85 java.lang.String[] guestPermissions)
86 throws com.liferay.portal.PortalException,
87 com.liferay.portal.SystemException, java.rmi.RemoteException {
88 return getService()
89 .addFileEntry(folderId, name, title, description,
90 tagsEntries, extraSettings, file, communityPermissions,
91 guestPermissions);
92 }
93
94 public static void deleteFileEntry(long folderId, java.lang.String name)
95 throws com.liferay.portal.PortalException,
96 com.liferay.portal.SystemException, java.rmi.RemoteException {
97 getService().deleteFileEntry(folderId, name);
98 }
99
100 public static void deleteFileEntry(long folderId, java.lang.String name,
101 double version)
102 throws com.liferay.portal.PortalException,
103 com.liferay.portal.SystemException, java.rmi.RemoteException {
104 getService().deleteFileEntry(folderId, name, version);
105 }
106
107 public static void deleteFileEntryByTitle(long folderId,
108 java.lang.String titleWithExtension)
109 throws com.liferay.portal.PortalException,
110 com.liferay.portal.SystemException, java.rmi.RemoteException {
111 getService().deleteFileEntryByTitle(folderId, titleWithExtension);
112 }
113
114 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
115 long folderId)
116 throws com.liferay.portal.PortalException,
117 com.liferay.portal.SystemException, java.rmi.RemoteException {
118 return getService().getFileEntries(folderId);
119 }
120
121 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
122 long folderId, java.lang.String name)
123 throws com.liferay.portal.PortalException,
124 com.liferay.portal.SystemException, java.rmi.RemoteException {
125 return getService().getFileEntry(folderId, name);
126 }
127
128 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
129 long folderId, java.lang.String titleWithExtension)
130 throws com.liferay.portal.PortalException,
131 com.liferay.portal.SystemException, java.rmi.RemoteException {
132 return getService().getFileEntryByTitle(folderId, titleWithExtension);
133 }
134
135 public static com.liferay.portal.model.Lock getFileEntryLock(
136 long folderId, java.lang.String name)
137 throws com.liferay.portal.PortalException,
138 com.liferay.portal.SystemException, java.rmi.RemoteException {
139 return getService().getFileEntryLock(folderId, name);
140 }
141
142 public static com.liferay.portal.model.Lock lockFileEntry(long folderId,
143 java.lang.String name)
144 throws com.liferay.portal.PortalException,
145 com.liferay.portal.SystemException, java.rmi.RemoteException {
146 return getService().lockFileEntry(folderId, name);
147 }
148
149 public static com.liferay.portal.model.Lock lockFileEntry(long folderId,
150 java.lang.String name, java.lang.String owner, long expirationTime)
151 throws com.liferay.portal.PortalException,
152 com.liferay.portal.SystemException, java.rmi.RemoteException {
153 return getService().lockFileEntry(folderId, name, owner, expirationTime);
154 }
155
156 public static com.liferay.portal.model.Lock refreshFileEntryLock(
157 java.lang.String lockUuid, long expirationTime)
158 throws com.liferay.portal.PortalException,
159 com.liferay.portal.SystemException, java.rmi.RemoteException {
160 return getService().refreshFileEntryLock(lockUuid, expirationTime);
161 }
162
163 public static void unlockFileEntry(long folderId, java.lang.String name)
164 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
165 getService().unlockFileEntry(folderId, name);
166 }
167
168 public static void unlockFileEntry(long folderId, java.lang.String name,
169 java.lang.String lockUuid)
170 throws com.liferay.portal.PortalException,
171 com.liferay.portal.SystemException, java.rmi.RemoteException {
172 getService().unlockFileEntry(folderId, name, lockUuid);
173 }
174
175 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
176 long folderId, long newFolderId, java.lang.String name,
177 java.lang.String sourceFileName, java.lang.String title,
178 java.lang.String description, java.lang.String[] tagsEntries,
179 java.lang.String extraSettings, byte[] bytes)
180 throws com.liferay.portal.PortalException,
181 com.liferay.portal.SystemException, java.rmi.RemoteException {
182 return getService()
183 .updateFileEntry(folderId, newFolderId, name,
184 sourceFileName, title, description, tagsEntries, extraSettings,
185 bytes);
186 }
187
188 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
189 long folderId, long newFolderId, java.lang.String name,
190 java.lang.String sourceFileName, java.lang.String title,
191 java.lang.String description, java.lang.String[] tagsEntries,
192 java.lang.String extraSettings, java.io.File file)
193 throws com.liferay.portal.PortalException,
194 com.liferay.portal.SystemException, java.rmi.RemoteException {
195 return getService()
196 .updateFileEntry(folderId, newFolderId, name,
197 sourceFileName, title, description, tagsEntries, extraSettings, file);
198 }
199
200 public static DLFileEntryService getService() {
201 if (_service == null) {
202 _service = (DLFileEntryService)PortalBeanLocatorUtil.locate(DLFileEntryService.class.getName());
203 }
204
205 return _service;
206 }
207
208 public void setService(DLFileEntryService service) {
209 _service = service;
210 }
211
212 private static DLFileEntryService _service;
213 }