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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
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 {
140 return getService().getFileEntryByTitle(folderId, titleWithExtension);
141 }
142
143 public static boolean hasFileEntryLock(long folderId, java.lang.String name)
144 throws com.liferay.portal.PortalException {
145 return getService().hasFileEntryLock(folderId, name);
146 }
147
148 public static com.liferay.lock.model.Lock lockFileEntry(long folderId,
149 java.lang.String name)
150 throws com.liferay.portal.PortalException,
151 com.liferay.portal.SystemException {
152 return getService().lockFileEntry(folderId, name);
153 }
154
155 public static com.liferay.lock.model.Lock lockFileEntry(long folderId,
156 java.lang.String name, java.lang.String owner, long expirationTime)
157 throws com.liferay.portal.PortalException,
158 com.liferay.portal.SystemException {
159 return getService().lockFileEntry(folderId, name, owner, expirationTime);
160 }
161
162 public static com.liferay.lock.model.Lock refreshFileEntryLock(
163 java.lang.String lockUuid, long expirationTime)
164 throws com.liferay.portal.PortalException {
165 return getService().refreshFileEntryLock(lockUuid, expirationTime);
166 }
167
168 public static void unlockFileEntry(long folderId, java.lang.String name) {
169 getService().unlockFileEntry(folderId, name);
170 }
171
172 public static void unlockFileEntry(long folderId, java.lang.String name,
173 java.lang.String lockUuid) throws com.liferay.portal.PortalException {
174 getService().unlockFileEntry(folderId, name, lockUuid);
175 }
176
177 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
178 long folderId, long newFolderId, java.lang.String name,
179 java.lang.String sourceFileName, java.lang.String title,
180 java.lang.String description, java.lang.String[] tagsEntries,
181 java.lang.String extraSettings, byte[] bytes)
182 throws com.liferay.portal.PortalException,
183 com.liferay.portal.SystemException {
184 return getService()
185 .updateFileEntry(folderId, newFolderId, name,
186 sourceFileName, title, description, tagsEntries, extraSettings,
187 bytes);
188 }
189
190 public static boolean verifyFileEntryLock(long folderId,
191 java.lang.String name, java.lang.String lockUuid)
192 throws com.liferay.portal.PortalException {
193 return getService().verifyFileEntryLock(folderId, name, lockUuid);
194 }
195
196 public static DLFileEntryService getService() {
197 if (_service == null) {
198 throw new RuntimeException("DLFileEntryService is not set");
199 }
200
201 return _service;
202 }
203
204 public void setService(DLFileEntryService service) {
205 _service = service;
206 }
207
208 private static DLFileEntryService _service;
209 }