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