001
014
015 package com.liferay.portlet.documentlibrary.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.util.LocalizationUtil;
022
023 import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeServiceUtil;
024
025 import java.rmi.RemoteException;
026
027 import java.util.Locale;
028 import java.util.Map;
029
030
070 @ProviderType
071 public class DLFileEntryTypeServiceSoap {
072 public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap addFileEntryType(
073 long groupId, java.lang.String fileEntryTypeKey,
074 java.lang.String[] nameMapLanguageIds,
075 java.lang.String[] nameMapValues,
076 java.lang.String[] descriptionMapLanguageIds,
077 java.lang.String[] descriptionMapValues, long[] ddmStructureIds,
078 com.liferay.portal.service.ServiceContext serviceContext)
079 throws RemoteException {
080 try {
081 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
082 nameMapValues);
083 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
084 descriptionMapValues);
085
086 com.liferay.portlet.documentlibrary.model.DLFileEntryType returnValue =
087 DLFileEntryTypeServiceUtil.addFileEntryType(groupId,
088 fileEntryTypeKey, nameMap, descriptionMap, ddmStructureIds,
089 serviceContext);
090
091 return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModel(returnValue);
092 }
093 catch (Exception e) {
094 _log.error(e, e);
095
096 throw new RemoteException(e.getMessage());
097 }
098 }
099
100 public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap addFileEntryType(
101 long groupId, java.lang.String name, java.lang.String description,
102 long[] ddmStructureIds,
103 com.liferay.portal.service.ServiceContext serviceContext)
104 throws RemoteException {
105 try {
106 com.liferay.portlet.documentlibrary.model.DLFileEntryType returnValue =
107 DLFileEntryTypeServiceUtil.addFileEntryType(groupId, name,
108 description, ddmStructureIds, serviceContext);
109
110 return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModel(returnValue);
111 }
112 catch (Exception e) {
113 _log.error(e, e);
114
115 throw new RemoteException(e.getMessage());
116 }
117 }
118
119 public static void deleteFileEntryType(long fileEntryTypeId)
120 throws RemoteException {
121 try {
122 DLFileEntryTypeServiceUtil.deleteFileEntryType(fileEntryTypeId);
123 }
124 catch (Exception e) {
125 _log.error(e, e);
126
127 throw new RemoteException(e.getMessage());
128 }
129 }
130
131 public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap getFileEntryType(
132 long fileEntryTypeId) throws RemoteException {
133 try {
134 com.liferay.portlet.documentlibrary.model.DLFileEntryType returnValue =
135 DLFileEntryTypeServiceUtil.getFileEntryType(fileEntryTypeId);
136
137 return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModel(returnValue);
138 }
139 catch (Exception e) {
140 _log.error(e, e);
141
142 throw new RemoteException(e.getMessage());
143 }
144 }
145
146 public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap[] getFileEntryTypes(
147 long[] groupIds) throws RemoteException {
148 try {
149 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> returnValue =
150 DLFileEntryTypeServiceUtil.getFileEntryTypes(groupIds);
151
152 return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModels(returnValue);
153 }
154 catch (Exception e) {
155 _log.error(e, e);
156
157 throw new RemoteException(e.getMessage());
158 }
159 }
160
161 public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap[] getFileEntryTypes(
162 long[] groupIds, int start, int end) throws RemoteException {
163 try {
164 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> returnValue =
165 DLFileEntryTypeServiceUtil.getFileEntryTypes(groupIds, start,
166 end);
167
168 return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModels(returnValue);
169 }
170 catch (Exception e) {
171 _log.error(e, e);
172
173 throw new RemoteException(e.getMessage());
174 }
175 }
176
177 public static int getFileEntryTypesCount(long[] groupIds)
178 throws RemoteException {
179 try {
180 int returnValue = DLFileEntryTypeServiceUtil.getFileEntryTypesCount(groupIds);
181
182 return returnValue;
183 }
184 catch (Exception e) {
185 _log.error(e, e);
186
187 throw new RemoteException(e.getMessage());
188 }
189 }
190
191 public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap[] getFolderFileEntryTypes(
192 long[] groupIds, long folderId, boolean inherited)
193 throws RemoteException {
194 try {
195 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> returnValue =
196 DLFileEntryTypeServiceUtil.getFolderFileEntryTypes(groupIds,
197 folderId, inherited);
198
199 return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModels(returnValue);
200 }
201 catch (Exception e) {
202 _log.error(e, e);
203
204 throw new RemoteException(e.getMessage());
205 }
206 }
207
208 public static com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap[] search(
209 long companyId, long[] groupIds, java.lang.String keywords,
210 boolean includeBasicFileEntryType, int start, int end,
211 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileEntryType> orderByComparator)
212 throws RemoteException {
213 try {
214 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> returnValue =
215 DLFileEntryTypeServiceUtil.search(companyId, groupIds,
216 keywords, includeBasicFileEntryType, start, end,
217 orderByComparator);
218
219 return com.liferay.portlet.documentlibrary.model.DLFileEntryTypeSoap.toSoapModels(returnValue);
220 }
221 catch (Exception e) {
222 _log.error(e, e);
223
224 throw new RemoteException(e.getMessage());
225 }
226 }
227
228 public static int searchCount(long companyId, long[] groupIds,
229 java.lang.String keywords, boolean includeBasicFileEntryType)
230 throws RemoteException {
231 try {
232 int returnValue = DLFileEntryTypeServiceUtil.searchCount(companyId,
233 groupIds, keywords, includeBasicFileEntryType);
234
235 return returnValue;
236 }
237 catch (Exception e) {
238 _log.error(e, e);
239
240 throw new RemoteException(e.getMessage());
241 }
242 }
243
244 public static void updateFileEntryType(long fileEntryTypeId,
245 java.lang.String[] nameMapLanguageIds,
246 java.lang.String[] nameMapValues,
247 java.lang.String[] descriptionMapLanguageIds,
248 java.lang.String[] descriptionMapValues, long[] ddmStructureIds,
249 com.liferay.portal.service.ServiceContext serviceContext)
250 throws RemoteException {
251 try {
252 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
253 nameMapValues);
254 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
255 descriptionMapValues);
256
257 DLFileEntryTypeServiceUtil.updateFileEntryType(fileEntryTypeId,
258 nameMap, descriptionMap, ddmStructureIds, serviceContext);
259 }
260 catch (Exception e) {
261 _log.error(e, e);
262
263 throw new RemoteException(e.getMessage());
264 }
265 }
266
267 public static void updateFileEntryType(long fileEntryTypeId,
268 java.lang.String name, java.lang.String description,
269 long[] ddmStructureIds,
270 com.liferay.portal.service.ServiceContext serviceContext)
271 throws RemoteException {
272 try {
273 DLFileEntryTypeServiceUtil.updateFileEntryType(fileEntryTypeId,
274 name, description, ddmStructureIds, serviceContext);
275 }
276 catch (Exception e) {
277 _log.error(e, e);
278
279 throw new RemoteException(e.getMessage());
280 }
281 }
282
283 private static Log _log = LogFactoryUtil.getLog(DLFileEntryTypeServiceSoap.class);
284 }