1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portlet.shopping.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="ShoppingCategoryServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link ShoppingCategoryService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       ShoppingCategoryService
37   * @generated
38   */
39  public class ShoppingCategoryServiceUtil {
40      public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
41          long plid, long parentCategoryId, java.lang.String name,
42          java.lang.String description, boolean addCommunityPermissions,
43          boolean addGuestPermissions)
44          throws com.liferay.portal.PortalException,
45              com.liferay.portal.SystemException, java.rmi.RemoteException {
46          return getService()
47                     .addCategory(plid, parentCategoryId, name, description,
48              addCommunityPermissions, addGuestPermissions);
49      }
50  
51      public static com.liferay.portlet.shopping.model.ShoppingCategory addCategory(
52          long plid, long parentCategoryId, java.lang.String name,
53          java.lang.String description, java.lang.String[] communityPermissions,
54          java.lang.String[] guestPermissions)
55          throws com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException, java.rmi.RemoteException {
57          return getService()
58                     .addCategory(plid, parentCategoryId, name, description,
59              communityPermissions, guestPermissions);
60      }
61  
62      public static void deleteCategory(long categoryId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException, java.rmi.RemoteException {
65          getService().deleteCategory(categoryId);
66      }
67  
68      public static com.liferay.portlet.shopping.model.ShoppingCategory getCategory(
69          long categoryId)
70          throws com.liferay.portal.PortalException,
71              com.liferay.portal.SystemException, java.rmi.RemoteException {
72          return getService().getCategory(categoryId);
73      }
74  
75      public static com.liferay.portlet.shopping.model.ShoppingCategory updateCategory(
76          long categoryId, long parentCategoryId, java.lang.String name,
77          java.lang.String description, boolean mergeWithParentCategory)
78          throws com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException, java.rmi.RemoteException {
80          return getService()
81                     .updateCategory(categoryId, parentCategoryId, name,
82              description, mergeWithParentCategory);
83      }
84  
85      public static ShoppingCategoryService getService() {
86          if (_service == null) {
87              _service = (ShoppingCategoryService)PortalBeanLocatorUtil.locate(ShoppingCategoryService.class.getName());
88          }
89  
90          return _service;
91      }
92  
93      public void setService(ShoppingCategoryService service) {
94          _service = service;
95      }
96  
97      private static ShoppingCategoryService _service;
98  }