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