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