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) throws PortalException;
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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
218                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
219    
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public java.util.List<com.liferay.portal.model.Repository> getGroupRepositories(
222                    long groupId);
223    
224            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
226    
227            /**
228            * Returns the OSGi service identifier.
229            *
230            * @return the OSGi service identifier
231            */
232            public java.lang.String getOSGiServiceIdentifier();
233    
234            @Override
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public com.liferay.portal.model.PersistedModel getPersistedModel(
237                    java.io.Serializable primaryKeyObj) throws PortalException;
238    
239            /**
240            * Returns a range of all the repositories.
241            *
242            * <p>
243            * 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.
244            * </p>
245            *
246            * @param start the lower bound of the range of repositories
247            * @param end the upper bound of the range of repositories (not inclusive)
248            * @return the range of repositories
249            */
250            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251            public java.util.List<com.liferay.portal.model.Repository> getRepositories(
252                    int start, int end);
253    
254            /**
255            * Returns all the repositories matching the UUID and company.
256            *
257            * @param uuid the UUID of the repositories
258            * @param companyId the primary key of the company
259            * @return the 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);
264    
265            /**
266            * Returns a range of repositories matching the UUID and company.
267            *
268            * @param uuid the UUID of the repositories
269            * @param companyId the primary key of the company
270            * @param start the lower bound of the range of repositories
271            * @param end the upper bound of the range of repositories (not inclusive)
272            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
273            * @return the range of matching repositories, or an empty list if no matches were found
274            */
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public java.util.List<com.liferay.portal.model.Repository> getRepositoriesByUuidAndCompanyId(
277                    java.lang.String uuid, long companyId, int start, int end,
278                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Repository> orderByComparator);
279    
280            /**
281            * Returns the number of repositories.
282            *
283            * @return the number of repositories
284            */
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public int getRepositoriesCount();
287    
288            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289            public com.liferay.portal.model.Repository getRepository(long groupId,
290                    java.lang.String name, java.lang.String portletId)
291                    throws PortalException;
292    
293            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294            public com.liferay.portal.model.Repository getRepository(long groupId,
295                    java.lang.String portletId) throws PortalException;
296    
297            /**
298            * Returns the repository with the primary key.
299            *
300            * @param repositoryId the primary key of the repository
301            * @return the repository
302            * @throws PortalException if a repository with the primary key could not be found
303            */
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public com.liferay.portal.model.Repository getRepository(long repositoryId)
306                    throws PortalException;
307    
308            /**
309            * Returns the repository matching the UUID and group.
310            *
311            * @param uuid the repository's UUID
312            * @param groupId the primary key of the group
313            * @return the matching repository
314            * @throws PortalException if a matching repository could not be found
315            */
316            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
317            public com.liferay.portal.model.Repository getRepositoryByUuidAndGroupId(
318                    java.lang.String uuid, long groupId) throws PortalException;
319    
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties(
322                    long repositoryId) throws PortalException;
323    
324            /**
325            * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
326            *
327            * @param repository the repository
328            * @return the repository that was updated
329            */
330            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
331            public com.liferay.portal.model.Repository updateRepository(
332                    com.liferay.portal.model.Repository repository);
333    
334            public void updateRepository(long repositoryId, java.lang.String name,
335                    java.lang.String description) throws PortalException;
336    
337            public void updateRepository(long repositoryId,
338                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties)
339                    throws PortalException;
340    }