001
014
015 package com.liferay.portal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.service.LayoutPrototypeServiceUtil;
022 import com.liferay.portal.kernel.util.LocalizationUtil;
023
024 import java.rmi.RemoteException;
025
026 import java.util.Locale;
027 import java.util.Map;
028
029
069 @ProviderType
070 public class LayoutPrototypeServiceSoap {
071 public static com.liferay.portal.kernel.model.LayoutPrototypeSoap addLayoutPrototype(
072 java.lang.String[] nameMapLanguageIds,
073 java.lang.String[] nameMapValues,
074 java.lang.String[] descriptionMapLanguageIds,
075 java.lang.String[] descriptionMapValues, boolean active,
076 com.liferay.portal.kernel.service.ServiceContext serviceContext)
077 throws RemoteException {
078 try {
079 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
080 nameMapValues);
081 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
082 descriptionMapValues);
083
084 com.liferay.portal.kernel.model.LayoutPrototype returnValue = LayoutPrototypeServiceUtil.addLayoutPrototype(nameMap,
085 descriptionMap, active, serviceContext);
086
087 return com.liferay.portal.kernel.model.LayoutPrototypeSoap.toSoapModel(returnValue);
088 }
089 catch (Exception e) {
090 _log.error(e, e);
091
092 throw new RemoteException(e.getMessage());
093 }
094 }
095
096
100 @Deprecated
101 public static com.liferay.portal.kernel.model.LayoutPrototypeSoap addLayoutPrototype(
102 java.lang.String[] nameMapLanguageIds,
103 java.lang.String[] nameMapValues, java.lang.String description,
104 boolean active,
105 com.liferay.portal.kernel.service.ServiceContext serviceContext)
106 throws RemoteException {
107 try {
108 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
109 nameMapValues);
110
111 com.liferay.portal.kernel.model.LayoutPrototype returnValue = LayoutPrototypeServiceUtil.addLayoutPrototype(nameMap,
112 description, active, serviceContext);
113
114 return com.liferay.portal.kernel.model.LayoutPrototypeSoap.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 void deleteLayoutPrototype(long layoutPrototypeId)
124 throws RemoteException {
125 try {
126 LayoutPrototypeServiceUtil.deleteLayoutPrototype(layoutPrototypeId);
127 }
128 catch (Exception e) {
129 _log.error(e, e);
130
131 throw new RemoteException(e.getMessage());
132 }
133 }
134
135 public static com.liferay.portal.kernel.model.LayoutPrototypeSoap fetchLayoutPrototype(
136 long layoutPrototypeId) throws RemoteException {
137 try {
138 com.liferay.portal.kernel.model.LayoutPrototype returnValue = LayoutPrototypeServiceUtil.fetchLayoutPrototype(layoutPrototypeId);
139
140 return com.liferay.portal.kernel.model.LayoutPrototypeSoap.toSoapModel(returnValue);
141 }
142 catch (Exception e) {
143 _log.error(e, e);
144
145 throw new RemoteException(e.getMessage());
146 }
147 }
148
149 public static com.liferay.portal.kernel.model.LayoutPrototypeSoap getLayoutPrototype(
150 long layoutPrototypeId) throws RemoteException {
151 try {
152 com.liferay.portal.kernel.model.LayoutPrototype returnValue = LayoutPrototypeServiceUtil.getLayoutPrototype(layoutPrototypeId);
153
154 return com.liferay.portal.kernel.model.LayoutPrototypeSoap.toSoapModel(returnValue);
155 }
156 catch (Exception e) {
157 _log.error(e, e);
158
159 throw new RemoteException(e.getMessage());
160 }
161 }
162
163 public static com.liferay.portal.kernel.model.LayoutPrototypeSoap[] search(
164 long companyId, java.lang.Boolean active,
165 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.LayoutPrototype> obc)
166 throws RemoteException {
167 try {
168 java.util.List<com.liferay.portal.kernel.model.LayoutPrototype> returnValue =
169 LayoutPrototypeServiceUtil.search(companyId, active, obc);
170
171 return com.liferay.portal.kernel.model.LayoutPrototypeSoap.toSoapModels(returnValue);
172 }
173 catch (Exception e) {
174 _log.error(e, e);
175
176 throw new RemoteException(e.getMessage());
177 }
178 }
179
180 public static com.liferay.portal.kernel.model.LayoutPrototypeSoap updateLayoutPrototype(
181 long layoutPrototypeId, java.lang.String[] nameMapLanguageIds,
182 java.lang.String[] nameMapValues,
183 java.lang.String[] descriptionMapLanguageIds,
184 java.lang.String[] descriptionMapValues, boolean active,
185 com.liferay.portal.kernel.service.ServiceContext serviceContext)
186 throws RemoteException {
187 try {
188 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
189 nameMapValues);
190 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
191 descriptionMapValues);
192
193 com.liferay.portal.kernel.model.LayoutPrototype returnValue = LayoutPrototypeServiceUtil.updateLayoutPrototype(layoutPrototypeId,
194 nameMap, descriptionMap, active, serviceContext);
195
196 return com.liferay.portal.kernel.model.LayoutPrototypeSoap.toSoapModel(returnValue);
197 }
198 catch (Exception e) {
199 _log.error(e, e);
200
201 throw new RemoteException(e.getMessage());
202 }
203 }
204
205
209 @Deprecated
210 public static com.liferay.portal.kernel.model.LayoutPrototypeSoap updateLayoutPrototype(
211 long layoutPrototypeId, java.lang.String[] nameMapLanguageIds,
212 java.lang.String[] nameMapValues, java.lang.String description,
213 boolean active,
214 com.liferay.portal.kernel.service.ServiceContext serviceContext)
215 throws RemoteException {
216 try {
217 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
218 nameMapValues);
219
220 com.liferay.portal.kernel.model.LayoutPrototype returnValue = LayoutPrototypeServiceUtil.updateLayoutPrototype(layoutPrototypeId,
221 nameMap, description, active, serviceContext);
222
223 return com.liferay.portal.kernel.model.LayoutPrototypeSoap.toSoapModel(returnValue);
224 }
225 catch (Exception e) {
226 _log.error(e, e);
227
228 throw new RemoteException(e.getMessage());
229 }
230 }
231
232 private static Log _log = LogFactoryUtil.getLog(LayoutPrototypeServiceSoap.class);
233 }