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
070 public class MDRActionServiceSoap {
071 public static com.liferay.portlet.mobiledevicerules.model.MDRActionSoap addAction(
072 long ruleGroupInstanceId, java.lang.String[] nameMapLanguageIds,
073 java.lang.String[] nameMapValues,
074 java.lang.String[] descriptionMapLanguageIds,
075 java.lang.String[] descriptionMapValues, java.lang.String type,
076 java.lang.String typeSettings,
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.MDRAction returnValue = MDRActionServiceUtil.addAction(ruleGroupInstanceId,
086 nameMap, descriptionMap, type, typeSettings, serviceContext);
087
088 return com.liferay.portlet.mobiledevicerules.model.MDRActionSoap.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 void deleteAction(long actionId) throws RemoteException {
098 try {
099 MDRActionServiceUtil.deleteAction(actionId);
100 }
101 catch (Exception e) {
102 _log.error(e, e);
103
104 throw new RemoteException(e.getMessage());
105 }
106 }
107
108 public static com.liferay.portlet.mobiledevicerules.model.MDRActionSoap fetchAction(
109 long actionId) throws RemoteException {
110 try {
111 com.liferay.portlet.mobiledevicerules.model.MDRAction returnValue = MDRActionServiceUtil.fetchAction(actionId);
112
113 return com.liferay.portlet.mobiledevicerules.model.MDRActionSoap.toSoapModel(returnValue);
114 }
115 catch (Exception e) {
116 _log.error(e, e);
117
118 throw new RemoteException(e.getMessage());
119 }
120 }
121
122 public static com.liferay.portlet.mobiledevicerules.model.MDRActionSoap getAction(
123 long actionId) throws RemoteException {
124 try {
125 com.liferay.portlet.mobiledevicerules.model.MDRAction returnValue = MDRActionServiceUtil.getAction(actionId);
126
127 return com.liferay.portlet.mobiledevicerules.model.MDRActionSoap.toSoapModel(returnValue);
128 }
129 catch (Exception e) {
130 _log.error(e, e);
131
132 throw new RemoteException(e.getMessage());
133 }
134 }
135
136 public static com.liferay.portlet.mobiledevicerules.model.MDRActionSoap updateAction(
137 long actionId, java.lang.String[] nameMapLanguageIds,
138 java.lang.String[] nameMapValues,
139 java.lang.String[] descriptionMapLanguageIds,
140 java.lang.String[] descriptionMapValues, java.lang.String type,
141 java.lang.String typeSettings,
142 com.liferay.portal.service.ServiceContext serviceContext)
143 throws RemoteException {
144 try {
145 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
146 nameMapValues);
147 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
148 descriptionMapValues);
149
150 com.liferay.portlet.mobiledevicerules.model.MDRAction returnValue = MDRActionServiceUtil.updateAction(actionId,
151 nameMap, descriptionMap, type, typeSettings, serviceContext);
152
153 return com.liferay.portlet.mobiledevicerules.model.MDRActionSoap.toSoapModel(returnValue);
154 }
155 catch (Exception e) {
156 _log.error(e, e);
157
158 throw new RemoteException(e.getMessage());
159 }
160 }
161
162 private static Log _log = LogFactoryUtil.getLog(MDRActionServiceSoap.class);
163 }