001 /** 002 * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for Repository. This utility wraps 024 * {@link com.liferay.portal.service.impl.RepositoryLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see RepositoryLocalService 032 * @see com.liferay.portal.service.base.RepositoryLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.RepositoryLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class RepositoryLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RepositoryLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the repository to the database. Also notifies the appropriate model listeners. 046 * 047 * @param repository the repository 048 * @return the repository that was added 049 */ 050 public static com.liferay.portal.model.Repository addRepository( 051 com.liferay.portal.model.Repository repository) { 052 return getService().addRepository(repository); 053 } 054 055 public static com.liferay.portal.model.Repository addRepository( 056 long userId, long groupId, long classNameId, long parentFolderId, 057 java.lang.String name, java.lang.String description, 058 java.lang.String portletId, 059 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties, 060 boolean hidden, com.liferay.portal.service.ServiceContext serviceContext) 061 throws com.liferay.portal.kernel.exception.PortalException { 062 return getService() 063 .addRepository(userId, groupId, classNameId, parentFolderId, 064 name, description, portletId, typeSettingsProperties, hidden, 065 serviceContext); 066 } 067 068 /** 069 * @deprecated As of 6.2.0, replaced by {@link #addRepository(long, long, 070 long, long, String, String, String, UnicodeProperties, 071 boolean, ServiceContext)} 072 */ 073 @Deprecated 074 public static com.liferay.portal.model.Repository addRepository( 075 long userId, long groupId, long classNameId, long parentFolderId, 076 java.lang.String name, java.lang.String description, 077 java.lang.String portletId, 078 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties, 079 com.liferay.portal.service.ServiceContext serviceContext) 080 throws com.liferay.portal.kernel.exception.PortalException { 081 return getService() 082 .addRepository(userId, groupId, classNameId, parentFolderId, 083 name, description, portletId, typeSettingsProperties, serviceContext); 084 } 085 086 public static void checkRepository(long repositoryId) { 087 getService().checkRepository(repositoryId); 088 } 089 090 /** 091 * Creates a new repository with the primary key. Does not add the repository to the database. 092 * 093 * @param repositoryId the primary key for the new repository 094 * @return the new repository 095 */ 096 public static com.liferay.portal.model.Repository createRepository( 097 long repositoryId) { 098 return getService().createRepository(repositoryId); 099 } 100 101 /** 102 * @throws PortalException 103 */ 104 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 105 com.liferay.portal.model.PersistedModel persistedModel) 106 throws com.liferay.portal.kernel.exception.PortalException { 107 return getService().deletePersistedModel(persistedModel); 108 } 109 110 public static void deleteRepositories(long groupId) { 111 getService().deleteRepositories(groupId); 112 } 113 114 /** 115 * Deletes the repository from the database. Also notifies the appropriate model listeners. 116 * 117 * @param repository the repository 118 * @return the repository that was removed 119 */ 120 public static com.liferay.portal.model.Repository deleteRepository( 121 com.liferay.portal.model.Repository repository) { 122 return getService().deleteRepository(repository); 123 } 124 125 /** 126 * Deletes the repository with the primary key from the database. Also notifies the appropriate model listeners. 127 * 128 * @param repositoryId the primary key of the repository 129 * @return the repository that was removed 130 * @throws PortalException if a repository with the primary key could not be found 131 */ 132 public static com.liferay.portal.model.Repository deleteRepository( 133 long repositoryId) 134 throws com.liferay.portal.kernel.exception.PortalException { 135 return getService().deleteRepository(repositoryId); 136 } 137 138 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 139 return getService().dynamicQuery(); 140 } 141 142 /** 143 * Performs a dynamic query on the database and returns the matching rows. 144 * 145 * @param dynamicQuery the dynamic query 146 * @return the matching rows 147 */ 148 public static <T> java.util.List<T> dynamicQuery( 149 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 150 return getService().dynamicQuery(dynamicQuery); 151 } 152 153 /** 154 * Performs a dynamic query on the database and returns a range of the matching rows. 155 * 156 * <p> 157 * 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.RepositoryModelImpl}. 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. 158 * </p> 159 * 160 * @param dynamicQuery the dynamic query 161 * @param start the lower bound of the range of model instances 162 * @param end the upper bound of the range of model instances (not inclusive) 163 * @return the range of matching rows 164 */ 165 public static <T> java.util.List<T> dynamicQuery( 166 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 167 int end) { 168 return getService().dynamicQuery(dynamicQuery, start, end); 169 } 170 171 /** 172 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 173 * 174 * <p> 175 * 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.RepositoryModelImpl}. 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. 176 * </p> 177 * 178 * @param dynamicQuery the dynamic query 179 * @param start the lower bound of the range of model instances 180 * @param end the upper bound of the range of model instances (not inclusive) 181 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 182 * @return the ordered range of matching rows 183 */ 184 public static <T> java.util.List<T> dynamicQuery( 185 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 186 int end, 187 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 188 return getService() 189 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 190 } 191 192 /** 193 * Returns the number of rows matching the dynamic query. 194 * 195 * @param dynamicQuery the dynamic query 196 * @return the number of rows matching the dynamic query 197 */ 198 public static long dynamicQueryCount( 199 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 200 return getService().dynamicQueryCount(dynamicQuery); 201 } 202 203 /** 204 * Returns the number of rows matching the dynamic query. 205 * 206 * @param dynamicQuery the dynamic query 207 * @param projection the projection to apply to the query 208 * @return the number of rows matching the dynamic query 209 */ 210 public static long dynamicQueryCount( 211 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 212 com.liferay.portal.kernel.dao.orm.Projection projection) { 213 return getService().dynamicQueryCount(dynamicQuery, projection); 214 } 215 216 public static com.liferay.portal.model.Repository fetchRepository( 217 long groupId, java.lang.String name, java.lang.String portletId) { 218 return getService().fetchRepository(groupId, name, portletId); 219 } 220 221 public static com.liferay.portal.model.Repository fetchRepository( 222 long groupId, java.lang.String portletId) { 223 return getService().fetchRepository(groupId, portletId); 224 } 225 226 public static com.liferay.portal.model.Repository fetchRepository( 227 long repositoryId) { 228 return getService().fetchRepository(repositoryId); 229 } 230 231 /** 232 * Returns the repository matching the UUID and group. 233 * 234 * @param uuid the repository's UUID 235 * @param groupId the primary key of the group 236 * @return the matching repository, or <code>null</code> if a matching repository could not be found 237 */ 238 public static com.liferay.portal.model.Repository fetchRepositoryByUuidAndGroupId( 239 java.lang.String uuid, long groupId) { 240 return getService().fetchRepositoryByUuidAndGroupId(uuid, groupId); 241 } 242 243 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 244 return getService().getActionableDynamicQuery(); 245 } 246 247 /** 248 * Returns the Spring bean ID for this bean. 249 * 250 * @return the Spring bean ID for this bean 251 */ 252 public static java.lang.String getBeanIdentifier() { 253 return getService().getBeanIdentifier(); 254 } 255 256 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 257 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) { 258 return getService().getExportActionableDynamicQuery(portletDataContext); 259 } 260 261 public static java.util.List<com.liferay.portal.model.Repository> getGroupRepositories( 262 long groupId) { 263 return getService().getGroupRepositories(groupId); 264 } 265 266 public static com.liferay.portal.model.PersistedModel getPersistedModel( 267 java.io.Serializable primaryKeyObj) 268 throws com.liferay.portal.kernel.exception.PortalException { 269 return getService().getPersistedModel(primaryKeyObj); 270 } 271 272 /** 273 * Returns a range of all the repositories. 274 * 275 * <p> 276 * 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.RepositoryModelImpl}. 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. 277 * </p> 278 * 279 * @param start the lower bound of the range of repositories 280 * @param end the upper bound of the range of repositories (not inclusive) 281 * @return the range of repositories 282 */ 283 public static java.util.List<com.liferay.portal.model.Repository> getRepositories( 284 int start, int end) { 285 return getService().getRepositories(start, end); 286 } 287 288 /** 289 * Returns all the repositories matching the UUID and company. 290 * 291 * @param uuid the UUID of the repositories 292 * @param companyId the primary key of the company 293 * @return the matching repositories, or an empty list if no matches were found 294 */ 295 public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId( 296 java.lang.String uuid, long companyId) { 297 return getService().getRepositoriesByUuidAndCompanyId(uuid, companyId); 298 } 299 300 /** 301 * Returns a range of repositories matching the UUID and company. 302 * 303 * @param uuid the UUID of the repositories 304 * @param companyId the primary key of the company 305 * @param start the lower bound of the range of repositories 306 * @param end the upper bound of the range of repositories (not inclusive) 307 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 308 * @return the range of matching repositories, or an empty list if no matches were found 309 */ 310 public static java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId( 311 java.lang.String uuid, long companyId, int start, int end, 312 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Repository> orderByComparator) { 313 return getService() 314 .getRepositoriesByUuidAndCompanyId(uuid, companyId, start, 315 end, orderByComparator); 316 } 317 318 /** 319 * Returns the number of repositories. 320 * 321 * @return the number of repositories 322 */ 323 public static int getRepositoriesCount() { 324 return getService().getRepositoriesCount(); 325 } 326 327 public static com.liferay.portal.model.Repository getRepository( 328 long groupId, java.lang.String name, java.lang.String portletId) 329 throws com.liferay.portal.kernel.exception.PortalException { 330 return getService().getRepository(groupId, name, portletId); 331 } 332 333 public static com.liferay.portal.model.Repository getRepository( 334 long groupId, java.lang.String portletId) 335 throws com.liferay.portal.kernel.exception.PortalException { 336 return getService().getRepository(groupId, portletId); 337 } 338 339 /** 340 * Returns the repository with the primary key. 341 * 342 * @param repositoryId the primary key of the repository 343 * @return the repository 344 * @throws PortalException if a repository with the primary key could not be found 345 */ 346 public static com.liferay.portal.model.Repository getRepository( 347 long repositoryId) 348 throws com.liferay.portal.kernel.exception.PortalException { 349 return getService().getRepository(repositoryId); 350 } 351 352 /** 353 * Returns the repository matching the UUID and group. 354 * 355 * @param uuid the repository's UUID 356 * @param groupId the primary key of the group 357 * @return the matching repository 358 * @throws PortalException if a matching repository could not be found 359 */ 360 public static com.liferay.portal.model.Repository getRepositoryByUuidAndGroupId( 361 java.lang.String uuid, long groupId) 362 throws com.liferay.portal.kernel.exception.PortalException { 363 return getService().getRepositoryByUuidAndGroupId(uuid, groupId); 364 } 365 366 public static com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties( 367 long repositoryId) 368 throws com.liferay.portal.kernel.exception.PortalException { 369 return getService().getTypeSettingsProperties(repositoryId); 370 } 371 372 /** 373 * Sets the Spring bean ID for this bean. 374 * 375 * @param beanIdentifier the Spring bean ID for this bean 376 */ 377 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 378 getService().setBeanIdentifier(beanIdentifier); 379 } 380 381 /** 382 * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 383 * 384 * @param repository the repository 385 * @return the repository that was updated 386 */ 387 public static com.liferay.portal.model.Repository updateRepository( 388 com.liferay.portal.model.Repository repository) { 389 return getService().updateRepository(repository); 390 } 391 392 public static void updateRepository(long repositoryId, 393 java.lang.String name, java.lang.String description) 394 throws com.liferay.portal.kernel.exception.PortalException { 395 getService().updateRepository(repositoryId, name, description); 396 } 397 398 public static void updateRepository(long repositoryId, 399 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) 400 throws com.liferay.portal.kernel.exception.PortalException { 401 getService().updateRepository(repositoryId, typeSettingsProperties); 402 } 403 404 public static RepositoryLocalService getService() { 405 if (_service == null) { 406 _service = (RepositoryLocalService)PortalBeanLocatorUtil.locate(RepositoryLocalService.class.getName()); 407 408 ReferenceRegistry.registerReference(RepositoryLocalServiceUtil.class, 409 "_service"); 410 } 411 412 return _service; 413 } 414 415 /** 416 * @deprecated As of 6.2.0 417 */ 418 @Deprecated 419 public void setService(RepositoryLocalService service) { 420 } 421 422 private static RepositoryLocalService _service; 423 }