001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.messageboards.service;
022:
023: /**
024: * <a href="MBCategoryServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.messageboards.service.MBCategoryService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.messageboards.service.MBCategoryServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.messageboards.service.MBCategoryService
047: * @see com.liferay.portlet.messageboards.service.MBCategoryServiceFactory
048: *
049: */
050: public class MBCategoryServiceUtil {
051: public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
052: long plid, long parentCategoryId, java.lang.String name,
053: java.lang.String description,
054: java.lang.String[] communityPermissions,
055: java.lang.String[] guestPermissions)
056: throws com.liferay.portal.PortalException,
057: com.liferay.portal.SystemException,
058: java.rmi.RemoteException {
059: MBCategoryService mbCategoryService = MBCategoryServiceFactory
060: .getService();
061:
062: return mbCategoryService.addCategory(plid, parentCategoryId,
063: name, description, communityPermissions,
064: guestPermissions);
065: }
066:
067: public static void deleteCategory(long categoryId)
068: throws com.liferay.portal.PortalException,
069: com.liferay.portal.SystemException,
070: java.rmi.RemoteException {
071: MBCategoryService mbCategoryService = MBCategoryServiceFactory
072: .getService();
073:
074: mbCategoryService.deleteCategory(categoryId);
075: }
076:
077: public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
078: long categoryId) throws com.liferay.portal.PortalException,
079: com.liferay.portal.SystemException,
080: java.rmi.RemoteException {
081: MBCategoryService mbCategoryService = MBCategoryServiceFactory
082: .getService();
083:
084: return mbCategoryService.getCategory(categoryId);
085: }
086:
087: public static java.util.List getCategories(long groupId,
088: long parentCategoryId, int begin, int end)
089: throws com.liferay.portal.PortalException,
090: com.liferay.portal.SystemException,
091: java.rmi.RemoteException {
092: MBCategoryService mbCategoryService = MBCategoryServiceFactory
093: .getService();
094:
095: return mbCategoryService.getCategories(groupId,
096: parentCategoryId, begin, end);
097: }
098:
099: public static int getCategoriesCount(long groupId,
100: long parentCategoryId)
101: throws com.liferay.portal.SystemException,
102: java.rmi.RemoteException {
103: MBCategoryService mbCategoryService = MBCategoryServiceFactory
104: .getService();
105:
106: return mbCategoryService.getCategoriesCount(groupId,
107: parentCategoryId);
108: }
109:
110: public static void subscribeCategory(long categoryId)
111: throws com.liferay.portal.PortalException,
112: com.liferay.portal.SystemException,
113: java.rmi.RemoteException {
114: MBCategoryService mbCategoryService = MBCategoryServiceFactory
115: .getService();
116:
117: mbCategoryService.subscribeCategory(categoryId);
118: }
119:
120: public static void unsubscribeCategory(long categoryId)
121: throws com.liferay.portal.PortalException,
122: com.liferay.portal.SystemException,
123: java.rmi.RemoteException {
124: MBCategoryService mbCategoryService = MBCategoryServiceFactory
125: .getService();
126:
127: mbCategoryService.unsubscribeCategory(categoryId);
128: }
129:
130: public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
131: long categoryId, long parentCategoryId,
132: java.lang.String name, java.lang.String description,
133: boolean mergeWithParentCategory)
134: throws com.liferay.portal.PortalException,
135: com.liferay.portal.SystemException,
136: java.rmi.RemoteException {
137: MBCategoryService mbCategoryService = MBCategoryServiceFactory
138: .getService();
139:
140: return mbCategoryService.updateCategory(categoryId,
141: parentCategoryId, name, description,
142: mergeWithParentCategory);
143: }
144: }
|