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 com.liferay.portal.kernel.exception.PortalException;
060    
061            public void addProductEntryResources(
062                    com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry,
063                    boolean addGroupPermissions, boolean addGuestPermissions)
064                    throws com.liferay.portal.kernel.exception.PortalException;
065    
066            public void addProductEntryResources(
067                    com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry,
068                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
069                    throws com.liferay.portal.kernel.exception.PortalException;
070    
071            public void addProductEntryResources(long productEntryId,
072                    boolean addGroupPermissions, boolean addGuestPermissions)
073                    throws com.liferay.portal.kernel.exception.PortalException;
074    
075            public void addProductEntryResources(long productEntryId,
076                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
077                    throws com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.PortalException;
118    
119            public void deleteProductEntries(long groupId)
120                    throws com.liferay.portal.kernel.exception.PortalException;
121    
122            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
123            public com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteProductEntry(
124                    com.liferay.portlet.softwarecatalog.model.SCProductEntry productEntry)
125                    throws com.liferay.portal.kernel.exception.PortalException;
126    
127            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
128            public com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteProductEntry(
129                    long productEntryId)
130                    throws com.liferay.portal.kernel.exception.PortalException;
131    
132            public void deleteSCLicenseSCProductEntries(long licenseId,
133                    java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> SCProductEntries);
134    
135            public void deleteSCLicenseSCProductEntries(long licenseId,
136                    long[] productEntryIds);
137    
138            public void deleteSCLicenseSCProductEntry(long licenseId,
139                    long productEntryId);
140    
141            public void deleteSCLicenseSCProductEntry(long licenseId,
142                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry);
143    
144            /**
145            * Deletes the s c product entry with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param productEntryId the primary key of the s c product entry
148            * @return the s c product entry that was removed
149            * @throws PortalException if a s c product entry with the primary key could not be found
150            */
151            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
152            public com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteSCProductEntry(
153                    long productEntryId)
154                    throws com.liferay.portal.kernel.exception.PortalException;
155    
156            /**
157            * Deletes the s c product entry from the database. Also notifies the appropriate model listeners.
158            *
159            * @param scProductEntry the s c product entry
160            * @return the s c product entry that was removed
161            */
162            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
163            public com.liferay.portlet.softwarecatalog.model.SCProductEntry deleteSCProductEntry(
164                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry);
165    
166            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
167    
168            /**
169            * Performs a dynamic query on the database and returns the matching rows.
170            *
171            * @param dynamicQuery the dynamic query
172            * @return the matching rows
173            */
174            public <T> java.util.List<T> dynamicQuery(
175                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
176    
177            /**
178            * Performs a dynamic query on the database and returns a range of the matching rows.
179            *
180            * <p>
181            * 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.
182            * </p>
183            *
184            * @param dynamicQuery the dynamic query
185            * @param start the lower bound of the range of model instances
186            * @param end the upper bound of the range of model instances (not inclusive)
187            * @return the range of matching rows
188            */
189            public <T> java.util.List<T> dynamicQuery(
190                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
191                    int end);
192    
193            /**
194            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
195            *
196            * <p>
197            * 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.
198            * </p>
199            *
200            * @param dynamicQuery the dynamic query
201            * @param start the lower bound of the range of model instances
202            * @param end the upper bound of the range of model instances (not inclusive)
203            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
204            * @return the ordered range of matching rows
205            */
206            public <T> java.util.List<T> dynamicQuery(
207                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
208                    int end,
209                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
210    
211            /**
212            * Returns the number of rows matching the dynamic query.
213            *
214            * @param dynamicQuery the dynamic query
215            * @return the number of rows matching the dynamic query
216            */
217            public long dynamicQueryCount(
218                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
219    
220            /**
221            * Returns the number of rows matching the dynamic query.
222            *
223            * @param dynamicQuery the dynamic query
224            * @param projection the projection to apply to the query
225            * @return the number of rows matching the dynamic query
226            */
227            public long dynamicQueryCount(
228                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
229                    com.liferay.portal.kernel.dao.orm.Projection projection);
230    
231            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232            public com.liferay.portlet.softwarecatalog.model.SCProductEntry fetchSCProductEntry(
233                    long productEntryId);
234    
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
237    
238            /**
239            * Returns the Spring bean ID for this bean.
240            *
241            * @return the Spring bean ID for this bean
242            */
243            public java.lang.String getBeanIdentifier();
244    
245            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getCompanyProductEntries(
247                    long companyId, int start, int end);
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public int getCompanyProductEntriesCount(long companyId);
251    
252            @Override
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public com.liferay.portal.model.PersistedModel getPersistedModel(
255                    java.io.Serializable primaryKeyObj)
256                    throws com.liferay.portal.kernel.exception.PortalException;
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    
262            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
264                    long groupId, int start, int end,
265                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductEntry> obc);
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    
271            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getProductEntries(
273                    long groupId, long userId, int start, int end,
274                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductEntry> obc);
275    
276            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277            public int getProductEntriesCount(long groupId);
278    
279            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280            public int getProductEntriesCount(long groupId, long userId);
281    
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public com.liferay.portlet.softwarecatalog.model.SCProductEntry getProductEntry(
284                    long productEntryId)
285                    throws com.liferay.portal.kernel.exception.PortalException;
286    
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public java.lang.String getRepositoryXML(long groupId,
289                    java.lang.String baseImageURL, java.util.Date oldestDate,
290                    int maxNumOfVersions, java.util.Properties repoSettings);
291    
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public java.lang.String getRepositoryXML(long groupId,
294                    java.lang.String version, java.lang.String baseImageURL,
295                    java.util.Date oldestDate, int maxNumOfVersions,
296                    java.util.Properties repoSettings);
297    
298            /**
299            * Returns the licenseIds of the s c licenses associated with the s c product entry.
300            *
301            * @param productEntryId the productEntryId of the s c product entry
302            * @return long[] the licenseIds of s c licenses associated with the s c product entry
303            */
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public long[] getSCLicensePrimaryKeys(long productEntryId);
306    
307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCLicenseSCProductEntries(
309                    long licenseId);
310    
311            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCLicenseSCProductEntries(
313                    long licenseId, int start, int end);
314    
315            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
316            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCLicenseSCProductEntries(
317                    long licenseId, int start, int end,
318                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductEntry> orderByComparator);
319    
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public int getSCLicenseSCProductEntriesCount(long licenseId);
322    
323            /**
324            * Returns a range of all the s c product entries.
325            *
326            * <p>
327            * 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.
328            * </p>
329            *
330            * @param start the lower bound of the range of s c product entries
331            * @param end the upper bound of the range of s c product entries (not inclusive)
332            * @return the range of s c product entries
333            */
334            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335            public java.util.List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries(
336                    int start, int end);
337    
338            /**
339            * Returns the number of s c product entries.
340            *
341            * @return the number of s c product entries
342            */
343            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344            public int getSCProductEntriesCount();
345    
346            /**
347            * Returns the s c product entry with the primary key.
348            *
349            * @param productEntryId the primary key of the s c product entry
350            * @return the s c product entry
351            * @throws PortalException if a s c product entry with the primary key could not be found
352            */
353            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
354            public com.liferay.portlet.softwarecatalog.model.SCProductEntry getSCProductEntry(
355                    long productEntryId)
356                    throws com.liferay.portal.kernel.exception.PortalException;
357    
358            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
359            public boolean hasSCLicenseSCProductEntries(long licenseId);
360    
361            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
362            public boolean hasSCLicenseSCProductEntry(long licenseId,
363                    long productEntryId);
364    
365            /**
366            * Sets the Spring bean ID for this bean.
367            *
368            * @param beanIdentifier the Spring bean ID for this bean
369            */
370            public void setBeanIdentifier(java.lang.String beanIdentifier);
371    
372            public void setSCLicenseSCProductEntries(long licenseId,
373                    long[] productEntryIds);
374    
375            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
376            public com.liferay.portlet.softwarecatalog.model.SCProductEntry updateProductEntry(
377                    long productEntryId, java.lang.String name, java.lang.String type,
378                    java.lang.String tags, java.lang.String shortDescription,
379                    java.lang.String longDescription, java.lang.String pageURL,
380                    java.lang.String author, java.lang.String repoGroupId,
381                    java.lang.String repoArtifactId, long[] licenseIds,
382                    java.util.List<byte[]> thumbnails, java.util.List<byte[]> fullImages)
383                    throws com.liferay.portal.kernel.exception.PortalException;
384    
385            /**
386            * Updates the s c product entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
387            *
388            * @param scProductEntry the s c product entry
389            * @return the s c product entry that was updated
390            */
391            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
392            public com.liferay.portlet.softwarecatalog.model.SCProductEntry updateSCProductEntry(
393                    com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry);
394    }