001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class ResourceLocalServiceUtil {
033 public static com.liferay.portal.model.Resource addResource(
034 com.liferay.portal.model.Resource resource)
035 throws com.liferay.portal.kernel.exception.SystemException {
036 return getService().addResource(resource);
037 }
038
039 public static com.liferay.portal.model.Resource createResource(
040 long resourceId) {
041 return getService().createResource(resourceId);
042 }
043
044 public static void deleteResource(long resourceId)
045 throws com.liferay.portal.kernel.exception.PortalException,
046 com.liferay.portal.kernel.exception.SystemException {
047 getService().deleteResource(resourceId);
048 }
049
050 public static void deleteResource(
051 com.liferay.portal.model.Resource resource)
052 throws com.liferay.portal.kernel.exception.SystemException {
053 getService().deleteResource(resource);
054 }
055
056 @SuppressWarnings("unchecked")
057 public static java.util.List dynamicQuery(
058 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059 throws com.liferay.portal.kernel.exception.SystemException {
060 return getService().dynamicQuery(dynamicQuery);
061 }
062
063 @SuppressWarnings("unchecked")
064 public static java.util.List dynamicQuery(
065 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066 int end) throws com.liferay.portal.kernel.exception.SystemException {
067 return getService().dynamicQuery(dynamicQuery, start, end);
068 }
069
070 @SuppressWarnings("unchecked")
071 public static java.util.List dynamicQuery(
072 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073 int end,
074 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075 throws com.liferay.portal.kernel.exception.SystemException {
076 return getService()
077 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078 }
079
080 public static long dynamicQueryCount(
081 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082 throws com.liferay.portal.kernel.exception.SystemException {
083 return getService().dynamicQueryCount(dynamicQuery);
084 }
085
086 public static com.liferay.portal.model.Resource getResource(long resourceId)
087 throws com.liferay.portal.kernel.exception.PortalException,
088 com.liferay.portal.kernel.exception.SystemException {
089 return getService().getResource(resourceId);
090 }
091
092 public static java.util.List<com.liferay.portal.model.Resource> getResources(
093 int start, int end)
094 throws com.liferay.portal.kernel.exception.SystemException {
095 return getService().getResources(start, end);
096 }
097
098 public static int getResourcesCount()
099 throws com.liferay.portal.kernel.exception.SystemException {
100 return getService().getResourcesCount();
101 }
102
103 public static com.liferay.portal.model.Resource updateResource(
104 com.liferay.portal.model.Resource resource)
105 throws com.liferay.portal.kernel.exception.SystemException {
106 return getService().updateResource(resource);
107 }
108
109 public static com.liferay.portal.model.Resource updateResource(
110 com.liferay.portal.model.Resource resource, boolean merge)
111 throws com.liferay.portal.kernel.exception.SystemException {
112 return getService().updateResource(resource, merge);
113 }
114
115 public static void addModelResources(long companyId, long groupId,
116 long userId, java.lang.String name, long 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 void addModelResources(long companyId, long groupId,
127 long userId, java.lang.String name, java.lang.String primKey,
128 java.lang.String[] communityPermissions,
129 java.lang.String[] guestPermissions)
130 throws com.liferay.portal.kernel.exception.PortalException,
131 com.liferay.portal.kernel.exception.SystemException {
132 getService()
133 .addModelResources(companyId, groupId, userId, name, primKey,
134 communityPermissions, guestPermissions);
135 }
136
137 public static com.liferay.portal.model.Resource addResource(
138 long companyId, java.lang.String name, int scope,
139 java.lang.String primKey)
140 throws com.liferay.portal.kernel.exception.SystemException {
141 return getService().addResource(companyId, name, scope, primKey);
142 }
143
144 public static void addResources(long companyId, long groupId,
145 java.lang.String name, boolean portletActions)
146 throws com.liferay.portal.kernel.exception.PortalException,
147 com.liferay.portal.kernel.exception.SystemException {
148 getService().addResources(companyId, groupId, name, portletActions);
149 }
150
151 public static void addResources(long companyId, long groupId, long userId,
152 java.lang.String name, long primKey, boolean portletActions,
153 boolean addCommunityPermissions, 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 addResources(long companyId, long groupId, long userId,
162 java.lang.String name, java.lang.String primKey,
163 boolean portletActions, boolean addCommunityPermissions,
164 boolean addGuestPermissions)
165 throws com.liferay.portal.kernel.exception.PortalException,
166 com.liferay.portal.kernel.exception.SystemException {
167 getService()
168 .addResources(companyId, groupId, userId, name, primKey,
169 portletActions, addCommunityPermissions, addGuestPermissions);
170 }
171
172 public static void deleteResource(long companyId, java.lang.String name,
173 int scope, long primKey)
174 throws com.liferay.portal.kernel.exception.PortalException,
175 com.liferay.portal.kernel.exception.SystemException {
176 getService().deleteResource(companyId, name, scope, primKey);
177 }
178
179 public static void deleteResource(long companyId, java.lang.String name,
180 int scope, java.lang.String primKey)
181 throws com.liferay.portal.kernel.exception.PortalException,
182 com.liferay.portal.kernel.exception.SystemException {
183 getService().deleteResource(companyId, name, scope, primKey);
184 }
185
186 public static void deleteResources(java.lang.String name)
187 throws com.liferay.portal.kernel.exception.SystemException {
188 getService().deleteResources(name);
189 }
190
191 public static long getLatestResourceId()
192 throws com.liferay.portal.kernel.exception.SystemException {
193 return getService().getLatestResourceId();
194 }
195
196 public static com.liferay.portal.model.Resource getResource(
197 long companyId, java.lang.String name, int scope,
198 java.lang.String primKey)
199 throws com.liferay.portal.kernel.exception.PortalException,
200 com.liferay.portal.kernel.exception.SystemException {
201 return getService().getResource(companyId, name, scope, primKey);
202 }
203
204 public static java.util.List<com.liferay.portal.model.Resource> getResources()
205 throws com.liferay.portal.kernel.exception.SystemException {
206 return getService().getResources();
207 }
208
209 public static void updateResources(long companyId, java.lang.String name,
210 int scope, java.lang.String primKey, java.lang.String newPrimKey)
211 throws com.liferay.portal.kernel.exception.PortalException,
212 com.liferay.portal.kernel.exception.SystemException {
213 getService().updateResources(companyId, name, scope, primKey, newPrimKey);
214 }
215
216 public static void updateResources(long companyId, long groupId,
217 java.lang.String name, long primKey,
218 java.lang.String[] communityPermissions,
219 java.lang.String[] guestPermissions)
220 throws com.liferay.portal.kernel.exception.PortalException,
221 com.liferay.portal.kernel.exception.SystemException {
222 getService()
223 .updateResources(companyId, groupId, name, primKey,
224 communityPermissions, guestPermissions);
225 }
226
227 public static void updateResources(long companyId, long groupId,
228 java.lang.String name, java.lang.String primKey,
229 java.lang.String[] communityPermissions,
230 java.lang.String[] guestPermissions)
231 throws com.liferay.portal.kernel.exception.PortalException,
232 com.liferay.portal.kernel.exception.SystemException {
233 getService()
234 .updateResources(companyId, groupId, name, primKey,
235 communityPermissions, guestPermissions);
236 }
237
238 public static ResourceLocalService getService() {
239 if (_service == null) {
240 _service = (ResourceLocalService)PortalBeanLocatorUtil.locate(ResourceLocalService.class.getName());
241 }
242
243 return _service;
244 }
245
246 public void setService(ResourceLocalService service) {
247 _service = service;
248 }
249
250 private static ResourceLocalService _service;
251 }