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