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.MDRActionServiceUtil;
022
023 import java.rmi.RemoteException;
024
025 import java.util.Locale;
026 import java.util.Map;
027
028
071 public class MDRActionServiceSoap {
072 public static com.liferay.portlet.mobiledevicerules.model.MDRActionSoap addAction(
073 long ruleGroupInstanceId, 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.MDRAction returnValue = MDRActionServiceUtil.addAction(ruleGroupInstanceId,
087 nameMap, descriptionMap, type, typeSettings, serviceContext);
088
089 return com.liferay.portlet.mobiledevicerules.model.MDRActionSoap.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 deleteAction(long actionId) throws RemoteException {
099 try {
100 MDRActionServiceUtil.deleteAction(actionId);
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.MDRActionSoap fetchAction(
110 long actionId) throws RemoteException {
111 try {
112 com.liferay.portlet.mobiledevicerules.model.MDRAction returnValue = MDRActionServiceUtil.fetchAction(actionId);
113
114 return com.liferay.portlet.mobiledevicerules.model.MDRActionSoap.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.MDRActionSoap getAction(
124 long actionId) throws RemoteException {
125 try {
126 com.liferay.portlet.mobiledevicerules.model.MDRAction returnValue = MDRActionServiceUtil.getAction(actionId);
127
128 return com.liferay.portlet.mobiledevicerules.model.MDRActionSoap.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.MDRActionSoap updateAction(
138 long actionId, 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.MDRAction returnValue = MDRActionServiceUtil.updateAction(actionId,
152 nameMap, descriptionMap, type, typeSettings, serviceContext);
153
154 return com.liferay.portlet.mobiledevicerules.model.MDRActionSoap.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(MDRActionServiceSoap.class);
164 }