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