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
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 updateRuleGroup(
159 long ruleGroupId, java.lang.String[] nameMapLanguageIds,
160 java.lang.String[] nameMapValues,
161 java.lang.String[] descriptionMapLanguageIds,
162 java.lang.String[] descriptionMapValues,
163 com.liferay.portal.service.ServiceContext serviceContext)
164 throws RemoteException {
165 try {
166 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
167 nameMapValues);
168 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
169 descriptionMapValues);
170
171 com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup returnValue =
172 MDRRuleGroupServiceUtil.updateRuleGroup(ruleGroupId, nameMap,
173 descriptionMap, serviceContext);
174
175 return com.liferay.portlet.mobiledevicerules.model.MDRRuleGroupSoap.toSoapModel(returnValue);
176 }
177 catch (Exception e) {
178 _log.error(e, e);
179
180 throw new RemoteException(e.getMessage());
181 }
182 }
183
184 private static Log _log = LogFactoryUtil.getLog(MDRRuleGroupServiceSoap.class);
185 }