1
14
15 package com.liferay.portlet.messageboards.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19
20 import com.liferay.portlet.messageboards.service.MBCategoryServiceUtil;
21
22 import java.rmi.RemoteException;
23
24
74 public class MBCategoryServiceSoap {
75 public static com.liferay.portlet.messageboards.model.MBCategorySoap addCategory(
76 long parentCategoryId, java.lang.String name,
77 java.lang.String description, java.lang.String emailAddress,
78 java.lang.String inProtocol, java.lang.String inServerName,
79 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
80 java.lang.String inPassword, int inReadInterval,
81 java.lang.String outEmailAddress, boolean outCustom,
82 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
83 java.lang.String outUserName, java.lang.String outPassword,
84 boolean mailingListActive,
85 com.liferay.portal.service.ServiceContext serviceContext)
86 throws RemoteException {
87 try {
88 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.addCategory(parentCategoryId,
89 name, description, emailAddress, inProtocol, inServerName,
90 inServerPort, inUseSSL, inUserName, inPassword,
91 inReadInterval, outEmailAddress, outCustom, outServerName,
92 outServerPort, outUseSSL, outUserName, outPassword,
93 mailingListActive, serviceContext);
94
95 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
96 }
97 catch (Exception e) {
98 _log.error(e, e);
99
100 throw new RemoteException(e.getMessage());
101 }
102 }
103
104 public static void deleteCategory(long groupId, long categoryId)
105 throws RemoteException {
106 try {
107 MBCategoryServiceUtil.deleteCategory(groupId, categoryId);
108 }
109 catch (Exception e) {
110 _log.error(e, e);
111
112 throw new RemoteException(e.getMessage());
113 }
114 }
115
116 public static com.liferay.portlet.messageboards.model.MBCategorySoap getCategory(
117 long categoryId) throws RemoteException {
118 try {
119 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.getCategory(categoryId);
120
121 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
122 }
123 catch (Exception e) {
124 _log.error(e, e);
125
126 throw new RemoteException(e.getMessage());
127 }
128 }
129
130 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
131 long groupId, long parentCategoryId, int start, int end)
132 throws RemoteException {
133 try {
134 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
135 MBCategoryServiceUtil.getCategories(groupId, parentCategoryId,
136 start, end);
137
138 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
139 }
140 catch (Exception e) {
141 _log.error(e, e);
142
143 throw new RemoteException(e.getMessage());
144 }
145 }
146
147 public static int getCategoriesCount(long groupId, long parentCategoryId)
148 throws RemoteException {
149 try {
150 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
151 parentCategoryId);
152
153 return returnValue;
154 }
155 catch (Exception e) {
156 _log.error(e, e);
157
158 throw new RemoteException(e.getMessage());
159 }
160 }
161
162 public static void subscribeCategory(long groupId, long categoryId)
163 throws RemoteException {
164 try {
165 MBCategoryServiceUtil.subscribeCategory(groupId, categoryId);
166 }
167 catch (Exception e) {
168 _log.error(e, e);
169
170 throw new RemoteException(e.getMessage());
171 }
172 }
173
174 public static void unsubscribeCategory(long groupId, long categoryId)
175 throws RemoteException {
176 try {
177 MBCategoryServiceUtil.unsubscribeCategory(groupId, categoryId);
178 }
179 catch (Exception e) {
180 _log.error(e, e);
181
182 throw new RemoteException(e.getMessage());
183 }
184 }
185
186 public static com.liferay.portlet.messageboards.model.MBCategorySoap updateCategory(
187 long categoryId, long parentCategoryId, java.lang.String name,
188 java.lang.String description, java.lang.String emailAddress,
189 java.lang.String inProtocol, java.lang.String inServerName,
190 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
191 java.lang.String inPassword, int inReadInterval,
192 java.lang.String outEmailAddress, boolean outCustom,
193 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
194 java.lang.String outUserName, java.lang.String outPassword,
195 boolean mailingListActive, boolean mergeWithParentCategory,
196 com.liferay.portal.service.ServiceContext serviceContext)
197 throws RemoteException {
198 try {
199 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.updateCategory(categoryId,
200 parentCategoryId, name, description, emailAddress,
201 inProtocol, inServerName, inServerPort, inUseSSL,
202 inUserName, inPassword, inReadInterval, outEmailAddress,
203 outCustom, outServerName, outServerPort, outUseSSL,
204 outUserName, outPassword, mailingListActive,
205 mergeWithParentCategory, serviceContext);
206
207 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
208 }
209 catch (Exception e) {
210 _log.error(e, e);
211
212 throw new RemoteException(e.getMessage());
213 }
214 }
215
216 private static Log _log = LogFactoryUtil.getLog(MBCategoryServiceSoap.class);
217 }