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 categoryId)
105 throws RemoteException {
106 try {
107 MBCategoryServiceUtil.deleteCategory(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[] getCategories(
117 long groupId, long parentCategoryId, int start, int end)
118 throws RemoteException {
119 try {
120 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
121 MBCategoryServiceUtil.getCategories(groupId, parentCategoryId,
122 start, end);
123
124 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
125 }
126 catch (Exception e) {
127 _log.error(e, e);
128
129 throw new RemoteException(e.getMessage());
130 }
131 }
132
133 public static int getCategoriesCount(long groupId, long parentCategoryId)
134 throws RemoteException {
135 try {
136 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
137 parentCategoryId);
138
139 return returnValue;
140 }
141 catch (Exception e) {
142 _log.error(e, e);
143
144 throw new RemoteException(e.getMessage());
145 }
146 }
147
148 public static com.liferay.portlet.messageboards.model.MBCategorySoap getCategory(
149 long categoryId) throws RemoteException {
150 try {
151 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.getCategory(categoryId);
152
153 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(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 categoryId)
163 throws RemoteException {
164 try {
165 MBCategoryServiceUtil.subscribeCategory(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 categoryId)
175 throws RemoteException {
176 try {
177 MBCategoryServiceUtil.unsubscribeCategory(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 throws RemoteException {
197 try {
198 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.updateCategory(categoryId,
199 parentCategoryId, name, description, emailAddress,
200 inProtocol, inServerName, inServerPort, inUseSSL,
201 inUserName, inPassword, inReadInterval, outEmailAddress,
202 outCustom, outServerName, outServerPort, outUseSSL,
203 outUserName, outPassword, mailingListActive,
204 mergeWithParentCategory);
205
206 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
207 }
208 catch (Exception e) {
209 _log.error(e, e);
210
211 throw new RemoteException(e.getMessage());
212 }
213 }
214
215 private static Log _log = LogFactoryUtil.getLog(MBCategoryServiceSoap.class);
216 }