1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.blogs.service;
24  
25  /**
26   * <a href="BlogsCategoryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.blogs.service.BlogsCategoryLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.blogs.service.BlogsCategoryLocalServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.blogs.service.BlogsCategoryLocalService
48   * @see com.liferay.portlet.blogs.service.BlogsCategoryLocalServiceFactory
49   *
50   */
51  public class BlogsCategoryLocalServiceUtil {
52      public static com.liferay.portlet.blogs.model.BlogsCategory addBlogsCategory(
53          com.liferay.portlet.blogs.model.BlogsCategory model)
54          throws com.liferay.portal.SystemException {
55          BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
56  
57          return blogsCategoryLocalService.addBlogsCategory(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
64  
65          return blogsCategoryLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
72  
73          return blogsCategoryLocalService.dynamicQuery(queryInitializer, begin,
74              end);
75      }
76  
77      public static com.liferay.portlet.blogs.model.BlogsCategory updateBlogsCategory(
78          com.liferay.portlet.blogs.model.BlogsCategory model)
79          throws com.liferay.portal.SystemException {
80          BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
81  
82          return blogsCategoryLocalService.updateBlogsCategory(model);
83      }
84  
85      public static com.liferay.portlet.blogs.model.BlogsCategory addCategory(
86          long userId, long parentCategoryId, java.lang.String name,
87          java.lang.String description, boolean addCommunityPermissions,
88          boolean addGuestPermissions)
89          throws com.liferay.portal.PortalException, 
90              com.liferay.portal.SystemException {
91          BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
92  
93          return blogsCategoryLocalService.addCategory(userId, parentCategoryId,
94              name, description, addCommunityPermissions, addGuestPermissions);
95      }
96  
97      public static com.liferay.portlet.blogs.model.BlogsCategory addCategory(
98          long userId, long parentCategoryId, java.lang.String name,
99          java.lang.String description, java.lang.String[] communityPermissions,
100         java.lang.String[] guestPermissions)
101         throws com.liferay.portal.PortalException, 
102             com.liferay.portal.SystemException {
103         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
104 
105         return blogsCategoryLocalService.addCategory(userId, parentCategoryId,
106             name, description, communityPermissions, guestPermissions);
107     }
108 
109     public static com.liferay.portlet.blogs.model.BlogsCategory addCategory(
110         long userId, long parentCategoryId, java.lang.String name,
111         java.lang.String description,
112         java.lang.Boolean addCommunityPermissions,
113         java.lang.Boolean addGuestPermissions,
114         java.lang.String[] communityPermissions,
115         java.lang.String[] guestPermissions)
116         throws com.liferay.portal.PortalException, 
117             com.liferay.portal.SystemException {
118         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
119 
120         return blogsCategoryLocalService.addCategory(userId, parentCategoryId,
121             name, description, addCommunityPermissions, addGuestPermissions,
122             communityPermissions, guestPermissions);
123     }
124 
125     public static void addCategoryResources(long categoryId,
126         boolean addCommunityPermissions, boolean addGuestPermissions)
127         throws com.liferay.portal.PortalException, 
128             com.liferay.portal.SystemException {
129         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
130         blogsCategoryLocalService.addCategoryResources(categoryId,
131             addCommunityPermissions, addGuestPermissions);
132     }
133 
134     public static void addCategoryResources(
135         com.liferay.portlet.blogs.model.BlogsCategory category,
136         boolean addCommunityPermissions, boolean addGuestPermissions)
137         throws com.liferay.portal.PortalException, 
138             com.liferay.portal.SystemException {
139         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
140         blogsCategoryLocalService.addCategoryResources(category,
141             addCommunityPermissions, addGuestPermissions);
142     }
143 
144     public static void addCategoryResources(long categoryId,
145         java.lang.String[] communityPermissions,
146         java.lang.String[] guestPermissions)
147         throws com.liferay.portal.PortalException, 
148             com.liferay.portal.SystemException {
149         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
150         blogsCategoryLocalService.addCategoryResources(categoryId,
151             communityPermissions, guestPermissions);
152     }
153 
154     public static void addCategoryResources(
155         com.liferay.portlet.blogs.model.BlogsCategory category,
156         java.lang.String[] communityPermissions,
157         java.lang.String[] guestPermissions)
158         throws com.liferay.portal.PortalException, 
159             com.liferay.portal.SystemException {
160         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
161         blogsCategoryLocalService.addCategoryResources(category,
162             communityPermissions, guestPermissions);
163     }
164 
165     public static void deleteCategory(long categoryId)
166         throws com.liferay.portal.PortalException, 
167             com.liferay.portal.SystemException {
168         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
169         blogsCategoryLocalService.deleteCategory(categoryId);
170     }
171 
172     public static void deleteCategory(
173         com.liferay.portlet.blogs.model.BlogsCategory category)
174         throws com.liferay.portal.PortalException, 
175             com.liferay.portal.SystemException {
176         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
177         blogsCategoryLocalService.deleteCategory(category);
178     }
179 
180     public static java.util.List getCategories(long parentCategoryId,
181         int begin, int end) throws com.liferay.portal.SystemException {
182         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
183 
184         return blogsCategoryLocalService.getCategories(parentCategoryId, begin,
185             end);
186     }
187 
188     public static int getCategoriesCount(long parentCategoryId)
189         throws com.liferay.portal.SystemException {
190         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
191 
192         return blogsCategoryLocalService.getCategoriesCount(parentCategoryId);
193     }
194 
195     public static com.liferay.portlet.blogs.model.BlogsCategory getCategory(
196         long categoryId)
197         throws com.liferay.portal.PortalException, 
198             com.liferay.portal.SystemException {
199         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
200 
201         return blogsCategoryLocalService.getCategory(categoryId);
202     }
203 
204     public static void getSubcategoryIds(java.util.List categoryIds,
205         long categoryId) throws com.liferay.portal.SystemException {
206         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
207         blogsCategoryLocalService.getSubcategoryIds(categoryIds, categoryId);
208     }
209 
210     public static com.liferay.portlet.blogs.model.BlogsCategory updateCategory(
211         long categoryId, long parentCategoryId, java.lang.String name,
212         java.lang.String description)
213         throws com.liferay.portal.PortalException, 
214             com.liferay.portal.SystemException {
215         BlogsCategoryLocalService blogsCategoryLocalService = BlogsCategoryLocalServiceFactory.getService();
216 
217         return blogsCategoryLocalService.updateCategory(categoryId,
218             parentCategoryId, name, description);
219     }
220 }