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            /**
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 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 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) throws PortalException;
124    
125            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
126    
127            /**
128            * Performs a dynamic query on the database and returns the matching rows.
129            *
130            * @param dynamicQuery the dynamic query
131            * @return the matching rows
132            */
133            public <T> java.util.List<T> dynamicQuery(
134                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
135    
136            /**
137            * Performs a dynamic query on the database and returns a range of the matching rows.
138            *
139            * <p>
140            * 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.
141            * </p>
142            *
143            * @param dynamicQuery the dynamic query
144            * @param start the lower bound of the range of model instances
145            * @param end the upper bound of the range of model instances (not inclusive)
146            * @return the range of matching rows
147            */
148            public <T> java.util.List<T> dynamicQuery(
149                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
150                    int end);
151    
152            /**
153            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
154            *
155            * <p>
156            * 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.
157            * </p>
158            *
159            * @param dynamicQuery the dynamic query
160            * @param start the lower bound of the range of model instances
161            * @param end the upper bound of the range of model instances (not inclusive)
162            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
163            * @return the ordered range of matching rows
164            */
165            public <T> java.util.List<T> dynamicQuery(
166                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
167                    int end,
168                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
169    
170            /**
171            * Returns the number of rows matching the dynamic query.
172            *
173            * @param dynamicQuery the dynamic query
174            * @return the number of rows matching the dynamic query
175            */
176            public long dynamicQueryCount(
177                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
178    
179            /**
180            * Returns the number of rows matching the dynamic query.
181            *
182            * @param dynamicQuery the dynamic query
183            * @param projection the projection to apply to the query
184            * @return the number of rows matching the dynamic query
185            */
186            public long dynamicQueryCount(
187                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
188                    com.liferay.portal.kernel.dao.orm.Projection projection);
189    
190            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191            public com.liferay.portal.model.Repository fetchRepository(long groupId,
192                    java.lang.String name, java.lang.String portletId);
193    
194            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195            public com.liferay.portal.model.Repository fetchRepository(long groupId,
196                    java.lang.String portletId);
197    
198            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199            public com.liferay.portal.model.Repository fetchRepository(
200                    long repositoryId);
201    
202            /**
203            * Returns the repository matching the UUID and group.
204            *
205            * @param uuid the repository's UUID
206            * @param groupId the primary key of the group
207            * @return the matching repository, or <code>null</code> if a matching repository could not be found
208            */
209            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210            public com.liferay.portal.model.Repository fetchRepositoryByUuidAndGroupId(
211                    java.lang.String uuid, long groupId);
212    
213            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
215    
216            /**
217            * Returns the Spring bean ID for this bean.
218            *
219            * @return the Spring bean ID for this bean
220            */
221            public java.lang.String getBeanIdentifier();
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
225                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
226    
227            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228            public java.util.List<com.liferay.portal.model.Repository> getGroupRepositories(
229                    long groupId);
230    
231            @Override
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public com.liferay.portal.model.PersistedModel getPersistedModel(
234                    java.io.Serializable primaryKeyObj) throws PortalException;
235    
236            /**
237            * Returns a range of all the repositories.
238            *
239            * <p>
240            * 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.
241            * </p>
242            *
243            * @param start the lower bound of the range of repositories
244            * @param end the upper bound of the range of repositories (not inclusive)
245            * @return the range of repositories
246            */
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public java.util.List<com.liferay.portal.model.Repository> getRepositories(
249                    int start, int end);
250    
251            /**
252            * Returns all the 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            * @return the matching repositories, or an empty list if no matches were found
257            */
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
260                    java.lang.String uuid, long companyId);
261    
262            /**
263            * Returns a range of repositories matching the UUID and company.
264            *
265            * @param uuid the UUID of the repositories
266            * @param companyId the primary key of the company
267            * @param start the lower bound of the range of repositories
268            * @param end the upper bound of the range of repositories (not inclusive)
269            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
270            * @return the range of matching repositories, or an empty list if no matches were found
271            */
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
274                    java.lang.String uuid, long companyId, int start, int end,
275                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Repository> orderByComparator);
276    
277            /**
278            * Returns the number of repositories.
279            *
280            * @return the number of repositories
281            */
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public int getRepositoriesCount();
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public com.liferay.portal.model.Repository getRepository(long groupId,
287                    java.lang.String name, java.lang.String portletId)
288                    throws PortalException;
289    
290            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
291            public com.liferay.portal.model.Repository getRepository(long groupId,
292                    java.lang.String portletId) throws PortalException;
293    
294            /**
295            * Returns the repository with the primary key.
296            *
297            * @param repositoryId the primary key of the repository
298            * @return the repository
299            * @throws PortalException if a repository with the primary key could not be found
300            */
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public com.liferay.portal.model.Repository getRepository(long repositoryId)
303                    throws PortalException;
304    
305            /**
306            * Returns the repository matching the UUID and group.
307            *
308            * @param uuid the repository's UUID
309            * @param groupId the primary key of the group
310            * @return the matching repository
311            * @throws PortalException if a matching repository could not be found
312            */
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public com.liferay.portal.model.Repository getRepositoryByUuidAndGroupId(
315                    java.lang.String uuid, long groupId) throws PortalException;
316    
317            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties(
319                    long repositoryId) throws PortalException;
320    
321            /**
322            * Sets the Spring bean ID for this bean.
323            *
324            * @param beanIdentifier the Spring bean ID for this bean
325            */
326            public void setBeanIdentifier(java.lang.String beanIdentifier);
327    
328            /**
329            * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
330            *
331            * @param repository the repository
332            * @return the repository that was updated
333            */
334            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
335            public com.liferay.portal.model.Repository updateRepository(
336                    com.liferay.portal.model.Repository repository);
337    
338            public void updateRepository(long repositoryId, java.lang.String name,
339                    java.lang.String description) throws PortalException;
340    
341            public void updateRepository(long repositoryId,
342                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties)
343                    throws PortalException;
344    }