001
014
015 package com.liferay.portal.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 import com.liferay.portal.service.LayoutPrototypeServiceUtil;
021
022 import java.rmi.RemoteException;
023
024 import java.util.Locale;
025 import java.util.Map;
026
027
070 public class LayoutPrototypeServiceSoap {
071 public static com.liferay.portal.model.LayoutPrototypeSoap addLayoutPrototype(
072 java.lang.String[] nameMapLanguageIds,
073 java.lang.String[] nameMapValues, java.lang.String description,
074 boolean active) throws RemoteException {
075 try {
076 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
077 nameMapValues);
078
079 com.liferay.portal.model.LayoutPrototype returnValue = LayoutPrototypeServiceUtil.addLayoutPrototype(nameMap,
080 description, active);
081
082 return com.liferay.portal.model.LayoutPrototypeSoap.toSoapModel(returnValue);
083 }
084 catch (Exception e) {
085 _log.error(e, e);
086
087 throw new RemoteException(e.getMessage());
088 }
089 }
090
091 public static void deleteLayoutPrototype(long layoutPrototypeId)
092 throws RemoteException {
093 try {
094 LayoutPrototypeServiceUtil.deleteLayoutPrototype(layoutPrototypeId);
095 }
096 catch (Exception e) {
097 _log.error(e, e);
098
099 throw new RemoteException(e.getMessage());
100 }
101 }
102
103 public static com.liferay.portal.model.LayoutPrototypeSoap getLayoutPrototype(
104 long layoutPrototypeId) throws RemoteException {
105 try {
106 com.liferay.portal.model.LayoutPrototype returnValue = LayoutPrototypeServiceUtil.getLayoutPrototype(layoutPrototypeId);
107
108 return com.liferay.portal.model.LayoutPrototypeSoap.toSoapModel(returnValue);
109 }
110 catch (Exception e) {
111 _log.error(e, e);
112
113 throw new RemoteException(e.getMessage());
114 }
115 }
116
117 public static com.liferay.portal.model.LayoutPrototypeSoap[] search(
118 long companyId, java.lang.Boolean active,
119 com.liferay.portal.kernel.util.OrderByComparator obc)
120 throws RemoteException {
121 try {
122 java.util.List<com.liferay.portal.model.LayoutPrototype> returnValue =
123 LayoutPrototypeServiceUtil.search(companyId, active, obc);
124
125 return com.liferay.portal.model.LayoutPrototypeSoap.toSoapModels(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.portal.model.LayoutPrototypeSoap updateLayoutPrototype(
135 long layoutPrototypeId, java.lang.String[] nameMapLanguageIds,
136 java.lang.String[] nameMapValues, java.lang.String description,
137 boolean active) throws RemoteException {
138 try {
139 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
140 nameMapValues);
141
142 com.liferay.portal.model.LayoutPrototype returnValue = LayoutPrototypeServiceUtil.updateLayoutPrototype(layoutPrototypeId,
143 nameMap, description, active);
144
145 return com.liferay.portal.model.LayoutPrototypeSoap.toSoapModel(returnValue);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 private static Log _log = LogFactoryUtil.getLog(LayoutPrototypeServiceSoap.class);
155 }