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 PortalException; 067 068 public void checkRepository(long repositoryId); 069 070 /** 071 * Creates a new repository with the primary key. Does not add the repository to the database. 072 * 073 * @param repositoryId the primary key for the new repository 074 * @return the new repository 075 */ 076 public com.liferay.portal.model.Repository createRepository( 077 long repositoryId); 078 079 /** 080 * @throws PortalException 081 */ 082 @Override 083 public com.liferay.portal.model.PersistedModel deletePersistedModel( 084 com.liferay.portal.model.PersistedModel persistedModel) 085 throws PortalException; 086 087 public void deleteRepositories(long groupId) throws PortalException; 088 089 /** 090 * Deletes the repository from the database. Also notifies the appropriate model listeners. 091 * 092 * @param repository the repository 093 * @return the repository that was removed 094 */ 095 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 096 @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE) 097 public com.liferay.portal.model.Repository deleteRepository( 098 com.liferay.portal.model.Repository repository); 099 100 /** 101 * Deletes the repository with the primary key from the database. Also notifies the appropriate model listeners. 102 * 103 * @param repositoryId the primary key of the repository 104 * @return the repository that was removed 105 * @throws PortalException if a repository with the primary key could not be found 106 */ 107 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 108 public com.liferay.portal.model.Repository deleteRepository( 109 long repositoryId) throws PortalException; 110 111 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 112 113 /** 114 * Performs a dynamic query on the database and returns the matching rows. 115 * 116 * @param dynamicQuery the dynamic query 117 * @return the matching rows 118 */ 119 public <T> java.util.List<T> dynamicQuery( 120 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 121 122 /** 123 * Performs a dynamic query on the database and returns a range of the matching rows. 124 * 125 * <p> 126 * 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. 127 * </p> 128 * 129 * @param dynamicQuery the dynamic query 130 * @param start the lower bound of the range of model instances 131 * @param end the upper bound of the range of model instances (not inclusive) 132 * @return the range of matching rows 133 */ 134 public <T> java.util.List<T> dynamicQuery( 135 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 136 int end); 137 138 /** 139 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 140 * 141 * <p> 142 * 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. 143 * </p> 144 * 145 * @param dynamicQuery the dynamic query 146 * @param start the lower bound of the range of model instances 147 * @param end the upper bound of the range of model instances (not inclusive) 148 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 149 * @return the ordered range of matching rows 150 */ 151 public <T> java.util.List<T> dynamicQuery( 152 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 153 int end, 154 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 155 156 /** 157 * Returns the number of rows matching the dynamic query. 158 * 159 * @param dynamicQuery the dynamic query 160 * @return the number of rows matching the dynamic query 161 */ 162 public long dynamicQueryCount( 163 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 164 165 /** 166 * Returns the number of rows matching the dynamic query. 167 * 168 * @param dynamicQuery the dynamic query 169 * @param projection the projection to apply to the query 170 * @return the number of rows matching the dynamic query 171 */ 172 public long dynamicQueryCount( 173 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 174 com.liferay.portal.kernel.dao.orm.Projection projection); 175 176 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 177 public com.liferay.portal.model.Repository fetchRepository(long groupId, 178 java.lang.String name, java.lang.String portletId); 179 180 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 181 public com.liferay.portal.model.Repository fetchRepository(long groupId, 182 java.lang.String portletId); 183 184 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 185 public com.liferay.portal.model.Repository fetchRepository( 186 long repositoryId); 187 188 /** 189 * Returns the repository matching the UUID and group. 190 * 191 * @param uuid the repository's UUID 192 * @param groupId the primary key of the group 193 * @return the matching repository, or <code>null</code> if a matching repository could not be found 194 */ 195 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 196 public com.liferay.portal.model.Repository fetchRepositoryByUuidAndGroupId( 197 java.lang.String uuid, long groupId); 198 199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 200 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 201 202 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 203 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 204 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 205 206 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 207 public java.util.List<com.liferay.portal.model.Repository> getGroupRepositories( 208 long groupId); 209 210 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 211 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 212 213 /** 214 * Returns the OSGi service identifier. 215 * 216 * @return the OSGi service identifier 217 */ 218 public java.lang.String getOSGiServiceIdentifier(); 219 220 @Override 221 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 222 public com.liferay.portal.model.PersistedModel getPersistedModel( 223 java.io.Serializable primaryKeyObj) throws PortalException; 224 225 /** 226 * Returns a range of all the repositories. 227 * 228 * <p> 229 * 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. 230 * </p> 231 * 232 * @param start the lower bound of the range of repositories 233 * @param end the upper bound of the range of repositories (not inclusive) 234 * @return the range of repositories 235 */ 236 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 237 public java.util.List<com.liferay.portal.model.Repository> getRepositories( 238 int start, int end); 239 240 /** 241 * Returns all the repositories matching the UUID and company. 242 * 243 * @param uuid the UUID of the repositories 244 * @param companyId the primary key of the company 245 * @return the matching repositories, or an empty list if no matches were found 246 */ 247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 248 public java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId( 249 java.lang.String uuid, long companyId); 250 251 /** 252 * Returns a range of repositories matching the UUID and company. 253 * 254 * @param uuid the UUID of the repositories 255 * @param companyId the primary key of the company 256 * @param start the lower bound of the range of repositories 257 * @param end the upper bound of the range of repositories (not inclusive) 258 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 259 * @return the range of matching repositories, or an empty list if no matches were found 260 */ 261 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 262 public java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId( 263 java.lang.String uuid, long companyId, int start, int end, 264 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Repository> orderByComparator); 265 266 /** 267 * Returns the number of repositories. 268 * 269 * @return the number of repositories 270 */ 271 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 272 public int getRepositoriesCount(); 273 274 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 275 public com.liferay.portal.model.Repository getRepository(long groupId, 276 java.lang.String name, java.lang.String portletId) 277 throws PortalException; 278 279 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 280 public com.liferay.portal.model.Repository getRepository(long groupId, 281 java.lang.String portletId) throws PortalException; 282 283 /** 284 * Returns the repository with the primary key. 285 * 286 * @param repositoryId the primary key of the repository 287 * @return the repository 288 * @throws PortalException if a repository with the primary key could not be found 289 */ 290 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 291 public com.liferay.portal.model.Repository getRepository(long repositoryId) 292 throws PortalException; 293 294 /** 295 * Returns the repository matching the UUID and group. 296 * 297 * @param uuid the repository's UUID 298 * @param groupId the primary key of the group 299 * @return the matching repository 300 * @throws PortalException if a matching repository could not be found 301 */ 302 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 303 public com.liferay.portal.model.Repository getRepositoryByUuidAndGroupId( 304 java.lang.String uuid, long groupId) throws PortalException; 305 306 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 307 public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties( 308 long repositoryId) throws PortalException; 309 310 /** 311 * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 312 * 313 * @param repository the repository 314 * @return the repository that was updated 315 */ 316 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 317 public com.liferay.portal.model.Repository updateRepository( 318 com.liferay.portal.model.Repository repository); 319 320 public void updateRepository(long repositoryId, java.lang.String name, 321 java.lang.String description) throws PortalException; 322 323 public void updateRepository(long repositoryId, 324 com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties) 325 throws PortalException; 326 }