1
22
23 package com.liferay.portlet.messageboards.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27
28 import com.liferay.portlet.messageboards.service.MBCategoryServiceUtil;
29
30 import java.rmi.RemoteException;
31
32
83 public class MBCategoryServiceSoap {
84 public static com.liferay.portlet.messageboards.model.MBCategorySoap addCategory(
85 long plid, long parentCategoryId, java.lang.String name,
86 java.lang.String description, java.lang.String[] communityPermissions,
87 java.lang.String[] guestPermissions) throws RemoteException {
88 try {
89 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.addCategory(plid,
90 parentCategoryId, name, description, communityPermissions,
91 guestPermissions);
92
93 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
94 }
95 catch (Exception e) {
96 _log.error(e, e);
97
98 throw new RemoteException(e.getMessage());
99 }
100 }
101
102 public static void deleteCategory(long categoryId)
103 throws RemoteException {
104 try {
105 MBCategoryServiceUtil.deleteCategory(categoryId);
106 }
107 catch (Exception e) {
108 _log.error(e, e);
109
110 throw new RemoteException(e.getMessage());
111 }
112 }
113
114 public static com.liferay.portlet.messageboards.model.MBCategorySoap getCategory(
115 long categoryId) throws RemoteException {
116 try {
117 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.getCategory(categoryId);
118
119 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
120 }
121 catch (Exception e) {
122 _log.error(e, e);
123
124 throw new RemoteException(e.getMessage());
125 }
126 }
127
128 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
129 long groupId, long parentCategoryId, int begin, int end)
130 throws RemoteException {
131 try {
132 java.util.List returnValue = MBCategoryServiceUtil.getCategories(groupId,
133 parentCategoryId, begin, end);
134
135 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
136 }
137 catch (Exception e) {
138 _log.error(e, e);
139
140 throw new RemoteException(e.getMessage());
141 }
142 }
143
144 public static int getCategoriesCount(long groupId, long parentCategoryId)
145 throws RemoteException {
146 try {
147 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
148 parentCategoryId);
149
150 return returnValue;
151 }
152 catch (Exception e) {
153 _log.error(e, e);
154
155 throw new RemoteException(e.getMessage());
156 }
157 }
158
159 public static void subscribeCategory(long categoryId)
160 throws RemoteException {
161 try {
162 MBCategoryServiceUtil.subscribeCategory(categoryId);
163 }
164 catch (Exception e) {
165 _log.error(e, e);
166
167 throw new RemoteException(e.getMessage());
168 }
169 }
170
171 public static void unsubscribeCategory(long categoryId)
172 throws RemoteException {
173 try {
174 MBCategoryServiceUtil.unsubscribeCategory(categoryId);
175 }
176 catch (Exception e) {
177 _log.error(e, e);
178
179 throw new RemoteException(e.getMessage());
180 }
181 }
182
183 public static com.liferay.portlet.messageboards.model.MBCategorySoap updateCategory(
184 long categoryId, long parentCategoryId, java.lang.String name,
185 java.lang.String description, boolean mergeWithParentCategory)
186 throws RemoteException {
187 try {
188 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.updateCategory(categoryId,
189 parentCategoryId, name, description, mergeWithParentCategory);
190
191 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
192 }
193 catch (Exception e) {
194 _log.error(e, e);
195
196 throw new RemoteException(e.getMessage());
197 }
198 }
199
200 private static Log _log = LogFactoryUtil.getLog(MBCategoryServiceSoap.class);
201 }