001
014
015 package com.liferay.portlet.mobiledevicerules.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.mobiledevicerules.service.MDRRuleGroupServiceUtil;
024
025 import java.rmi.RemoteException;
026
027 import java.util.Locale;
028 import java.util.Map;
029
030
070 @ProviderType
071 public class MDRRuleGroupServiceSoap {
072 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap addRuleGroup(
073 long groupId, java.lang.String[] nameMapLanguageIds,
074 java.lang.String[] nameMapValues,
075 java.lang.String[] descriptionMapLanguageIds,
076 java.lang.String[] descriptionMapValues,
077 com.liferay.portal.service.ServiceContext serviceContext)
078 throws RemoteException {
079 try {
080 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
081 nameMapValues);
082 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
083 descriptionMapValues);
084
085 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
086 MDRRuleGroupServiceUtil.addRuleGroup(groupId, nameMap,
087 descriptionMap, serviceContext);
088
089 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.toSoapModel(returnValue);
090 }
091 catch (Exception e) {
092 _log.error(e, e);
093
094 throw new RemoteException(e.getMessage());
095 }
096 }
097
098 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap copyRuleGroup(
099 long ruleGroupId, long groupId,
100 com.liferay.portal.service.ServiceContext serviceContext)
101 throws RemoteException {
102 try {
103 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
104 MDRRuleGroupServiceUtil.copyRuleGroup(ruleGroupId, groupId,
105 serviceContext);
106
107 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.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 deleteRuleGroup(long ruleGroupId)
117 throws RemoteException {
118 try {
119 MDRRuleGroupServiceUtil.deleteRuleGroup(ruleGroupId);
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.mobiledevicerules.model.MDRRuleGroupSoap fetchRuleGroup(
129 long ruleGroupId) throws RemoteException {
130 try {
131 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
132 MDRRuleGroupServiceUtil.fetchRuleGroup(ruleGroupId);
133
134 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.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.mobiledevicerules.model.MDRRuleGroupSoap getRuleGroup(
144 long ruleGroupId) throws RemoteException {
145 try {
146 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
147 MDRRuleGroupServiceUtil.getRuleGroup(ruleGroupId);
148
149 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.toSoapModel(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.mobiledevicerules.model.MDRRuleGroupSoap[] getRuleGroups(
159 long[] groupIds, int start, int end) throws RemoteException {
160 try {
161 java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup> returnValue =
162 MDRRuleGroupServiceUtil.getRuleGroups(groupIds, start, end);
163
164 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.toSoapModels(returnValue);
165 }
166 catch (Exception e) {
167 _log.error(e, e);
168
169 throw new RemoteException(e.getMessage());
170 }
171 }
172
173 public static int getRuleGroupsCount(long[] groupIds)
174 throws RemoteException {
175 try {
176 int returnValue = MDRRuleGroupServiceUtil.getRuleGroupsCount(groupIds);
177
178 return 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.mobiledevicerules.model.MDRRuleGroupSoap updateRuleGroup(
188 long ruleGroupId, java.lang.String[] nameMapLanguageIds,
189 java.lang.String[] nameMapValues,
190 java.lang.String[] descriptionMapLanguageIds,
191 java.lang.String[] descriptionMapValues,
192 com.liferay.portal.service.ServiceContext serviceContext)
193 throws RemoteException {
194 try {
195 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
196 nameMapValues);
197 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
198 descriptionMapValues);
199
200 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
201 MDRRuleGroupServiceUtil.updateRuleGroup(ruleGroupId, nameMap,
202 descriptionMap, serviceContext);
203
204 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.toSoapModel(returnValue);
205 }
206 catch (Exception e) {
207 _log.error(e, e);
208
209 throw new RemoteException(e.getMessage());
210 }
211 }
212
213 private static Log _log = LogFactoryUtil.getLog(MDRRuleGroupServiceSoap.class);
214 }