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