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.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.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.PortalException,
53              com.liferay.portal.SystemException {
54          getService().deleteResource(resourceId);
55      }
56  
57      public static void deleteResource(
58          com.liferay.portal.model.Resource resource)
59          throws com.liferay.portal.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.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.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.PortalException,
77              com.liferay.portal.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) throws com.liferay.portal.SystemException {
83          return getService().getResources(start, end);
84      }
85  
86      public static int getResourcesCount()
87          throws com.liferay.portal.SystemException {
88          return getService().getResourcesCount();
89      }
90  
91      public static com.liferay.portal.model.Resource updateResource(
92          com.liferay.portal.model.Resource resource)
93          throws com.liferay.portal.SystemException {
94          return getService().updateResource(resource);
95      }
96  
97      public static com.liferay.portal.model.Resource updateResource(
98          com.liferay.portal.model.Resource resource, boolean merge)
99          throws com.liferay.portal.SystemException {
100         return getService().updateResource(resource, merge);
101     }
102 
103     public static void addModelResources(long companyId, long groupId,
104         long userId, java.lang.String name, long primKey,
105         java.lang.String[] communityPermissions,
106         java.lang.String[] guestPermissions)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException {
109         getService()
110             .addModelResources(companyId, groupId, userId, name, primKey,
111             communityPermissions, guestPermissions);
112     }
113 
114     public static void addModelResources(long companyId, long groupId,
115         long userId, java.lang.String name, java.lang.String primKey,
116         java.lang.String[] communityPermissions,
117         java.lang.String[] guestPermissions)
118         throws com.liferay.portal.PortalException,
119             com.liferay.portal.SystemException {
120         getService()
121             .addModelResources(companyId, groupId, userId, name, primKey,
122             communityPermissions, guestPermissions);
123     }
124 
125     public static com.liferay.portal.model.Resource addResource(
126         long companyId, java.lang.String name, int scope,
127         java.lang.String primKey) throws com.liferay.portal.SystemException {
128         return getService().addResource(companyId, name, scope, primKey);
129     }
130 
131     public static void addResources(long companyId, long groupId,
132         java.lang.String name, boolean portletActions)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         getService().addResources(companyId, groupId, name, portletActions);
136     }
137 
138     public static void addResources(long companyId, long groupId, long userId,
139         java.lang.String name, long primKey, boolean portletActions,
140         boolean addCommunityPermissions, boolean addGuestPermissions)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         getService()
144             .addResources(companyId, groupId, userId, name, primKey,
145             portletActions, addCommunityPermissions, addGuestPermissions);
146     }
147 
148     public static void addResources(long companyId, long groupId, long userId,
149         java.lang.String name, java.lang.String primKey,
150         boolean portletActions, boolean addCommunityPermissions,
151         boolean addGuestPermissions)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException {
154         getService()
155             .addResources(companyId, groupId, userId, name, primKey,
156             portletActions, addCommunityPermissions, addGuestPermissions);
157     }
158 
159     public static void deleteResource(long companyId, java.lang.String name,
160         int scope, long primKey)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException {
163         getService().deleteResource(companyId, name, scope, primKey);
164     }
165 
166     public static void deleteResource(long companyId, java.lang.String name,
167         int scope, java.lang.String primKey)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException {
170         getService().deleteResource(companyId, name, scope, primKey);
171     }
172 
173     public static void deleteResources(java.lang.String name)
174         throws com.liferay.portal.SystemException {
175         getService().deleteResources(name);
176     }
177 
178     public static long getLatestResourceId()
179         throws com.liferay.portal.SystemException {
180         return getService().getLatestResourceId();
181     }
182 
183     public static com.liferay.portal.model.Resource getResource(
184         long companyId, java.lang.String name, int scope,
185         java.lang.String primKey)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException {
188         return getService().getResource(companyId, name, scope, primKey);
189     }
190 
191     public static java.util.List<com.liferay.portal.model.Resource> getResources()
192         throws com.liferay.portal.SystemException {
193         return getService().getResources();
194     }
195 
196     public static void updateResources(long companyId, long groupId,
197         java.lang.String name, long primKey,
198         java.lang.String[] communityPermissions,
199         java.lang.String[] guestPermissions)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         getService()
203             .updateResources(companyId, groupId, name, primKey,
204             communityPermissions, guestPermissions);
205     }
206 
207     public static void updateResources(long companyId, long groupId,
208         java.lang.String name, java.lang.String primKey,
209         java.lang.String[] communityPermissions,
210         java.lang.String[] guestPermissions)
211         throws com.liferay.portal.PortalException,
212             com.liferay.portal.SystemException {
213         getService()
214             .updateResources(companyId, groupId, name, primKey,
215             communityPermissions, guestPermissions);
216     }
217 
218     public static ResourceLocalService getService() {
219         if (_service == null) {
220             _service = (ResourceLocalService)PortalBeanLocatorUtil.locate(ResourceLocalService.class.getName());
221         }
222 
223         return _service;
224     }
225 
226     public void setService(ResourceLocalService service) {
227         _service = service;
228     }
229 
230     private static ResourceLocalService _service;
231 }