1
22
23 package com.liferay.portal.service;
24
25
26
47 public class ResourceLocalServiceUtil {
48 public static com.liferay.portal.model.Resource addResource(
49 com.liferay.portal.model.Resource resource)
50 throws com.liferay.portal.SystemException {
51 return getService().addResource(resource);
52 }
53
54 public static com.liferay.portal.model.Resource createResource(
55 long resourceId) {
56 return getService().createResource(resourceId);
57 }
58
59 public static void deleteResource(long resourceId)
60 throws com.liferay.portal.PortalException,
61 com.liferay.portal.SystemException {
62 getService().deleteResource(resourceId);
63 }
64
65 public static void deleteResource(
66 com.liferay.portal.model.Resource resource)
67 throws com.liferay.portal.SystemException {
68 getService().deleteResource(resource);
69 }
70
71 public static java.util.List<Object> dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73 throws com.liferay.portal.SystemException {
74 return getService().dynamicQuery(dynamicQuery);
75 }
76
77 public static java.util.List<Object> dynamicQuery(
78 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79 int end) throws com.liferay.portal.SystemException {
80 return getService().dynamicQuery(dynamicQuery, start, end);
81 }
82
83 public static com.liferay.portal.model.Resource getResource(long resourceId)
84 throws com.liferay.portal.PortalException,
85 com.liferay.portal.SystemException {
86 return getService().getResource(resourceId);
87 }
88
89 public static java.util.List<com.liferay.portal.model.Resource> getResources(
90 int start, int end) throws com.liferay.portal.SystemException {
91 return getService().getResources(start, end);
92 }
93
94 public static int getResourcesCount()
95 throws com.liferay.portal.SystemException {
96 return getService().getResourcesCount();
97 }
98
99 public static com.liferay.portal.model.Resource updateResource(
100 com.liferay.portal.model.Resource resource)
101 throws com.liferay.portal.SystemException {
102 return getService().updateResource(resource);
103 }
104
105 public static com.liferay.portal.model.Resource updateResource(
106 com.liferay.portal.model.Resource resource, boolean merge)
107 throws com.liferay.portal.SystemException {
108 return getService().updateResource(resource, merge);
109 }
110
111 public static void addModelResources(long companyId, long groupId,
112 long userId, java.lang.String name, long primKey,
113 java.lang.String[] communityPermissions,
114 java.lang.String[] guestPermissions)
115 throws com.liferay.portal.PortalException,
116 com.liferay.portal.SystemException {
117 getService()
118 .addModelResources(companyId, groupId, userId, name, primKey,
119 communityPermissions, guestPermissions);
120 }
121
122 public static void addModelResources(long companyId, long groupId,
123 long userId, java.lang.String name, java.lang.String primKey,
124 java.lang.String[] communityPermissions,
125 java.lang.String[] guestPermissions)
126 throws com.liferay.portal.PortalException,
127 com.liferay.portal.SystemException {
128 getService()
129 .addModelResources(companyId, groupId, userId, name, primKey,
130 communityPermissions, guestPermissions);
131 }
132
133 public static com.liferay.portal.model.Resource addResource(
134 long companyId, java.lang.String name, int scope,
135 java.lang.String primKey) throws com.liferay.portal.SystemException {
136 return getService().addResource(companyId, name, scope, primKey);
137 }
138
139 public static void addResources(long companyId, long groupId,
140 java.lang.String name, boolean portletActions)
141 throws com.liferay.portal.PortalException,
142 com.liferay.portal.SystemException {
143 getService().addResources(companyId, groupId, name, portletActions);
144 }
145
146 public static void addResources(long companyId, long groupId, long userId,
147 java.lang.String name, long primKey, boolean portletActions,
148 boolean addCommunityPermissions, boolean addGuestPermissions)
149 throws com.liferay.portal.PortalException,
150 com.liferay.portal.SystemException {
151 getService()
152 .addResources(companyId, groupId, userId, name, primKey,
153 portletActions, addCommunityPermissions, addGuestPermissions);
154 }
155
156 public static void addResources(long companyId, long groupId, long userId,
157 java.lang.String name, java.lang.String primKey,
158 boolean portletActions, boolean addCommunityPermissions,
159 boolean addGuestPermissions)
160 throws com.liferay.portal.PortalException,
161 com.liferay.portal.SystemException {
162 getService()
163 .addResources(companyId, groupId, userId, name, primKey,
164 portletActions, addCommunityPermissions, addGuestPermissions);
165 }
166
167 public static void deleteResource(long companyId, java.lang.String name,
168 int scope, long primKey)
169 throws com.liferay.portal.PortalException,
170 com.liferay.portal.SystemException {
171 getService().deleteResource(companyId, name, scope, primKey);
172 }
173
174 public static void deleteResource(long companyId, java.lang.String name,
175 int scope, java.lang.String 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 deleteResources(java.lang.String name)
182 throws com.liferay.portal.SystemException {
183 getService().deleteResources(name);
184 }
185
186 public static long getLatestResourceId()
187 throws com.liferay.portal.SystemException {
188 return getService().getLatestResourceId();
189 }
190
191 public static com.liferay.portal.model.Resource getResource(
192 long companyId, java.lang.String name, int scope,
193 java.lang.String primKey)
194 throws com.liferay.portal.PortalException,
195 com.liferay.portal.SystemException {
196 return getService().getResource(companyId, name, scope, primKey);
197 }
198
199 public static java.util.List<com.liferay.portal.model.Resource> getResources()
200 throws com.liferay.portal.SystemException {
201 return getService().getResources();
202 }
203
204 public static void updateResources(long companyId, long groupId,
205 java.lang.String name, long primKey,
206 java.lang.String[] communityPermissions,
207 java.lang.String[] guestPermissions)
208 throws com.liferay.portal.PortalException,
209 com.liferay.portal.SystemException {
210 getService()
211 .updateResources(companyId, groupId, name, primKey,
212 communityPermissions, guestPermissions);
213 }
214
215 public static void updateResources(long companyId, long groupId,
216 java.lang.String name, java.lang.String primKey,
217 java.lang.String[] communityPermissions,
218 java.lang.String[] guestPermissions)
219 throws com.liferay.portal.PortalException,
220 com.liferay.portal.SystemException {
221 getService()
222 .updateResources(companyId, groupId, name, primKey,
223 communityPermissions, guestPermissions);
224 }
225
226 public static ResourceLocalService getService() {
227 if (_service == null) {
228 throw new RuntimeException("ResourceLocalService is not set");
229 }
230
231 return _service;
232 }
233
234 public void setService(ResourceLocalService service) {
235 _service = service;
236 }
237
238 private static ResourceLocalService _service;
239 }