001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.util.ReferenceRegistry; 019 020 /** 021 * The utility for the resource block permission local service. This utility wraps {@link com.liferay.portal.service.impl.ResourceBlockPermissionLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server. 022 * 023 * <p> 024 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. 025 * </p> 026 * 027 * @author Brian Wing Shun Chan 028 * @see ResourceBlockPermissionLocalService 029 * @see com.liferay.portal.service.base.ResourceBlockPermissionLocalServiceBaseImpl 030 * @see com.liferay.portal.service.impl.ResourceBlockPermissionLocalServiceImpl 031 * @generated 032 */ 033 public class ResourceBlockPermissionLocalServiceUtil { 034 /* 035 * NOTE FOR DEVELOPERS: 036 * 037 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ResourceBlockPermissionLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 038 */ 039 040 /** 041 * Adds the resource block permission to the database. Also notifies the appropriate model listeners. 042 * 043 * @param resourceBlockPermission the resource block permission 044 * @return the resource block permission that was added 045 * @throws SystemException if a system exception occurred 046 */ 047 public static com.liferay.portal.model.ResourceBlockPermission addResourceBlockPermission( 048 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission) 049 throws com.liferay.portal.kernel.exception.SystemException { 050 return getService().addResourceBlockPermission(resourceBlockPermission); 051 } 052 053 /** 054 * Creates a new resource block permission with the primary key. Does not add the resource block permission to the database. 055 * 056 * @param resourceBlockPermissionId the primary key for the new resource block permission 057 * @return the new resource block permission 058 */ 059 public static com.liferay.portal.model.ResourceBlockPermission createResourceBlockPermission( 060 long resourceBlockPermissionId) { 061 return getService() 062 .createResourceBlockPermission(resourceBlockPermissionId); 063 } 064 065 /** 066 * Deletes the resource block permission with the primary key from the database. Also notifies the appropriate model listeners. 067 * 068 * @param resourceBlockPermissionId the primary key of the resource block permission 069 * @return the resource block permission that was removed 070 * @throws PortalException if a resource block permission with the primary key could not be found 071 * @throws SystemException if a system exception occurred 072 */ 073 public static com.liferay.portal.model.ResourceBlockPermission deleteResourceBlockPermission( 074 long resourceBlockPermissionId) 075 throws com.liferay.portal.kernel.exception.PortalException, 076 com.liferay.portal.kernel.exception.SystemException { 077 return getService() 078 .deleteResourceBlockPermission(resourceBlockPermissionId); 079 } 080 081 /** 082 * Deletes the resource block permission from the database. Also notifies the appropriate model listeners. 083 * 084 * @param resourceBlockPermission the resource block permission 085 * @return the resource block permission that was removed 086 * @throws SystemException if a system exception occurred 087 */ 088 public static com.liferay.portal.model.ResourceBlockPermission deleteResourceBlockPermission( 089 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission) 090 throws com.liferay.portal.kernel.exception.SystemException { 091 return getService() 092 .deleteResourceBlockPermission(resourceBlockPermission); 093 } 094 095 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 096 return getService().dynamicQuery(); 097 } 098 099 /** 100 * Performs a dynamic query on the database and returns the matching rows. 101 * 102 * @param dynamicQuery the dynamic query 103 * @return the matching rows 104 * @throws SystemException if a system exception occurred 105 */ 106 @SuppressWarnings("rawtypes") 107 public static java.util.List dynamicQuery( 108 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 109 throws com.liferay.portal.kernel.exception.SystemException { 110 return getService().dynamicQuery(dynamicQuery); 111 } 112 113 /** 114 * Performs a dynamic query on the database and returns a range of the matching rows. 115 * 116 * <p> 117 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ResourceBlockPermissionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 118 * </p> 119 * 120 * @param dynamicQuery the dynamic query 121 * @param start the lower bound of the range of model instances 122 * @param end the upper bound of the range of model instances (not inclusive) 123 * @return the range of matching rows 124 * @throws SystemException if a system exception occurred 125 */ 126 @SuppressWarnings("rawtypes") 127 public static java.util.List dynamicQuery( 128 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 129 int end) throws com.liferay.portal.kernel.exception.SystemException { 130 return getService().dynamicQuery(dynamicQuery, start, end); 131 } 132 133 /** 134 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 135 * 136 * <p> 137 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ResourceBlockPermissionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 138 * </p> 139 * 140 * @param dynamicQuery the dynamic query 141 * @param start the lower bound of the range of model instances 142 * @param end the upper bound of the range of model instances (not inclusive) 143 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 144 * @return the ordered range of matching rows 145 * @throws SystemException if a system exception occurred 146 */ 147 @SuppressWarnings("rawtypes") 148 public static java.util.List dynamicQuery( 149 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 150 int end, 151 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 152 throws com.liferay.portal.kernel.exception.SystemException { 153 return getService() 154 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 155 } 156 157 /** 158 * Returns the number of rows that match the dynamic query. 159 * 160 * @param dynamicQuery the dynamic query 161 * @return the number of rows that match the dynamic query 162 * @throws SystemException if a system exception occurred 163 */ 164 public static long dynamicQueryCount( 165 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 166 throws com.liferay.portal.kernel.exception.SystemException { 167 return getService().dynamicQueryCount(dynamicQuery); 168 } 169 170 public static com.liferay.portal.model.ResourceBlockPermission fetchResourceBlockPermission( 171 long resourceBlockPermissionId) 172 throws com.liferay.portal.kernel.exception.SystemException { 173 return getService() 174 .fetchResourceBlockPermission(resourceBlockPermissionId); 175 } 176 177 /** 178 * Returns the resource block permission with the primary key. 179 * 180 * @param resourceBlockPermissionId the primary key of the resource block permission 181 * @return the resource block permission 182 * @throws PortalException if a resource block permission with the primary key could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public static com.liferay.portal.model.ResourceBlockPermission getResourceBlockPermission( 186 long resourceBlockPermissionId) 187 throws com.liferay.portal.kernel.exception.PortalException, 188 com.liferay.portal.kernel.exception.SystemException { 189 return getService().getResourceBlockPermission(resourceBlockPermissionId); 190 } 191 192 public static com.liferay.portal.model.PersistedModel getPersistedModel( 193 java.io.Serializable primaryKeyObj) 194 throws com.liferay.portal.kernel.exception.PortalException, 195 com.liferay.portal.kernel.exception.SystemException { 196 return getService().getPersistedModel(primaryKeyObj); 197 } 198 199 /** 200 * Returns a range of all the resource block permissions. 201 * 202 * <p> 203 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ResourceBlockPermissionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 204 * </p> 205 * 206 * @param start the lower bound of the range of resource block permissions 207 * @param end the upper bound of the range of resource block permissions (not inclusive) 208 * @return the range of resource block permissions 209 * @throws SystemException if a system exception occurred 210 */ 211 public static java.util.List<com.liferay.portal.model.ResourceBlockPermission> getResourceBlockPermissions( 212 int start, int end) 213 throws com.liferay.portal.kernel.exception.SystemException { 214 return getService().getResourceBlockPermissions(start, end); 215 } 216 217 /** 218 * Returns the number of resource block permissions. 219 * 220 * @return the number of resource block permissions 221 * @throws SystemException if a system exception occurred 222 */ 223 public static int getResourceBlockPermissionsCount() 224 throws com.liferay.portal.kernel.exception.SystemException { 225 return getService().getResourceBlockPermissionsCount(); 226 } 227 228 /** 229 * Updates the resource block permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 230 * 231 * @param resourceBlockPermission the resource block permission 232 * @return the resource block permission that was updated 233 * @throws SystemException if a system exception occurred 234 */ 235 public static com.liferay.portal.model.ResourceBlockPermission updateResourceBlockPermission( 236 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission) 237 throws com.liferay.portal.kernel.exception.SystemException { 238 return getService() 239 .updateResourceBlockPermission(resourceBlockPermission); 240 } 241 242 /** 243 * Returns the Spring bean ID for this bean. 244 * 245 * @return the Spring bean ID for this bean 246 */ 247 public static java.lang.String getBeanIdentifier() { 248 return getService().getBeanIdentifier(); 249 } 250 251 /** 252 * Sets the Spring bean ID for this bean. 253 * 254 * @param beanIdentifier the Spring bean ID for this bean 255 */ 256 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 257 getService().setBeanIdentifier(beanIdentifier); 258 } 259 260 public static void addResourceBlockPermissions(long resourceBlockId, 261 com.liferay.portal.model.ResourceBlockPermissionsContainer resourceBlockPermissionsContainer) 262 throws com.liferay.portal.kernel.exception.SystemException { 263 getService() 264 .addResourceBlockPermissions(resourceBlockId, 265 resourceBlockPermissionsContainer); 266 } 267 268 public static void deleteResourceBlockPermissions(long resourceBlockId) 269 throws com.liferay.portal.kernel.exception.SystemException { 270 getService().deleteResourceBlockPermissions(resourceBlockId); 271 } 272 273 public static java.util.Map<java.lang.Long, java.util.Set<java.lang.String>> getAvailableResourceBlockPermissionActionIds( 274 long[] roleIds, java.lang.String name, long primKey, 275 java.util.List<java.lang.String> actionIds) 276 throws com.liferay.portal.kernel.exception.PortalException, 277 com.liferay.portal.kernel.exception.SystemException { 278 return getService() 279 .getAvailableResourceBlockPermissionActionIds(roleIds, name, 280 primKey, actionIds); 281 } 282 283 public static com.liferay.portal.model.ResourceBlockPermissionsContainer getResourceBlockPermissionsContainer( 284 long resourceBlockId) 285 throws com.liferay.portal.kernel.exception.SystemException { 286 return getService().getResourceBlockPermissionsContainer(resourceBlockId); 287 } 288 289 public static int getResourceBlockPermissionsCount(long resourceBlockId, 290 long roleId) throws com.liferay.portal.kernel.exception.SystemException { 291 return getService() 292 .getResourceBlockPermissionsCount(resourceBlockId, roleId); 293 } 294 295 public static void updateResourceBlockPermission(long resourceBlockId, 296 long roleId, long actionIdsLong, int operator) 297 throws com.liferay.portal.kernel.exception.SystemException { 298 getService() 299 .updateResourceBlockPermission(resourceBlockId, roleId, 300 actionIdsLong, operator); 301 } 302 303 public static ResourceBlockPermissionLocalService getService() { 304 if (_service == null) { 305 _service = (ResourceBlockPermissionLocalService)PortalBeanLocatorUtil.locate(ResourceBlockPermissionLocalService.class.getName()); 306 307 ReferenceRegistry.registerReference(ResourceBlockPermissionLocalServiceUtil.class, 308 "_service"); 309 } 310 311 return _service; 312 } 313 314 /** 315 * @deprecated As of 6.2.0 316 */ 317 public void setService(ResourceBlockPermissionLocalService service) { 318 } 319 320 private static ResourceBlockPermissionLocalService _service; 321 }