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