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