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