001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    /**
024     * The interface for the repository local service.
025     *
026     * <p>
027     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see RepositoryLocalServiceUtil
032     * @see com.liferay.portal.service.base.RepositoryLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.RepositoryLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface RepositoryLocalService extends PersistedModelLocalService {
039            /*
040             * NOTE FOR DEVELOPERS:
041             *
042             * 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.
043             */
044    
045            /**
046            * Adds the repository to the database. Also notifies the appropriate model listeners.
047            *
048            * @param repository the repository
049            * @return the repository that was added
050            * @throws SystemException if a system exception occurred
051            */
052            public com.liferay.portal.model.Repository addRepository(
053                    com.liferay.portal.model.Repository repository)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            /**
057            * Creates a new repository with the primary key. Does not add the repository to the database.
058            *
059            * @param repositoryId the primary key for the new repository
060            * @return the new repository
061            */
062            public com.liferay.portal.model.Repository createRepository(
063                    long repositoryId);
064    
065            /**
066            * Deletes the repository with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param repositoryId the primary key of the repository
069            * @throws PortalException if a repository with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public void deleteRepository(long repositoryId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            /**
077            * Deletes the repository from the database. Also notifies the appropriate model listeners.
078            *
079            * @param repository the repository
080            * @throws SystemException if a system exception occurred
081            */
082            public void deleteRepository(com.liferay.portal.model.Repository repository)
083                    throws com.liferay.portal.kernel.exception.SystemException;
084    
085            /**
086            * Performs a dynamic query on the database and returns the matching rows.
087            *
088            * @param dynamicQuery the dynamic query
089            * @return the matching rows
090            * @throws SystemException if a system exception occurred
091            */
092            @SuppressWarnings("rawtypes")
093            public java.util.List dynamicQuery(
094                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
095                    throws com.liferay.portal.kernel.exception.SystemException;
096    
097            /**
098            * Performs a dynamic query on the database and returns a range of the matching rows.
099            *
100            * <p>
101            * 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.
102            * </p>
103            *
104            * @param dynamicQuery the dynamic query
105            * @param start the lower bound of the range of model instances
106            * @param end the upper bound of the range of model instances (not inclusive)
107            * @return the range of matching rows
108            * @throws SystemException if a system exception occurred
109            */
110            @SuppressWarnings("rawtypes")
111            public java.util.List dynamicQuery(
112                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
113                    int end) throws com.liferay.portal.kernel.exception.SystemException;
114    
115            /**
116            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
117            *
118            * <p>
119            * 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.
120            * </p>
121            *
122            * @param dynamicQuery the dynamic query
123            * @param start the lower bound of the range of model instances
124            * @param end the upper bound of the range of model instances (not inclusive)
125            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
126            * @return the ordered range of matching rows
127            * @throws SystemException if a system exception occurred
128            */
129            @SuppressWarnings("rawtypes")
130            public java.util.List dynamicQuery(
131                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
132                    int end,
133                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
134                    throws com.liferay.portal.kernel.exception.SystemException;
135    
136            /**
137            * Returns the number of rows that match the dynamic query.
138            *
139            * @param dynamicQuery the dynamic query
140            * @return the number of rows that match the dynamic query
141            * @throws SystemException if a system exception occurred
142            */
143            public long dynamicQueryCount(
144                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
145                    throws com.liferay.portal.kernel.exception.SystemException;
146    
147            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148            public com.liferay.portal.model.Repository fetchRepository(
149                    long repositoryId)
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            /**
153            * Returns the repository with the primary key.
154            *
155            * @param repositoryId the primary key of the repository
156            * @return the repository
157            * @throws PortalException if a repository with the primary key could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161            public com.liferay.portal.model.Repository getRepository(long repositoryId)
162                    throws com.liferay.portal.kernel.exception.PortalException,
163                            com.liferay.portal.kernel.exception.SystemException;
164    
165            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166            public com.liferay.portal.model.PersistedModel getPersistedModel(
167                    java.io.Serializable primaryKeyObj)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException;
170    
171            /**
172            * Returns the repository with the UUID in the group.
173            *
174            * @param uuid the UUID of repository
175            * @param groupId the group id of the repository
176            * @return the repository
177            * @throws PortalException if a repository with the UUID in the group could not be found
178            * @throws SystemException if a system exception occurred
179            */
180            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181            public com.liferay.portal.model.Repository getRepositoryByUuidAndGroupId(
182                    java.lang.String uuid, long groupId)
183                    throws com.liferay.portal.kernel.exception.PortalException,
184                            com.liferay.portal.kernel.exception.SystemException;
185    
186            /**
187            * Returns a range of all the repositories.
188            *
189            * <p>
190            * 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.
191            * </p>
192            *
193            * @param start the lower bound of the range of repositories
194            * @param end the upper bound of the range of repositories (not inclusive)
195            * @return the range of repositories
196            * @throws SystemException if a system exception occurred
197            */
198            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199            public java.util.List<com.liferay.portal.model.Repository> getRepositories(
200                    int start, int end)
201                    throws com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Returns the number of repositories.
205            *
206            * @return the number of repositories
207            * @throws SystemException if a system exception occurred
208            */
209            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210            public int getRepositoriesCount()
211                    throws com.liferay.portal.kernel.exception.SystemException;
212    
213            /**
214            * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
215            *
216            * @param repository the repository
217            * @return the repository that was updated
218            * @throws SystemException if a system exception occurred
219            */
220            public com.liferay.portal.model.Repository updateRepository(
221                    com.liferay.portal.model.Repository repository)
222                    throws com.liferay.portal.kernel.exception.SystemException;
223    
224            /**
225            * Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
226            *
227            * @param repository the repository
228            * @param merge whether to merge the repository with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
229            * @return the repository that was updated
230            * @throws SystemException if a system exception occurred
231            */
232            public com.liferay.portal.model.Repository updateRepository(
233                    com.liferay.portal.model.Repository repository, boolean merge)
234                    throws com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * Returns the Spring bean ID for this bean.
238            *
239            * @return the Spring bean ID for this bean
240            */
241            public java.lang.String getBeanIdentifier();
242    
243            /**
244            * Sets the Spring bean ID for this bean.
245            *
246            * @param beanIdentifier the Spring bean ID for this bean
247            */
248            public void setBeanIdentifier(java.lang.String beanIdentifier);
249    
250            public long addRepository(long userId, long groupId, long classNameId,
251                    long parentFolderId, java.lang.String name,
252                    java.lang.String description, java.lang.String portletId,
253                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
254                    com.liferay.portal.service.ServiceContext serviceContext)
255                    throws com.liferay.portal.kernel.exception.PortalException,
256                            com.liferay.portal.kernel.exception.SystemException;
257    
258            public void checkRepository(long repositoryId)
259                    throws com.liferay.portal.kernel.exception.SystemException;
260    
261            public void deleteRepositories(long groupId)
262                    throws com.liferay.portal.kernel.exception.PortalException,
263                            com.liferay.portal.kernel.exception.SystemException;
264    
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl(
267                    long repositoryId)
268                    throws com.liferay.portal.kernel.exception.PortalException,
269                            com.liferay.portal.kernel.exception.SystemException;
270    
271            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272            public com.liferay.portal.kernel.repository.LocalRepository getLocalRepositoryImpl(
273                    long folderId, long fileEntryId, long fileVersionId)
274                    throws com.liferay.portal.kernel.exception.PortalException,
275                            com.liferay.portal.kernel.exception.SystemException;
276    
277            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278            public com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
279                    long repositoryId)
280                    throws com.liferay.portal.kernel.exception.PortalException,
281                            com.liferay.portal.kernel.exception.SystemException;
282    
283            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
284            public com.liferay.portal.kernel.repository.Repository getRepositoryImpl(
285                    long folderId, long fileEntryId, long fileVersionId)
286                    throws com.liferay.portal.kernel.exception.PortalException,
287                            com.liferay.portal.kernel.exception.SystemException;
288    
289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties(
291                    long repositoryId)
292                    throws com.liferay.portal.kernel.exception.PortalException,
293                            com.liferay.portal.kernel.exception.SystemException;
294    
295            public void updateRepository(long repositoryId, java.lang.String name,
296                    java.lang.String description)
297                    throws com.liferay.portal.kernel.exception.PortalException,
298                            com.liferay.portal.kernel.exception.SystemException;
299    }