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.MDRRuleServiceUtil;
022
023 import java.rmi.RemoteException;
024
025 import java.util.Locale;
026 import java.util.Map;
027
028
071 public class MDRRuleServiceSoap {
072 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleSoap addRule(
073 long ruleGroupId, java.lang.String[] nameMapLanguageIds,
074 java.lang.String[] nameMapValues,
075 java.lang.String[] descriptionMapLanguageIds,
076 java.lang.String[] descriptionMapValues, java.lang.String type,
077 java.lang.String typeSettings,
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.mobiledevicerules.model.MDRRule returnValue = MDRRuleServiceUtil.addRule(ruleGroupId,
087 nameMap, descriptionMap, type, typeSettings, serviceContext);
088
089 return com.liferay.portlet.mobiledevicerules.model.MDRRuleSoap.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 void deleteRule(long ruleId) throws RemoteException {
099 try {
100 MDRRuleServiceUtil.deleteRule(ruleId);
101 }
102 catch (Exception e) {
103 _log.error(e, e);
104
105 throw new RemoteException(e.getMessage());
106 }
107 }
108
109 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleSoap fetchRule(
110 long ruleId) throws RemoteException {
111 try {
112 com.liferay.portlet.mobiledevicerules.model.MDRRule returnValue = MDRRuleServiceUtil.fetchRule(ruleId);
113
114 return com.liferay.portlet.mobiledevicerules.model.MDRRuleSoap.toSoapModel(returnValue);
115 }
116 catch (Exception e) {
117 _log.error(e, e);
118
119 throw new RemoteException(e.getMessage());
120 }
121 }
122
123 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleSoap getRule(
124 long ruleId) throws RemoteException {
125 try {
126 com.liferay.portlet.mobiledevicerules.model.MDRRule returnValue = MDRRuleServiceUtil.getRule(ruleId);
127
128 return com.liferay.portlet.mobiledevicerules.model.MDRRuleSoap.toSoapModel(returnValue);
129 }
130 catch (Exception e) {
131 _log.error(e, e);
132
133 throw new RemoteException(e.getMessage());
134 }
135 }
136
137 public static com.liferay.portlet.mobiledevicerules.model.MDRRuleSoap updateRule(
138 long ruleId, java.lang.String[] nameMapLanguageIds,
139 java.lang.String[] nameMapValues,
140 java.lang.String[] descriptionMapLanguageIds,
141 java.lang.String[] descriptionMapValues, java.lang.String type,
142 java.lang.String typeSettings,
143 com.liferay.portal.service.ServiceContext serviceContext)
144 throws RemoteException {
145 try {
146 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
147 nameMapValues);
148 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
149 descriptionMapValues);
150
151 com.liferay.portlet.mobiledevicerules.model.MDRRule returnValue = MDRRuleServiceUtil.updateRule(ruleId,
152 nameMap, descriptionMap, type, typeSettings, serviceContext);
153
154 return com.liferay.portlet.mobiledevicerules.model.MDRRuleSoap.toSoapModel(returnValue);
155 }
156 catch (Exception e) {
157 _log.error(e, e);
158
159 throw new RemoteException(e.getMessage());
160 }
161 }
162
163 private static Log _log = LogFactoryUtil.getLog(MDRRuleServiceSoap.class);
164 }