001
014
015 package com.liferay.portlet.journal.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.util.LocalizationUtil;
022
023 import com.liferay.portlet.journal.service.JournalTemplateServiceUtil;
024
025 import java.rmi.RemoteException;
026
027 import java.util.Locale;
028 import java.util.Map;
029
030
061 @ProviderType
062 public class JournalTemplateServiceSoap {
063 public static com.liferay.portlet.journal.model.JournalTemplateSoap addTemplate(
064 long groupId, java.lang.String templateId, boolean autoTemplateId,
065 java.lang.String structureId, java.lang.String[] nameMapLanguageIds,
066 java.lang.String[] nameMapValues,
067 java.lang.String[] descriptionMapLanguageIds,
068 java.lang.String[] descriptionMapValues, java.lang.String xsl,
069 boolean formatXsl, java.lang.String langType, boolean cacheable,
070 com.liferay.portal.service.ServiceContext serviceContext)
071 throws RemoteException {
072 try {
073 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
074 nameMapValues);
075 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
076 descriptionMapValues);
077
078 com.liferay.portlet.journal.model.JournalTemplate returnValue = JournalTemplateServiceUtil.addTemplate(groupId,
079 templateId, autoTemplateId, structureId, nameMap,
080 descriptionMap, xsl, formatXsl, langType, cacheable,
081 serviceContext);
082
083 return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModel(returnValue);
084 }
085 catch (Exception e) {
086 _log.error(e, e);
087
088 throw new RemoteException(e.getMessage());
089 }
090 }
091
092 public static com.liferay.portlet.journal.model.JournalTemplateSoap copyTemplate(
093 long groupId, java.lang.String oldTemplateId,
094 java.lang.String newTemplateId, boolean autoTemplateId)
095 throws RemoteException {
096 try {
097 com.liferay.portlet.journal.model.JournalTemplate returnValue = JournalTemplateServiceUtil.copyTemplate(groupId,
098 oldTemplateId, newTemplateId, autoTemplateId);
099
100 return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModel(returnValue);
101 }
102 catch (Exception e) {
103 _log.error(e, e);
104
105 throw new RemoteException(e.getMessage());
106 }
107 }
108
109 public static void deleteTemplate(long groupId, java.lang.String templateId)
110 throws RemoteException {
111 try {
112 JournalTemplateServiceUtil.deleteTemplate(groupId, templateId);
113 }
114 catch (Exception e) {
115 _log.error(e, e);
116
117 throw new RemoteException(e.getMessage());
118 }
119 }
120
121 public static com.liferay.portlet.journal.model.JournalTemplateSoap[] getStructureTemplates(
122 long groupId, java.lang.String structureId) throws RemoteException {
123 try {
124 java.util.List<com.liferay.portlet.journal.model.JournalTemplate> returnValue =
125 JournalTemplateServiceUtil.getStructureTemplates(groupId,
126 structureId);
127
128 return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModels(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.journal.model.JournalTemplateSoap getTemplate(
138 long groupId, java.lang.String templateId) throws RemoteException {
139 try {
140 com.liferay.portlet.journal.model.JournalTemplate returnValue = JournalTemplateServiceUtil.getTemplate(groupId,
141 templateId);
142
143 return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModel(returnValue);
144 }
145 catch (Exception e) {
146 _log.error(e, e);
147
148 throw new RemoteException(e.getMessage());
149 }
150 }
151
152 public static com.liferay.portlet.journal.model.JournalTemplateSoap getTemplate(
153 long groupId, java.lang.String templateId,
154 boolean includeGlobalTemplates) throws RemoteException {
155 try {
156 com.liferay.portlet.journal.model.JournalTemplate returnValue = JournalTemplateServiceUtil.getTemplate(groupId,
157 templateId, includeGlobalTemplates);
158
159 return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModel(returnValue);
160 }
161 catch (Exception e) {
162 _log.error(e, e);
163
164 throw new RemoteException(e.getMessage());
165 }
166 }
167
168 public static com.liferay.portlet.journal.model.JournalTemplateSoap[] search(
169 long companyId, long[] groupIds, java.lang.String keywords,
170 java.lang.String structureId, java.lang.String structureIdComparator,
171 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
172 throws RemoteException {
173 try {
174 java.util.List<com.liferay.portlet.journal.model.JournalTemplate> returnValue =
175 JournalTemplateServiceUtil.search(companyId, groupIds,
176 keywords, structureId, structureIdComparator, start, end,
177 obc);
178
179 return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModels(returnValue);
180 }
181 catch (Exception e) {
182 _log.error(e, e);
183
184 throw new RemoteException(e.getMessage());
185 }
186 }
187
188 public static com.liferay.portlet.journal.model.JournalTemplateSoap[] search(
189 long companyId, long[] groupIds, java.lang.String templateId,
190 java.lang.String structureId, java.lang.String structureIdComparator,
191 java.lang.String name, java.lang.String description,
192 boolean andOperator, int start, int end,
193 com.liferay.portal.kernel.util.OrderByComparator obc)
194 throws RemoteException {
195 try {
196 java.util.List<com.liferay.portlet.journal.model.JournalTemplate> returnValue =
197 JournalTemplateServiceUtil.search(companyId, groupIds,
198 templateId, structureId, structureIdComparator, name,
199 description, andOperator, start, end, obc);
200
201 return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModels(returnValue);
202 }
203 catch (Exception e) {
204 _log.error(e, e);
205
206 throw new RemoteException(e.getMessage());
207 }
208 }
209
210 public static int searchCount(long companyId, long[] groupIds,
211 java.lang.String keywords, java.lang.String structureId,
212 java.lang.String structureIdComparator) throws RemoteException {
213 try {
214 int returnValue = JournalTemplateServiceUtil.searchCount(companyId,
215 groupIds, keywords, structureId, structureIdComparator);
216
217 return returnValue;
218 }
219 catch (Exception e) {
220 _log.error(e, e);
221
222 throw new RemoteException(e.getMessage());
223 }
224 }
225
226 public static int searchCount(long companyId, long[] groupIds,
227 java.lang.String templateId, java.lang.String structureId,
228 java.lang.String structureIdComparator, java.lang.String name,
229 java.lang.String description, boolean andOperator)
230 throws RemoteException {
231 try {
232 int returnValue = JournalTemplateServiceUtil.searchCount(companyId,
233 groupIds, templateId, structureId, structureIdComparator,
234 name, description, andOperator);
235
236 return returnValue;
237 }
238 catch (Exception e) {
239 _log.error(e, e);
240
241 throw new RemoteException(e.getMessage());
242 }
243 }
244
245 public static com.liferay.portlet.journal.model.JournalTemplateSoap updateTemplate(
246 long groupId, java.lang.String templateId,
247 java.lang.String structureId, java.lang.String[] nameMapLanguageIds,
248 java.lang.String[] nameMapValues,
249 java.lang.String[] descriptionMapLanguageIds,
250 java.lang.String[] descriptionMapValues, java.lang.String xsl,
251 boolean formatXsl, java.lang.String langType, boolean cacheable,
252 com.liferay.portal.service.ServiceContext serviceContext)
253 throws RemoteException {
254 try {
255 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
256 nameMapValues);
257 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
258 descriptionMapValues);
259
260 com.liferay.portlet.journal.model.JournalTemplate returnValue = JournalTemplateServiceUtil.updateTemplate(groupId,
261 templateId, structureId, nameMap, descriptionMap, xsl,
262 formatXsl, langType, cacheable, serviceContext);
263
264 return com.liferay.portlet.journal.model.JournalTemplateSoap.toSoapModel(returnValue);
265 }
266 catch (Exception e) {
267 _log.error(e, e);
268
269 throw new RemoteException(e.getMessage());
270 }
271 }
272
273 private static Log _log = LogFactoryUtil.getLog(JournalTemplateServiceSoap.class);
274 }