001
014
015 package com.liferay.portlet.mobiledevicerules.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.mobiledevicerules.service.MDRRuleGroupServiceUtil;
022
023 import java.rmi.RemoteException;
024
025 import java.util.Locale;
026 import java.util.Map;
027
028
070 public class MDRRuleGroupServiceSoap {
071 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap addRuleGroup(
072 long groupId, java.lang.String[] nameMapLanguageIds,
073 java.lang.String[] nameMapValues,
074 java.lang.String[] descriptionMapLanguageIds,
075 java.lang.String[] descriptionMapValues,
076 com.liferay.portal.service.ServiceContext serviceContext)
077 throws RemoteException {
078 try {
079 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
080 nameMapValues);
081 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
082 descriptionMapValues);
083
084 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
085 MDRRuleGroupServiceUtil.addRuleGroup(groupId, nameMap,
086 descriptionMap, serviceContext);
087
088 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.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.mobiledevicerules.model.MDRRuleGroupSoap copyRuleGroup(
098 long ruleGroupId, long groupId,
099 com.liferay.portal.service.ServiceContext serviceContext)
100 throws RemoteException {
101 try {
102 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
103 MDRRuleGroupServiceUtil.copyRuleGroup(ruleGroupId, groupId,
104 serviceContext);
105
106 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.toSoapModel(returnValue);
107 }
108 catch (Exception e) {
109 _log.error(e, e);
110
111 throw new RemoteException(e.getMessage());
112 }
113 }
114
115 public static void deleteRuleGroup(long ruleGroupId)
116 throws RemoteException {
117 try {
118 MDRRuleGroupServiceUtil.deleteRuleGroup(ruleGroupId);
119 }
120 catch (Exception e) {
121 _log.error(e, e);
122
123 throw new RemoteException(e.getMessage());
124 }
125 }
126
127 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap fetchRuleGroup(
128 long ruleGroupId) throws RemoteException {
129 try {
130 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
131 MDRRuleGroupServiceUtil.fetchRuleGroup(ruleGroupId);
132
133 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.toSoapModel(returnValue);
134 }
135 catch (Exception e) {
136 _log.error(e, e);
137
138 throw new RemoteException(e.getMessage());
139 }
140 }
141
142 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap getRuleGroup(
143 long ruleGroupId) throws RemoteException {
144 try {
145 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
146 MDRRuleGroupServiceUtil.getRuleGroup(ruleGroupId);
147
148 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.toSoapModel(returnValue);
149 }
150 catch (Exception e) {
151 _log.error(e, e);
152
153 throw new RemoteException(e.getMessage());
154 }
155 }
156
157 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap updateRuleGroup(
158 long ruleGroupId, java.lang.String[] nameMapLanguageIds,
159 java.lang.String[] nameMapValues,
160 java.lang.String[] descriptionMapLanguageIds,
161 java.lang.String[] descriptionMapValues,
162 com.liferay.portal.service.ServiceContext serviceContext)
163 throws RemoteException {
164 try {
165 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
166 nameMapValues);
167 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
168 descriptionMapValues);
169
170 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
171 MDRRuleGroupServiceUtil.updateRuleGroup(ruleGroupId, nameMap,
172 descriptionMap, serviceContext);
173
174 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.toSoapModel(returnValue);
175 }
176 catch (Exception e) {
177 _log.error(e, e);
178
179 throw new RemoteException(e.getMessage());
180 }
181 }
182
183 private static Log _log = LogFactoryUtil.getLog(MDRRuleGroupServiceSoap.class);
184 }