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[] getStructures(
144 long groupId) throws RemoteException {
145 try {
146 java.util.List<com.liferay.portlet.journal.model.JournalStructure> returnValue =
147 JournalStructureServiceUtil.getStructures(groupId);
148
149 return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModels(returnValue);
150 }
151 catch (Exception e) {
152 _log.error(e, e);
153
154 throw new RemoteException(e.getMessage());
155 }
156 }
157
158 public static com.liferay.portlet.journal.model.JournalStructureSoap[] getStructures(
159 long[] groupIds) throws RemoteException {
160 try {
161 java.util.List<com.liferay.portlet.journal.model.JournalStructure> returnValue =
162 JournalStructureServiceUtil.getStructures(groupIds);
163
164 return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModels(returnValue);
165 }
166 catch (Exception e) {
167 _log.error(e, e);
168
169 throw new RemoteException(e.getMessage());
170 }
171 }
172
173 public static com.liferay.portlet.journal.model.JournalStructureSoap[] search(
174 long companyId, long[] groupIds, java.lang.String keywords, int start,
175 int end, com.liferay.portal.kernel.util.OrderByComparator obc)
176 throws RemoteException {
177 try {
178 java.util.List<com.liferay.portlet.journal.model.JournalStructure> returnValue =
179 JournalStructureServiceUtil.search(companyId, groupIds,
180 keywords, start, end, obc);
181
182 return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModels(returnValue);
183 }
184 catch (Exception e) {
185 _log.error(e, e);
186
187 throw new RemoteException(e.getMessage());
188 }
189 }
190
191 public static com.liferay.portlet.journal.model.JournalStructureSoap[] search(
192 long companyId, long[] groupIds, java.lang.String structureId,
193 java.lang.String name, java.lang.String description,
194 boolean andOperator, int start, int end,
195 com.liferay.portal.kernel.util.OrderByComparator obc)
196 throws RemoteException {
197 try {
198 java.util.List<com.liferay.portlet.journal.model.JournalStructure> returnValue =
199 JournalStructureServiceUtil.search(companyId, groupIds,
200 structureId, name, description, andOperator, start, end, obc);
201
202 return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModels(returnValue);
203 }
204 catch (Exception e) {
205 _log.error(e, e);
206
207 throw new RemoteException(e.getMessage());
208 }
209 }
210
211 public static int searchCount(long companyId, long[] groupIds,
212 java.lang.String keywords) throws RemoteException {
213 try {
214 int returnValue = JournalStructureServiceUtil.searchCount(companyId,
215 groupIds, keywords);
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 structureId, java.lang.String name,
228 java.lang.String description, boolean andOperator)
229 throws RemoteException {
230 try {
231 int returnValue = JournalStructureServiceUtil.searchCount(companyId,
232 groupIds, structureId, name, description, andOperator);
233
234 return returnValue;
235 }
236 catch (Exception e) {
237 _log.error(e, e);
238
239 throw new RemoteException(e.getMessage());
240 }
241 }
242
243 public static com.liferay.portlet.journal.model.JournalStructureSoap updateStructure(
244 long groupId, java.lang.String structureId,
245 java.lang.String parentStructureId,
246 java.lang.String[] nameMapLanguageIds,
247 java.lang.String[] nameMapValues,
248 java.lang.String[] descriptionMapLanguageIds,
249 java.lang.String[] descriptionMapValues, java.lang.String xsd,
250 com.liferay.portal.service.ServiceContext serviceContext)
251 throws RemoteException {
252 try {
253 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
254 nameMapValues);
255 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
256 descriptionMapValues);
257
258 com.liferay.portlet.journal.model.JournalStructure returnValue = JournalStructureServiceUtil.updateStructure(groupId,
259 structureId, parentStructureId, nameMap, descriptionMap,
260 xsd, serviceContext);
261
262 return com.liferay.portlet.journal.model.JournalStructureSoap.toSoapModel(returnValue);
263 }
264 catch (Exception e) {
265 _log.error(e, e);
266
267 throw new RemoteException(e.getMessage());
268 }
269 }
270
271 private static Log _log = LogFactoryUtil.getLog(JournalStructureServiceSoap.class);
272 }