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