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.portlet.softwarecatalog.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.service.BaseLocalService;
026    import com.liferay.portal.service.PersistedModelLocalService;
027    
028    /**
029     * Provides the local service interface for SCProductEntry. Methods of this
030     * service will not have security checks based on the propagated JAAS
031     * credentials because this service can only be accessed from within the same
032     * VM.
033     *
034     * @author Brian Wing Shun Chan
035     * @see SCProductEntryLocalServiceUtil
036     * @see com.liferay.portlet.softwarecatalog.service.base.SCProductEntryLocalServiceBaseImpl
037     * @see com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryLocalServiceImpl
038     * @generated
039     */
040    @ProviderType
041    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
042            PortalException.class, SystemException.class})
043    public interface SCProductEntryLocalService extends BaseLocalService,
044            PersistedModelLocalService {
045            /*
046             * NOTE FOR DEVELOPERS:
047             *
048             * Never modify or reference this interface directly. Always use {@link SCProductEntryLocalServiceUtil} to access the s c product entry local service. Add custom service methods to {@link com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
049             */
050            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
051            public com.liferay.portlet.softwarecatalog.model.SCProductEntry addProductEntry(
052                    long userId, java.lang.String name, java.lang.String type,
053                    java.lang.String tags, java.lang.String shortDescription,
054                    java.lang.String longDescription, java.lang.String pageURL,
055                    java.lang.String author, java.lang.String repoGroupId,
056                    java.lang.String repoArtifactId, long[] licenseIds,
057                    java.util.List<byte[]> thumbnails, java.util.List<byte[]> fullImages,
058                    com.liferay.portal.service.ServiceContext serviceContext)
059                    throws PortalException;
060    
061            public void addProductEntryResources(
062                    com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry,
063                    boolean addGroupPermissions, boolean addGuestPermissions)
064                    throws PortalException;
065    
066            public void addProductEntryResources(
067                    com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry,
068                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
069                    throws PortalException;
070    
071            public void addProductEntryResources(long productEntryId,
072                    boolean addGroupPermissions, boolean addGuestPermissions)
073                    throws PortalException;
074    
075            public void addProductEntryResources(long productEntryId,
076                    com.liferay.portal.service.permission.ModelPermissions modelPermissions)
077                    throws PortalException;
078    
079            public void addSCLicenseSCProductEntries(long licenseId,
080                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> SCProductEntries);
081    
082            public void addSCLicenseSCProductEntries(long licenseId,
083                    long[] productEntryIds);
084    
085            public void addSCLicenseSCProductEntry(long licenseId, long productEntryId);
086    
087            public void addSCLicenseSCProductEntry(long licenseId,
088                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry);
089    
090            /**
091            * Adds the s c product entry to the database. Also notifies the appropriate model listeners.
092            *
093            * @param scProductEntry the s c product entry
094            * @return the s c product entry that was added
095            */
096            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
097            public com.liferay.portlet.softwarecatalog.model.SCProductEntry addSCProductEntry(
098                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry);
099    
100            public void clearSCLicenseSCProductEntries(long licenseId);
101    
102            /**
103            * Creates a new s c product entry with the primary key. Does not add the s c product entry to the database.
104            *
105            * @param productEntryId the primary key for the new s c product entry
106            * @return the new s c product entry
107            */
108            public com.liferay.portlet.softwarecatalog.model.SCProductEntry createSCProductEntry(
109                    long productEntryId);
110    
111            /**
112            * @throws PortalException
113            */
114            @Override
115            public com.liferay.portal.model.PersistedModel deletePersistedModel(
116                    com.liferay.portal.model.PersistedModel persistedModel)
117                    throws PortalException;
118    
119            public void deleteProductEntries(long groupId) throws PortalException;
120    
121            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
122            public com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteProductEntry(
123                    com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry)
124                    throws PortalException;
125    
126            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
127            public com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteProductEntry(
128                    long productEntryId) throws PortalException;
129    
130            public void deleteSCLicenseSCProductEntries(long licenseId,
131                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> SCProductEntries);
132    
133            public void deleteSCLicenseSCProductEntries(long licenseId,
134                    long[] productEntryIds);
135    
136            public void deleteSCLicenseSCProductEntry(long licenseId,
137                    long productEntryId);
138    
139            public void deleteSCLicenseSCProductEntry(long licenseId,
140                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry);
141    
142            /**
143            * Deletes the s c product entry with the primary key from the database. Also notifies the appropriate model listeners.
144            *
145            * @param productEntryId the primary key of the s c product entry
146            * @return the s c product entry that was removed
147            * @throws PortalException if a s c product entry with the primary key could not be found
148            */
149            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
150            public com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteSCProductEntry(
151                    long productEntryId) throws PortalException;
152    
153            /**
154            * Deletes the s c product entry from the database. Also notifies the appropriate model listeners.
155            *
156            * @param scProductEntry the s c product entry
157            * @return the s c product entry that was removed
158            */
159            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
160            public com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteSCProductEntry(
161                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry);
162    
163            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
164    
165            /**
166            * Performs a dynamic query on the database and returns the matching rows.
167            *
168            * @param dynamicQuery the dynamic query
169            * @return the matching rows
170            */
171            public <T> java.util.List<T> dynamicQuery(
172                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
173    
174            /**
175            * Performs a dynamic query on the database and returns a range of the matching rows.
176            *
177            * <p>
178            * 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.portlet.softwarecatalog.model.impl.SCProductEntryModelImpl}. 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.
179            * </p>
180            *
181            * @param dynamicQuery the dynamic query
182            * @param start the lower bound of the range of model instances
183            * @param end the upper bound of the range of model instances (not inclusive)
184            * @return the range of matching rows
185            */
186            public <T> java.util.List<T> dynamicQuery(
187                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
188                    int end);
189    
190            /**
191            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
192            *
193            * <p>
194            * 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.portlet.softwarecatalog.model.impl.SCProductEntryModelImpl}. 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.
195            * </p>
196            *
197            * @param dynamicQuery the dynamic query
198            * @param start the lower bound of the range of model instances
199            * @param end the upper bound of the range of model instances (not inclusive)
200            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
201            * @return the ordered range of matching rows
202            */
203            public <T> java.util.List<T> dynamicQuery(
204                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
205                    int end,
206                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
207    
208            /**
209            * Returns the number of rows matching the dynamic query.
210            *
211            * @param dynamicQuery the dynamic query
212            * @return the number of rows matching the dynamic query
213            */
214            public long dynamicQueryCount(
215                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
216    
217            /**
218            * Returns the number of rows matching the dynamic query.
219            *
220            * @param dynamicQuery the dynamic query
221            * @param projection the projection to apply to the query
222            * @return the number of rows matching the dynamic query
223            */
224            public long dynamicQueryCount(
225                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
226                    com.liferay.portal.kernel.dao.orm.Projection projection);
227    
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public com.liferay.portlet.softwarecatalog.model.SCProductEntry fetchSCProductEntry(
230                    long productEntryId);
231    
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
234    
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getCompanyProductEntries(
237                    long companyId, int start, int end);
238    
239            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240            public int getCompanyProductEntriesCount(long companyId);
241    
242            /**
243            * Returns the OSGi service identifier.
244            *
245            * @return the OSGi service identifier
246            */
247            public java.lang.String getOSGiServiceIdentifier();
248    
249            @Override
250            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251            public com.liferay.portal.model.PersistedModel getPersistedModel(
252                    java.io.Serializable primaryKeyObj) throws PortalException;
253    
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
256                    long groupId, int start, int end);
257    
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
260                    long groupId, int start, int end,
261                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductEntry> obc);
262    
263            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
265                    long groupId, long userId, int start, int end);
266    
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
269                    long groupId, long userId, int start, int end,
270                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductEntry> obc);
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public int getProductEntriesCount(long groupId);
274    
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public int getProductEntriesCount(long groupId, long userId);
277    
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public com.liferay.portlet.softwarecatalog.model.SCProductEntry getProductEntry(
280                    long productEntryId) throws PortalException;
281    
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public java.lang.String getRepositoryXML(long groupId,
284                    java.lang.String baseImageURL, java.util.Date oldestDate,
285                    int maxNumOfVersions, java.util.Properties repoSettings);
286    
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public java.lang.String getRepositoryXML(long groupId,
289                    java.lang.String version, java.lang.String baseImageURL,
290                    java.util.Date oldestDate, int maxNumOfVersions,
291                    java.util.Properties repoSettings);
292    
293            /**
294            * Returns the licenseIds of the s c licenses associated with the s c product entry.
295            *
296            * @param productEntryId the productEntryId of the s c product entry
297            * @return long[] the licenseIds of s c licenses associated with the s c product entry
298            */
299            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300            public long[] getSCLicensePrimaryKeys(long productEntryId);
301    
302            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCLicenseSCProductEntries(
304                    long licenseId);
305    
306            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCLicenseSCProductEntries(
308                    long licenseId, int start, int end);
309    
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCLicenseSCProductEntries(
312                    long licenseId, int start, int end,
313                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductEntry> orderByComparator);
314    
315            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
316            public int getSCLicenseSCProductEntriesCount(long licenseId);
317    
318            /**
319            * Returns a range of all the s c product entries.
320            *
321            * <p>
322            * 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.portlet.softwarecatalog.model.impl.SCProductEntryModelImpl}. 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.
323            * </p>
324            *
325            * @param start the lower bound of the range of s c product entries
326            * @param end the upper bound of the range of s c product entries (not inclusive)
327            * @return the range of s c product entries
328            */
329            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
331                    int start, int end);
332    
333            /**
334            * Returns the number of s c product entries.
335            *
336            * @return the number of s c product entries
337            */
338            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
339            public int getSCProductEntriesCount();
340    
341            /**
342            * Returns the s c product entry with the primary key.
343            *
344            * @param productEntryId the primary key of the s c product entry
345            * @return the s c product entry
346            * @throws PortalException if a s c product entry with the primary key could not be found
347            */
348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349            public com.liferay.portlet.softwarecatalog.model.SCProductEntry getSCProductEntry(
350                    long productEntryId) throws PortalException;
351    
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public boolean hasSCLicenseSCProductEntries(long licenseId);
354    
355            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356            public boolean hasSCLicenseSCProductEntry(long licenseId,
357                    long productEntryId);
358    
359            public void setSCLicenseSCProductEntries(long licenseId,
360                    long[] productEntryIds);
361    
362            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
363            public com.liferay.portlet.softwarecatalog.model.SCProductEntry updateProductEntry(
364                    long productEntryId, java.lang.String name, java.lang.String type,
365                    java.lang.String tags, java.lang.String shortDescription,
366                    java.lang.String longDescription, java.lang.String pageURL,
367                    java.lang.String author, java.lang.String repoGroupId,
368                    java.lang.String repoArtifactId, long[] licenseIds,
369                    java.util.List<byte[]> thumbnails, java.util.List<byte[]> fullImages)
370                    throws PortalException;
371    
372            /**
373            * Updates the s c product entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
374            *
375            * @param scProductEntry the s c product entry
376            * @return the s c product entry that was updated
377            */
378            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
379            public com.liferay.portlet.softwarecatalog.model.SCProductEntry updateSCProductEntry(
380                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry);
381    }