001
014
015 package com.liferay.portlet.dynamicdatalists.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.dynamicdatalists.service.DDLRecordSetServiceUtil;
024
025 import java.rmi.RemoteException;
026
027 import java.util.Locale;
028 import java.util.Map;
029
030
070 @ProviderType
071 public class DDLRecordSetServiceSoap {
072 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap addRecordSet(
073 long groupId, long ddmStructureId, java.lang.String recordSetKey,
074 java.lang.String[] nameMapLanguageIds,
075 java.lang.String[] nameMapValues,
076 java.lang.String[] descriptionMapLanguageIds,
077 java.lang.String[] descriptionMapValues, int minDisplayRows, int scope,
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.dynamicdatalists.model.DDLRecordSet returnValue = DDLRecordSetServiceUtil.addRecordSet(groupId,
087 ddmStructureId, recordSetKey, nameMap, descriptionMap,
088 minDisplayRows, scope, serviceContext);
089
090 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModel(returnValue);
091 }
092 catch (Exception e) {
093 _log.error(e, e);
094
095 throw new RemoteException(e.getMessage());
096 }
097 }
098
099 public static void deleteRecordSet(long recordSetId)
100 throws RemoteException {
101 try {
102 DDLRecordSetServiceUtil.deleteRecordSet(recordSetId);
103 }
104 catch (Exception e) {
105 _log.error(e, e);
106
107 throw new RemoteException(e.getMessage());
108 }
109 }
110
111 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap getRecordSet(
112 long recordSetId) throws RemoteException {
113 try {
114 com.liferay.portlet.dynamicdatalists.model.DDLRecordSet returnValue = DDLRecordSetServiceUtil.getRecordSet(recordSetId);
115
116 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModel(returnValue);
117 }
118 catch (Exception e) {
119 _log.error(e, e);
120
121 throw new RemoteException(e.getMessage());
122 }
123 }
124
125 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap[] search(
126 long companyId, long groupId, java.lang.String keywords, int scope,
127 int start, int end,
128 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
129 throws RemoteException {
130 try {
131 java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> returnValue =
132 DDLRecordSetServiceUtil.search(companyId, groupId, keywords,
133 scope, start, end, orderByComparator);
134
135 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModels(returnValue);
136 }
137 catch (Exception e) {
138 _log.error(e, e);
139
140 throw new RemoteException(e.getMessage());
141 }
142 }
143
144 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap[] search(
145 long companyId, long groupId, java.lang.String name,
146 java.lang.String description, int scope, boolean andOperator,
147 int start, int end,
148 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149 throws RemoteException {
150 try {
151 java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> returnValue =
152 DDLRecordSetServiceUtil.search(companyId, groupId, name,
153 description, scope, andOperator, start, end,
154 orderByComparator);
155
156 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModels(returnValue);
157 }
158 catch (Exception e) {
159 _log.error(e, e);
160
161 throw new RemoteException(e.getMessage());
162 }
163 }
164
165 public static int searchCount(long companyId, long groupId,
166 java.lang.String keywords, int scope) throws RemoteException {
167 try {
168 int returnValue = DDLRecordSetServiceUtil.searchCount(companyId,
169 groupId, keywords, scope);
170
171 return returnValue;
172 }
173 catch (Exception e) {
174 _log.error(e, e);
175
176 throw new RemoteException(e.getMessage());
177 }
178 }
179
180 public static int searchCount(long companyId, long groupId,
181 java.lang.String name, java.lang.String description, int scope,
182 boolean andOperator) throws RemoteException {
183 try {
184 int returnValue = DDLRecordSetServiceUtil.searchCount(companyId,
185 groupId, name, description, scope, andOperator);
186
187 return returnValue;
188 }
189 catch (Exception e) {
190 _log.error(e, e);
191
192 throw new RemoteException(e.getMessage());
193 }
194 }
195
196 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap updateMinDisplayRows(
197 long recordSetId, int minDisplayRows,
198 com.liferay.portal.service.ServiceContext serviceContext)
199 throws RemoteException {
200 try {
201 com.liferay.portlet.dynamicdatalists.model.DDLRecordSet returnValue = DDLRecordSetServiceUtil.updateMinDisplayRows(recordSetId,
202 minDisplayRows, serviceContext);
203
204 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModel(returnValue);
205 }
206 catch (Exception e) {
207 _log.error(e, e);
208
209 throw new RemoteException(e.getMessage());
210 }
211 }
212
213 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap updateRecordSet(
214 long recordSetId, long ddmStructureId,
215 java.lang.String[] nameMapLanguageIds,
216 java.lang.String[] nameMapValues,
217 java.lang.String[] descriptionMapLanguageIds,
218 java.lang.String[] descriptionMapValues, int minDisplayRows,
219 com.liferay.portal.service.ServiceContext serviceContext)
220 throws RemoteException {
221 try {
222 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
223 nameMapValues);
224 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
225 descriptionMapValues);
226
227 com.liferay.portlet.dynamicdatalists.model.DDLRecordSet returnValue = DDLRecordSetServiceUtil.updateRecordSet(recordSetId,
228 ddmStructureId, nameMap, descriptionMap, minDisplayRows,
229 serviceContext);
230
231 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModel(returnValue);
232 }
233 catch (Exception e) {
234 _log.error(e, e);
235
236 throw new RemoteException(e.getMessage());
237 }
238 }
239
240 public static com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap updateRecordSet(
241 long groupId, long ddmStructureId, java.lang.String recordSetKey,
242 java.lang.String[] nameMapLanguageIds,
243 java.lang.String[] nameMapValues,
244 java.lang.String[] descriptionMapLanguageIds,
245 java.lang.String[] descriptionMapValues, int minDisplayRows,
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 com.liferay.portlet.dynamicdatalists.model.DDLRecordSet returnValue = DDLRecordSetServiceUtil.updateRecordSet(groupId,
255 ddmStructureId, recordSetKey, nameMap, descriptionMap,
256 minDisplayRows, serviceContext);
257
258 return com.liferay.portlet.dynamicdatalists.model.DDLRecordSetSoap.toSoapModel(returnValue);
259 }
260 catch (Exception e) {
261 _log.error(e, e);
262
263 throw new RemoteException(e.getMessage());
264 }
265 }
266
267 private static Log _log = LogFactoryUtil.getLog(DDLRecordSetServiceSoap.class);
268 }