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