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 extraSettings,
51 java.io.File file,
52 com.liferay.portal.service.ServiceContext serviceContext)
53 throws com.liferay.portal.PortalException,
54 com.liferay.portal.SystemException {
55 return getService()
56 .addFileEntry(folderId, name, title, description,
57 extraSettings, file, serviceContext);
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 extraSettings,
63 byte[] bytes, 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, bytes, 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 return getService().hasFileEntryLock(folderId, name);
115 }
116
117 public static com.liferay.lock.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.lock.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.lock.model.Lock refreshFileEntryLock(
132 java.lang.String lockUuid, long expirationTime)
133 throws com.liferay.portal.PortalException {
134 return getService().refreshFileEntryLock(lockUuid, expirationTime);
135 }
136
137 public static void unlockFileEntry(long folderId, java.lang.String name) {
138 getService().unlockFileEntry(folderId, name);
139 }
140
141 public static void unlockFileEntry(long folderId, java.lang.String name,
142 java.lang.String lockUuid) throws com.liferay.portal.PortalException {
143 getService().unlockFileEntry(folderId, name, lockUuid);
144 }
145
146 public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry(
147 long folderId, long newFolderId, java.lang.String name,
148 java.lang.String sourceFileName, java.lang.String title,
149 java.lang.String description, java.lang.String extraSettings,
150 byte[] bytes, com.liferay.portal.service.ServiceContext serviceContext)
151 throws com.liferay.portal.PortalException,
152 com.liferay.portal.SystemException {
153 return getService()
154 .updateFileEntry(folderId, newFolderId, name,
155 sourceFileName, title, description, extraSettings, bytes,
156 serviceContext);
157 }
158
159 public static boolean verifyFileEntryLock(long folderId,
160 java.lang.String name, java.lang.String lockUuid)
161 throws com.liferay.portal.PortalException {
162 return getService().verifyFileEntryLock(folderId, name, lockUuid);
163 }
164
165 public static DLFileEntryService getService() {
166 if (_service == null) {
167 throw new RuntimeException("DLFileEntryService is not set");
168 }
169
170 return _service;
171 }
172
173 public void setService(DLFileEntryService service) {
174 _service = service;
175 }
176
177 private static DLFileEntryService _service;
178 }