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.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.search.IndexableType; 022 import com.liferay.portal.kernel.transaction.Isolation; 023 import com.liferay.portal.kernel.transaction.Propagation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 import com.liferay.portal.model.SystemEventConstants; 026 027 /** 028 * Provides the local service interface for Repository. Methods of this 029 * service will not have security checks based on the propagated JAAS 030 * credentials because this service can only be accessed from within the same 031 * VM. 032 * 033 * @author Brian Wing Shun Chan 034 * @see RepositoryLocalServiceUtil 035 * @see com.liferay.portal.service.base.RepositoryLocalServiceBaseImpl 036 * @see com.liferay.portal.service.impl.RepositoryLocalServiceImpl 037 * @generated 038 */ 039 @ProviderType 040 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 041 PortalException.class, SystemException.class}) 042 public interface RepositoryLocalService extends BaseLocalService, 043 PersistedModelLocalService { 044 /* 045 * NOTE FOR DEVELOPERS: 046 * 047 * Never modify or reference this interface directly. Always use {@link RepositoryLocalServiceUtil} to access the repository local service. Add custom service methods to {@link com.liferay.portal.service.impl.RepositoryLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 048 */ 049 050 /** 051 * Adds the repository to the database. Also notifies the appropriate model listeners. 052 * 053 * @param repository the repository 054 * @return the repository that was added 055 */ 056 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 057 public com.liferay.portal.model.Repository addRepository( 058 com.liferay.portal.model.Repository repository); 059 060 public com.liferay.portal.model.Repository addRepository(long userId, 061 long groupId, long classNameId, long parentFolderId, 062 java.lang.String name, java.lang.String description, 063 java.lang.String portletId, 064 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties, 065 boolean hidden, com.liferay.portal.service.ServiceContext serviceContext) 066 throws com.liferay.portal.kernel.exception.PortalException; 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 @java.lang.Deprecated 074 public com.liferay.portal.model.Repository addRepository(long userId, 075 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 082 public void checkRepository(long repositoryId); 083 084 /** 085 * Creates a new repository with the primary key. Does not add the repository to the database. 086 * 087 * @param repositoryId the primary key for the new repository 088 * @return the new repository 089 */ 090 public com.liferay.portal.model.Repository createRepository( 091 long repositoryId); 092 093 /** 094 * @throws PortalException 095 */ 096 @Override 097 public com.liferay.portal.model.PersistedModel deletePersistedModel( 098 com.liferay.portal.model.PersistedModel persistedModel) 099 throws com.liferay.portal.kernel.exception.PortalException; 100 101 public void deleteRepositories(long groupId); 102 103 /** 104 * Deletes the repository from the database. Also notifies the appropriate model listeners. 105 * 106 * @param repository the repository 107 * @return the repository that was removed 108 */ 109 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 110 @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE) 111 public com.liferay.portal.model.Repository deleteRepository( 112 com.liferay.portal.model.Repository repository); 113 114 /** 115 * Deletes the repository with the primary key from the database. Also notifies the appropriate model listeners. 116 * 117 * @param repositoryId the primary key of the repository 118 * @return the repository that was removed 119 * @throws PortalException if a repository with the primary key could not be found 120 */ 121 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 122 public com.liferay.portal.model.Repository deleteRepository( 123 long repositoryId) 124 throws com.liferay.portal.kernel.exception.PortalException; 125 126 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 127 128 /** 129 * Performs a dynamic query on the database and returns the matching rows. 130 * 131 * @param dynamicQuery the dynamic query 132 * @return the matching rows 133 */ 134 public <T> java.util.List<T> dynamicQuery( 135 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 136 137 /** 138 * Performs a dynamic query on the database and returns a range of the matching rows. 139 * 140 * <p> 141 * 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. 142 * </p> 143 * 144 * @param dynamicQuery the dynamic query 145 * @param start the lower bound of the range of model instances 146 * @param end the upper bound of the range of model instances (not inclusive) 147 * @return the range of matching rows 148 */ 149 public <T> java.util.List<T> dynamicQuery( 150 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 151 int end); 152 153 /** 154 * Performs a dynamic query on the database and returns an ordered 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 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 164 * @return the ordered range of matching rows 165 */ 166 public <T> java.util.List<T> dynamicQuery( 167 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 168 int end, 169 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 170 171 /** 172 * Returns the number of rows matching the dynamic query. 173 * 174 * @param dynamicQuery the dynamic query 175 * @return the number of rows matching the dynamic query 176 */ 177 public long dynamicQueryCount( 178 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 179 180 /** 181 * Returns the number of rows matching the dynamic query. 182 * 183 * @param dynamicQuery the dynamic query 184 * @param projection the projection to apply to the query 185 * @return the number of rows matching the dynamic query 186 */ 187 public long dynamicQueryCount( 188 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 189 com.liferay.portal.kernel.dao.orm.Projection projection); 190 191 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 192 public com.liferay.portal.model.Repository fetchRepository(long groupId, 193 java.lang.String name, java.lang.String portletId); 194 195 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 196 public com.liferay.portal.model.Repository fetchRepository(long groupId, 197 java.lang.String portletId); 198 199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 200 public com.liferay.portal.model.Repository fetchRepository( 201 long repositoryId); 202 203 /** 204 * Returns the repository matching the UUID and group. 205 * 206 * @param uuid the repository's UUID 207 * @param groupId the primary key of the group 208 * @return the matching repository, or <code>null</code> if a matching repository could not be found 209 */ 210 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 211 public com.liferay.portal.model.Repository fetchRepositoryByUuidAndGroupId( 212 java.lang.String uuid, long groupId); 213 214 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 215 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 216 217 /** 218 * Returns the Spring bean ID for this bean. 219 * 220 * @return the Spring bean ID for this bean 221 */ 222 public java.lang.String getBeanIdentifier(); 223 224 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 225 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 226 com.liferay.portal.kernel.lar.PortletDataContext portletDataContext); 227 228 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 229 public java.util.List<com.liferay.portal.kernel.repository.LocalRepository> getGroupLocalRepositoryImpl( 230 long groupId) 231 throws com.liferay.portal.kernel.exception.PortalException; 232 233 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 234 public com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl( 235 long folderId, long fileEntryId, long fileVersionId) 236 throws com.liferay.portal.kernel.exception.PortalException; 237 238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 239 public com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl( 240 long repositoryId) 241 throws com.liferay.portal.kernel.exception.PortalException; 242 243 @Override 244 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 245 public com.liferay.portal.model.PersistedModel getPersistedModel( 246 java.io.Serializable primaryKeyObj) 247 throws com.liferay.portal.kernel.exception.PortalException; 248 249 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 250 public java.lang.String getRegistryName(); 251 252 /** 253 * Returns a range of all the repositories. 254 * 255 * <p> 256 * 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. 257 * </p> 258 * 259 * @param start the lower bound of the range of repositories 260 * @param end the upper bound of the range of repositories (not inclusive) 261 * @return the range of repositories 262 */ 263 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 264 public java.util.List<com.liferay.portal.model.Repository> getRepositories( 265 int start, int end); 266 267 /** 268 * Returns all the repositories matching the UUID and company. 269 * 270 * @param uuid the UUID of the repositories 271 * @param companyId the primary key of the company 272 * @return the matching repositories, or an empty list if no matches were found 273 */ 274 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 275 public java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId( 276 java.lang.String uuid, long companyId); 277 278 /** 279 * Returns a range of repositories matching the UUID and company. 280 * 281 * @param uuid the UUID of the repositories 282 * @param companyId the primary key of the company 283 * @param start the lower bound of the range of repositories 284 * @param end the upper bound of the range of repositories (not inclusive) 285 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 286 * @return the range of matching repositories, or an empty list if no matches were found 287 */ 288 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 289 public java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId( 290 java.lang.String uuid, long companyId, int start, int end, 291 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Repository> orderByComparator); 292 293 /** 294 * Returns the number of repositories. 295 * 296 * @return the number of repositories 297 */ 298 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 299 public int getRepositoriesCount(); 300 301 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 302 public com.liferay.portal.model.Repository getRepository(long groupId, 303 java.lang.String name, java.lang.String portletId) 304 throws com.liferay.portal.kernel.exception.PortalException; 305 306 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 307 public com.liferay.portal.model.Repository getRepository(long groupId, 308 java.lang.String portletId) 309 throws com.liferay.portal.kernel.exception.PortalException; 310 311 /** 312 * Returns the repository with the primary key. 313 * 314 * @param repositoryId the primary key of the repository 315 * @return the repository 316 * @throws PortalException if a repository with the primary key could not be found 317 */ 318 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 319 public com.liferay.portal.model.Repository getRepository(long repositoryId) 320 throws com.liferay.portal.kernel.exception.PortalException; 321 322 /** 323 * Returns the repository matching the UUID and group. 324 * 325 * @param uuid the repository's UUID 326 * @param groupId the primary key of the group 327 * @return the matching repository 328 * @throws PortalException if a matching repository could not be found 329 */ 330 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 331 public com.liferay.portal.model.Repository getRepositoryByUuidAndGroupId( 332 java.lang.String uuid, long groupId) 333 throws com.liferay.portal.kernel.exception.PortalException; 334 335 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 336 public com.liferay.portal.kernel.repository.Repository getRepositoryImpl( 337 long folderId, long fileEntryId, long fileVersionId) 338 throws com.liferay.portal.kernel.exception.PortalException; 339 340 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 341 public com.liferay.portal.kernel.repository.Repository getRepositoryImpl( 342 long repositoryId) 343 throws com.liferay.portal.kernel.exception.PortalException; 344 345 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 346 public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties( 347 long repositoryId) 348 throws com.liferay.portal.kernel.exception.PortalException; 349 350 public void invalidate(); 351 352 /** 353 * Sets the Spring bean ID for this bean. 354 * 355 * @param beanIdentifier the Spring bean ID for this bean 356 */ 357 public void setBeanIdentifier(java.lang.String beanIdentifier); 358 359 /** 360 * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 361 * 362 * @param repository the repository 363 * @return the repository that was updated 364 */ 365 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 366 public com.liferay.portal.model.Repository updateRepository( 367 com.liferay.portal.model.Repository repository); 368 369 public void updateRepository(long repositoryId, java.lang.String name, 370 java.lang.String description) 371 throws com.liferay.portal.kernel.exception.PortalException; 372 }