001
014
015 package com.liferay.portlet.dynamicdatamapping.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.dynamicdatamapping.service.DDMStructureServiceUtil;
022
023 import java.rmi.RemoteException;
024
025 import java.util.Locale;
026 import java.util.Map;
027
028
070 public class DDMStructureServiceSoap {
071 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
072 long groupId, long parentStructureId, long classNameId,
073 java.lang.String structureKey, java.lang.String[] nameMapLanguageIds,
074 java.lang.String[] nameMapValues,
075 java.lang.String[] descriptionMapLanguageIds,
076 java.lang.String[] descriptionMapValues, java.lang.String xsd,
077 java.lang.String storageType, int type,
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.dynamicdatamapping.model.DDMStructure returnValue =
087 DDMStructureServiceUtil.addStructure(groupId,
088 parentStructureId, classNameId, structureKey, nameMap,
089 descriptionMap, xsd, storageType, type, serviceContext);
090
091 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.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.dynamicdatamapping.model.DDMStructureSoap copyStructure(
101 long structureId, java.lang.String[] nameMapLanguageIds,
102 java.lang.String[] nameMapValues,
103 java.lang.String[] descriptionMapLanguageIds,
104 java.lang.String[] descriptionMapValues,
105 com.liferay.portal.service.ServiceContext serviceContext)
106 throws RemoteException {
107 try {
108 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
109 nameMapValues);
110 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
111 descriptionMapValues);
112
113 com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
114 DDMStructureServiceUtil.copyStructure(structureId, nameMap,
115 descriptionMap, serviceContext);
116
117 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
118 }
119 catch (Exception e) {
120 _log.error(e, e);
121
122 throw new RemoteException(e.getMessage());
123 }
124 }
125
126 public static void deleteStructure(long structureId)
127 throws RemoteException {
128 try {
129 DDMStructureServiceUtil.deleteStructure(structureId);
130 }
131 catch (Exception e) {
132 _log.error(e, e);
133
134 throw new RemoteException(e.getMessage());
135 }
136 }
137
138 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap fetchStructure(
139 long groupId, java.lang.String structureKey) throws RemoteException {
140 try {
141 com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
142 DDMStructureServiceUtil.fetchStructure(groupId, structureKey);
143
144 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
145 }
146 catch (Exception e) {
147 _log.error(e, e);
148
149 throw new RemoteException(e.getMessage());
150 }
151 }
152
153 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap getStructure(
154 long structureId) throws RemoteException {
155 try {
156 com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
157 DDMStructureServiceUtil.getStructure(structureId);
158
159 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
160 }
161 catch (Exception e) {
162 _log.error(e, e);
163
164 throw new RemoteException(e.getMessage());
165 }
166 }
167
168 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] search(
169 long companyId, long[] groupIds, long[] classNameIds,
170 java.lang.String keywords, int start, int end,
171 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172 throws RemoteException {
173 try {
174 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
175 DDMStructureServiceUtil.search(companyId, groupIds,
176 classNameIds, keywords, start, end, orderByComparator);
177
178 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
179 }
180 catch (Exception e) {
181 _log.error(e, e);
182
183 throw new RemoteException(e.getMessage());
184 }
185 }
186
187 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] search(
188 long companyId, long[] groupIds, long[] classNameIds,
189 java.lang.String name, java.lang.String description,
190 java.lang.String storageType, int type, boolean andOperator, int start,
191 int end,
192 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
193 throws RemoteException {
194 try {
195 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
196 DDMStructureServiceUtil.search(companyId, groupIds,
197 classNameIds, name, description, storageType, type,
198 andOperator, start, end, orderByComparator);
199
200 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
201 }
202 catch (Exception e) {
203 _log.error(e, e);
204
205 throw new RemoteException(e.getMessage());
206 }
207 }
208
209 public static int searchCount(long companyId, long[] groupIds,
210 long[] classNameIds, java.lang.String keywords)
211 throws RemoteException {
212 try {
213 int returnValue = DDMStructureServiceUtil.searchCount(companyId,
214 groupIds, classNameIds, keywords);
215
216 return 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 long[] classNameIds, java.lang.String name,
227 java.lang.String description, java.lang.String storageType, int type,
228 boolean andOperator) throws RemoteException {
229 try {
230 int returnValue = DDMStructureServiceUtil.searchCount(companyId,
231 groupIds, classNameIds, name, description, storageType,
232 type, andOperator);
233
234 return returnValue;
235 }
236 catch (Exception e) {
237 _log.error(e, e);
238
239 throw new RemoteException(e.getMessage());
240 }
241 }
242
243 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
244 long structureId, long parentStructureId,
245 java.lang.String[] nameMapLanguageIds,
246 java.lang.String[] nameMapValues,
247 java.lang.String[] descriptionMapLanguageIds,
248 java.lang.String[] descriptionMapValues, java.lang.String xsd,
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 com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
258 DDMStructureServiceUtil.updateStructure(structureId,
259 parentStructureId, nameMap, descriptionMap, xsd,
260 serviceContext);
261
262 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
263 }
264 catch (Exception e) {
265 _log.error(e, e);
266
267 throw new RemoteException(e.getMessage());
268 }
269 }
270
271 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
272 long groupId, long parentStructureId, java.lang.String structureKey,
273 java.lang.String[] nameMapLanguageIds,
274 java.lang.String[] nameMapValues,
275 java.lang.String[] descriptionMapLanguageIds,
276 java.lang.String[] descriptionMapValues, java.lang.String xsd,
277 com.liferay.portal.service.ServiceContext serviceContext)
278 throws RemoteException {
279 try {
280 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
281 nameMapValues);
282 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
283 descriptionMapValues);
284
285 com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
286 DDMStructureServiceUtil.updateStructure(groupId,
287 parentStructureId, structureKey, nameMap, descriptionMap,
288 xsd, serviceContext);
289
290 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
291 }
292 catch (Exception e) {
293 _log.error(e, e);
294
295 throw new RemoteException(e.getMessage());
296 }
297 }
298
299 private static Log _log = LogFactoryUtil.getLog(DDMStructureServiceSoap.class);
300 }