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. 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. 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. 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 * Updates the resource block permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 244 * 245 * @param resourceBlockPermission the resource block permission 246 * @param merge whether to merge the resource block permission with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation. 247 * @return the resource block permission that was updated 248 * @throws SystemException if a system exception occurred 249 */ 250 public static com.liferay.portal.model.ResourceBlockPermission updateResourceBlockPermission( 251 com.liferay.portal.model.ResourceBlockPermission resourceBlockPermission, 252 boolean merge) 253 throws com.liferay.portal.kernel.exception.SystemException { 254 return getService() 255 .updateResourceBlockPermission(resourceBlockPermission, merge); 256 } 257 258 /** 259 * Returns the Spring bean ID for this bean. 260 * 261 * @return the Spring bean ID for this bean 262 */ 263 public static java.lang.String getBeanIdentifier() { 264 return getService().getBeanIdentifier(); 265 } 266 267 /** 268 * Sets the Spring bean ID for this bean. 269 * 270 * @param beanIdentifier the Spring bean ID for this bean 271 */ 272 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 273 getService().setBeanIdentifier(beanIdentifier); 274 } 275 276 public static void addResourceBlockPermissions(long resourceBlockId, 277 com.liferay.portal.model.ResourceBlockPermissionsContainer resourceBlockPermissionsContainer) 278 throws com.liferay.portal.kernel.exception.SystemException { 279 getService() 280 .addResourceBlockPermissions(resourceBlockId, 281 resourceBlockPermissionsContainer); 282 } 283 284 public static void deleteResourceBlockPermissions(long resourceBlockId) 285 throws com.liferay.portal.kernel.exception.SystemException { 286 getService().deleteResourceBlockPermissions(resourceBlockId); 287 } 288 289 public static java.util.Map<java.lang.Long, java.util.Set<java.lang.String>> getAvailableResourceBlockPermissionActionIds( 290 long[] roleIds, java.lang.String name, long primKey, 291 java.util.List<java.lang.String> actionIds) 292 throws com.liferay.portal.kernel.exception.PortalException, 293 com.liferay.portal.kernel.exception.SystemException { 294 return getService() 295 .getAvailableResourceBlockPermissionActionIds(roleIds, name, 296 primKey, actionIds); 297 } 298 299 public static com.liferay.portal.model.ResourceBlockPermissionsContainer getResourceBlockPermissionsContainer( 300 long resourceBlockId) 301 throws com.liferay.portal.kernel.exception.SystemException { 302 return getService().getResourceBlockPermissionsContainer(resourceBlockId); 303 } 304 305 public static int getResourceBlockPermissionsCount(long resourceBlockId, 306 long roleId) throws com.liferay.portal.kernel.exception.SystemException { 307 return getService() 308 .getResourceBlockPermissionsCount(resourceBlockId, roleId); 309 } 310 311 public static void updateResourceBlockPermission(long resourceBlockId, 312 long roleId, long actionIdsLong, int operator) 313 throws com.liferay.portal.kernel.exception.SystemException { 314 getService() 315 .updateResourceBlockPermission(resourceBlockId, roleId, 316 actionIdsLong, operator); 317 } 318 319 public static ResourceBlockPermissionLocalService getService() { 320 if (_service == null) { 321 _service = (ResourceBlockPermissionLocalService)PortalBeanLocatorUtil.locate(ResourceBlockPermissionLocalService.class.getName()); 322 323 ReferenceRegistry.registerReference(ResourceBlockPermissionLocalServiceUtil.class, 324 "_service"); 325 } 326 327 return _service; 328 } 329 330 /** 331 * @deprecated 332 */ 333 public void setService(ResourceBlockPermissionLocalService service) { 334 } 335 336 private static ResourceBlockPermissionLocalService _service; 337 }