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