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 extraSettings,
50 java.io.File file,
51 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, file, 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 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 return getService()
66 .addFileEntry(folderId, name, title, description,
67 extraSettings, bytes, serviceContext);
68 }
69
70 public static void deleteFileEntry(long folderId, java.lang.String name)
71 throws com.liferay.portal.PortalException,
72 com.liferay.portal.SystemException {
73 getService().deleteFileEntry(folderId, name);
74 }
75
76 public static void deleteFileEntry(long folderId, java.lang.String name,
77 double version)
78 throws com.liferay.portal.PortalException,
79 com.liferay.portal.SystemException {
80 getService().deleteFileEntry(folderId, name, version);
81 }
82
83 public static void deleteFileEntryByTitle(long folderId,
84 java.lang.String titleWithExtension)
85 throws com.liferay.portal.PortalException,
86 com.liferay.portal.SystemException {
87 getService().deleteFileEntryByTitle(folderId, titleWithExtension);
88 }
89
90 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> getFileEntries(
91 long folderId)
92 throws com.liferay.portal.PortalException,
93 com.liferay.portal.SystemException {
94 return getService().getFileEntries(folderId);
95 }
96
97 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntry(
98 long folderId, java.lang.String name)
99 throws com.liferay.portal.PortalException,
100 com.liferay.portal.SystemException {
101 return getService().getFileEntry(folderId, name);
102 }
103
104 public static com.liferay.portlet.documentlibrary.model.DLFileEntry getFileEntryByTitle(
105 long folderId, java.lang.String titleWithExtension)
106 throws com.liferay.portal.PortalException,
107 com.liferay.portal.SystemException {
108 return getService().getFileEntryByTitle(folderId, titleWithExtension);
109 }
110
111 public static boolean hasFileEntryLock(long folderId, java.lang.String name)
112 throws com.liferay.portal.PortalException,
113 com.liferay.portal.SystemException {
114 return getService().hasFileEntryLock(folderId, name);
115 }
116
117 public static com.liferay.portal.model.Lock lockFileEntry(long folderId,
118 java.lang.String name)
119 throws com.liferay.portal.PortalException,
120 com.liferay.portal.SystemException {
121 return getService().lockFileEntry(folderId, name);
122 }
123
124 public static com.liferay.portal.model.Lock lockFileEntry(long folderId,
125 java.lang.String name, java.lang.String owner, long expirationTime)
126 throws com.liferay.portal.PortalException,
127 com.liferay.portal.SystemException {
128 return getService().lockFileEntry(folderId, name, owner, expirationTime);
129 }
130
131 public static com.liferay.portal.model.Lock refreshFileEntryLock(
132 java.lang.String lockUuid, long expirationTime)
133 throws com.liferay.portal.PortalException,
134 com.liferay.portal.SystemException {
135 return getService().refreshFileEntryLock(lockUuid, expirationTime);
136 }
137
138 public static void unlockFileEntry(long folderId, java.lang.String name)
139 throws com.liferay.portal.SystemException {
140 getService().unlockFileEntry(folderId, name);
141 }
142
143 public static void unlockFileEntry(long folderId, java.lang.String name,
144 java.lang.String lockUuid)
145 throws com.liferay.portal.PortalException,
146 com.liferay.portal.SystemException {
147 getService().unlockFileEntry(folderId, name, lockUuid);
148 }
149
150 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
151 long folderId, long newFolderId, java.lang.String name,
152 java.lang.String sourceFileName, java.lang.String title,
153 java.lang.String description, java.lang.String extraSettings,
154 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
155 throws com.liferay.portal.PortalException,
156 com.liferay.portal.SystemException {
157 return getService()
158 .updateFileEntry(folderId, newFolderId, name,
159 sourceFileName, title, description, extraSettings, bytes,
160 serviceContext);
161 }
162
163 public static boolean verifyFileEntryLock(long folderId,
164 java.lang.String name, java.lang.String lockUuid)
165 throws com.liferay.portal.PortalException,
166 com.liferay.portal.SystemException {
167 return getService().verifyFileEntryLock(folderId, name, lockUuid);
168 }
169
170 public static DLFileEntryService getService() {
171 if (_service == null) {
172 throw new RuntimeException("DLFileEntryService is not set");
173 }
174
175 return _service;
176 }
177
178 public void setService(DLFileEntryService service) {
179 _service = service;
180 }
181
182 private static DLFileEntryService _service;
183 }