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
071 public class DDMStructureServiceSoap {
072 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap addStructure(
073 long groupId, long classNameId, java.lang.String structureKey,
074 java.lang.String[] nameMapLanguageIds,
075 java.lang.String[] nameMapValues,
076 java.lang.String[] descriptionMapLanguageIds,
077 java.lang.String[] descriptionMapValues, java.lang.String xsd,
078 java.lang.String storageType, int type,
079 com.liferay.portal.service.ServiceContext serviceContext)
080 throws RemoteException {
081 try {
082 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
083 nameMapValues);
084 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
085 descriptionMapValues);
086
087 com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
088 DDMStructureServiceUtil.addStructure(groupId, classNameId,
089 structureKey, nameMap, descriptionMap, xsd, storageType,
090 type, serviceContext);
091
092 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
093 }
094 catch (Exception e) {
095 _log.error(e, e);
096
097 throw new RemoteException(e.getMessage());
098 }
099 }
100
101 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap copyStructure(
102 long structureId, java.lang.String[] nameMapLanguageIds,
103 java.lang.String[] nameMapValues,
104 java.lang.String[] descriptionMapLanguageIds,
105 java.lang.String[] descriptionMapValues,
106 com.liferay.portal.service.ServiceContext serviceContext)
107 throws RemoteException {
108 try {
109 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
110 nameMapValues);
111 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
112 descriptionMapValues);
113
114 com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
115 DDMStructureServiceUtil.copyStructure(structureId, nameMap,
116 descriptionMap, serviceContext);
117
118 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
119 }
120 catch (Exception e) {
121 _log.error(e, e);
122
123 throw new RemoteException(e.getMessage());
124 }
125 }
126
127 public static void deleteStructure(long structureId)
128 throws RemoteException {
129 try {
130 DDMStructureServiceUtil.deleteStructure(structureId);
131 }
132 catch (Exception e) {
133 _log.error(e, e);
134
135 throw new RemoteException(e.getMessage());
136 }
137 }
138
139 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap fetchStructure(
140 long groupId, java.lang.String structureKey) throws RemoteException {
141 try {
142 com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
143 DDMStructureServiceUtil.fetchStructure(groupId, structureKey);
144
145 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap getStructure(
155 long structureId) throws RemoteException {
156 try {
157 com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
158 DDMStructureServiceUtil.getStructure(structureId);
159
160 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
161 }
162 catch (Exception e) {
163 _log.error(e, e);
164
165 throw new RemoteException(e.getMessage());
166 }
167 }
168
169 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap[] search(
170 long companyId, long[] groupIds, long[] classNameIds,
171 java.lang.String keywords, int start, int end,
172 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173 throws RemoteException {
174 try {
175 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
176 DDMStructureServiceUtil.search(companyId, groupIds,
177 classNameIds, keywords, start, end, orderByComparator);
178
179 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(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.dynamicdatamapping.model.DDMStructureSoap[] search(
189 long companyId, long[] groupIds, long[] classNameIds,
190 java.lang.String name, java.lang.String description,
191 java.lang.String storageType, int type, boolean andOperator, int start,
192 int end,
193 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194 throws RemoteException {
195 try {
196 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> returnValue =
197 DDMStructureServiceUtil.search(companyId, groupIds,
198 classNameIds, name, description, storageType, type,
199 andOperator, start, end, orderByComparator);
200
201 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModels(returnValue);
202 }
203 catch (Exception e) {
204 _log.error(e, e);
205
206 throw new RemoteException(e.getMessage());
207 }
208 }
209
210 public static int searchCount(long companyId, long[] groupIds,
211 long[] classNameIds, java.lang.String keywords)
212 throws RemoteException {
213 try {
214 int returnValue = DDMStructureServiceUtil.searchCount(companyId,
215 groupIds, classNameIds, keywords);
216
217 return returnValue;
218 }
219 catch (Exception e) {
220 _log.error(e, e);
221
222 throw new RemoteException(e.getMessage());
223 }
224 }
225
226 public static int searchCount(long companyId, long[] groupIds,
227 long[] classNameIds, java.lang.String name,
228 java.lang.String description, java.lang.String storageType, int type,
229 boolean andOperator) throws RemoteException {
230 try {
231 int returnValue = DDMStructureServiceUtil.searchCount(companyId,
232 groupIds, classNameIds, name, description, storageType,
233 type, andOperator);
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 com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
245 long structureId, 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, nameMap,
259 descriptionMap, xsd, serviceContext);
260
261 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
262 }
263 catch (Exception e) {
264 _log.error(e, e);
265
266 throw new RemoteException(e.getMessage());
267 }
268 }
269
270 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap updateStructure(
271 long groupId, java.lang.String structureKey,
272 java.lang.String[] nameMapLanguageIds,
273 java.lang.String[] nameMapValues,
274 java.lang.String[] descriptionMapLanguageIds,
275 java.lang.String[] descriptionMapValues, java.lang.String xsd,
276 com.liferay.portal.service.ServiceContext serviceContext)
277 throws RemoteException {
278 try {
279 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
280 nameMapValues);
281 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
282 descriptionMapValues);
283
284 com.liferay.portlet.dynamicdatamapping.model.DDMStructure returnValue =
285 DDMStructureServiceUtil.updateStructure(groupId, structureKey,
286 nameMap, descriptionMap, xsd, serviceContext);
287
288 return com.liferay.portlet.dynamicdatamapping.model.DDMStructureSoap.toSoapModel(returnValue);
289 }
290 catch (Exception e) {
291 _log.error(e, e);
292
293 throw new RemoteException(e.getMessage());
294 }
295 }
296
297 private static Log _log = LogFactoryUtil.getLog(DDMStructureServiceSoap.class);
298 }