1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="ResourceLocalServiceUtil.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 ResourceLocalService} 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       ResourceLocalService
37   * @generated
38   */
39  public class ResourceLocalServiceUtil {
40      public static com.liferay.portal.model.Resource addResource(
41          com.liferay.portal.model.Resource resource)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addResource(resource);
44      }
45  
46      public static com.liferay.portal.model.Resource createResource(
47          long resourceId) {
48          return getService().createResource(resourceId);
49      }
50  
51      public static void deleteResource(long resourceId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteResource(resourceId);
55      }
56  
57      public static void deleteResource(
58          com.liferay.portal.model.Resource resource)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteResource(resource);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static com.liferay.portal.model.Resource getResource(long resourceId)
76          throws com.liferay.portal.kernel.exception.PortalException,
77              com.liferay.portal.kernel.exception.SystemException {
78          return getService().getResource(resourceId);
79      }
80  
81      public static java.util.List<com.liferay.portal.model.Resource> getResources(
82          int start, int end)
83          throws com.liferay.portal.kernel.exception.SystemException {
84          return getService().getResources(start, end);
85      }
86  
87      public static int getResourcesCount()
88          throws com.liferay.portal.kernel.exception.SystemException {
89          return getService().getResourcesCount();
90      }
91  
92      public static com.liferay.portal.model.Resource updateResource(
93          com.liferay.portal.model.Resource resource)
94          throws com.liferay.portal.kernel.exception.SystemException {
95          return getService().updateResource(resource);
96      }
97  
98      public static com.liferay.portal.model.Resource updateResource(
99          com.liferay.portal.model.Resource resource, boolean merge)
100         throws com.liferay.portal.kernel.exception.SystemException {
101         return getService().updateResource(resource, merge);
102     }
103 
104     public static void addModelResources(long companyId, long groupId,
105         long userId, java.lang.String name, long primKey,
106         java.lang.String[] communityPermissions,
107         java.lang.String[] guestPermissions)
108         throws com.liferay.portal.kernel.exception.PortalException,
109             com.liferay.portal.kernel.exception.SystemException {
110         getService()
111             .addModelResources(companyId, groupId, userId, name, primKey,
112             communityPermissions, guestPermissions);
113     }
114 
115     public static void addModelResources(long companyId, long groupId,
116         long userId, java.lang.String name, java.lang.String primKey,
117         java.lang.String[] communityPermissions,
118         java.lang.String[] guestPermissions)
119         throws com.liferay.portal.kernel.exception.PortalException,
120             com.liferay.portal.kernel.exception.SystemException {
121         getService()
122             .addModelResources(companyId, groupId, userId, name, primKey,
123             communityPermissions, guestPermissions);
124     }
125 
126     public static com.liferay.portal.model.Resource addResource(
127         long companyId, java.lang.String name, int scope,
128         java.lang.String primKey)
129         throws com.liferay.portal.kernel.exception.SystemException {
130         return getService().addResource(companyId, name, scope, primKey);
131     }
132 
133     public static void addResources(long companyId, long groupId,
134         java.lang.String name, boolean portletActions)
135         throws com.liferay.portal.kernel.exception.PortalException,
136             com.liferay.portal.kernel.exception.SystemException {
137         getService().addResources(companyId, groupId, name, portletActions);
138     }
139 
140     public static void addResources(long companyId, long groupId, long userId,
141         java.lang.String name, long primKey, boolean portletActions,
142         boolean addCommunityPermissions, boolean addGuestPermissions)
143         throws com.liferay.portal.kernel.exception.PortalException,
144             com.liferay.portal.kernel.exception.SystemException {
145         getService()
146             .addResources(companyId, groupId, userId, name, primKey,
147             portletActions, addCommunityPermissions, addGuestPermissions);
148     }
149 
150     public static void addResources(long companyId, long groupId, long userId,
151         java.lang.String name, java.lang.String primKey,
152         boolean portletActions, boolean addCommunityPermissions,
153         boolean addGuestPermissions)
154         throws com.liferay.portal.kernel.exception.PortalException,
155             com.liferay.portal.kernel.exception.SystemException {
156         getService()
157             .addResources(companyId, groupId, userId, name, primKey,
158             portletActions, addCommunityPermissions, addGuestPermissions);
159     }
160 
161     public static void deleteResource(long companyId, java.lang.String name,
162         int scope, long primKey)
163         throws com.liferay.portal.kernel.exception.PortalException,
164             com.liferay.portal.kernel.exception.SystemException {
165         getService().deleteResource(companyId, name, scope, primKey);
166     }
167 
168     public static void deleteResource(long companyId, java.lang.String name,
169         int scope, java.lang.String primKey)
170         throws com.liferay.portal.kernel.exception.PortalException,
171             com.liferay.portal.kernel.exception.SystemException {
172         getService().deleteResource(companyId, name, scope, primKey);
173     }
174 
175     public static void deleteResources(java.lang.String name)
176         throws com.liferay.portal.kernel.exception.SystemException {
177         getService().deleteResources(name);
178     }
179 
180     public static long getLatestResourceId()
181         throws com.liferay.portal.kernel.exception.SystemException {
182         return getService().getLatestResourceId();
183     }
184 
185     public static com.liferay.portal.model.Resource getResource(
186         long companyId, java.lang.String name, int scope,
187         java.lang.String primKey)
188         throws com.liferay.portal.kernel.exception.PortalException,
189             com.liferay.portal.kernel.exception.SystemException {
190         return getService().getResource(companyId, name, scope, primKey);
191     }
192 
193     public static java.util.List<com.liferay.portal.model.Resource> getResources()
194         throws com.liferay.portal.kernel.exception.SystemException {
195         return getService().getResources();
196     }
197 
198     public static void updateResources(long companyId, long groupId,
199         java.lang.String name, long primKey,
200         java.lang.String[] communityPermissions,
201         java.lang.String[] guestPermissions)
202         throws com.liferay.portal.kernel.exception.PortalException,
203             com.liferay.portal.kernel.exception.SystemException {
204         getService()
205             .updateResources(companyId, groupId, name, primKey,
206             communityPermissions, guestPermissions);
207     }
208 
209     public static void updateResources(long companyId, long groupId,
210         java.lang.String name, java.lang.String primKey,
211         java.lang.String[] communityPermissions,
212         java.lang.String[] guestPermissions)
213         throws com.liferay.portal.kernel.exception.PortalException,
214             com.liferay.portal.kernel.exception.SystemException {
215         getService()
216             .updateResources(companyId, groupId, name, primKey,
217             communityPermissions, guestPermissions);
218     }
219 
220     public static ResourceLocalService getService() {
221         if (_service == null) {
222             _service = (ResourceLocalService)PortalBeanLocatorUtil.locate(ResourceLocalService.class.getName());
223         }
224 
225         return _service;
226     }
227 
228     public void setService(ResourceLocalService service) {
229         _service = service;
230     }
231 
232     private static ResourceLocalService _service;
233 }