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