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