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