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 Website. 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 WebsiteLocalServiceUtil
035     * @see com.liferay.portal.service.base.WebsiteLocalServiceBaseImpl
036     * @see com.liferay.portal.service.impl.WebsiteLocalServiceImpl
037     * @generated
038     */
039    @ProviderType
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface WebsiteLocalService extends BaseLocalService,
043            PersistedModelLocalService {
044            /*
045             * NOTE FOR DEVELOPERS:
046             *
047             * Never modify or reference this interface directly. Always use {@link WebsiteLocalServiceUtil} to access the website local service. Add custom service methods to {@link com.liferay.portal.service.impl.WebsiteLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
048             */
049    
050            /**
051            * @deprecated As of 6.2.0, replaced by {@link #addWebsite(long, String,
052            long, String, int, boolean, ServiceContext)}
053            */
054            @java.lang.Deprecated
055            public com.liferay.portal.model.Website addWebsite(long userId,
056                    java.lang.String className, long classPK, java.lang.String url,
057                    int typeId, boolean primary)
058                    throws com.liferay.portal.kernel.exception.PortalException;
059    
060            public com.liferay.portal.model.Website addWebsite(long userId,
061                    java.lang.String className, long classPK, java.lang.String url,
062                    int typeId, boolean primary,
063                    com.liferay.portal.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException;
065    
066            /**
067            * Adds the website to the database. Also notifies the appropriate model listeners.
068            *
069            * @param website the website
070            * @return the website that was added
071            */
072            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
073            public com.liferay.portal.model.Website addWebsite(
074                    com.liferay.portal.model.Website website);
075    
076            /**
077            * Creates a new website with the primary key. Does not add the website to the database.
078            *
079            * @param websiteId the primary key for the new website
080            * @return the new website
081            */
082            public com.liferay.portal.model.Website createWebsite(long websiteId);
083    
084            /**
085            * @throws PortalException
086            */
087            @Override
088            public com.liferay.portal.model.PersistedModel deletePersistedModel(
089                    com.liferay.portal.model.PersistedModel persistedModel)
090                    throws com.liferay.portal.kernel.exception.PortalException;
091    
092            /**
093            * Deletes the website from the database. Also notifies the appropriate model listeners.
094            *
095            * @param website the website
096            * @return the website that was removed
097            */
098            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
099            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
100            public com.liferay.portal.model.Website deleteWebsite(
101                    com.liferay.portal.model.Website website);
102    
103            /**
104            * Deletes the website with the primary key from the database. Also notifies the appropriate model listeners.
105            *
106            * @param websiteId the primary key of the website
107            * @return the website that was removed
108            * @throws PortalException if a website with the primary key could not be found
109            */
110            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
111            public com.liferay.portal.model.Website deleteWebsite(long websiteId)
112                    throws com.liferay.portal.kernel.exception.PortalException;
113    
114            public void deleteWebsites(long companyId, java.lang.String className,
115                    long classPK);
116    
117            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
118    
119            /**
120            * Performs a dynamic query on the database and returns the matching rows.
121            *
122            * @param dynamicQuery the dynamic query
123            * @return the matching rows
124            */
125            public <T> java.util.List<T> dynamicQuery(
126                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
127    
128            /**
129            * Performs a dynamic query on the database and returns a range of the matching rows.
130            *
131            * <p>
132            * 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.WebsiteModelImpl}. 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.
133            * </p>
134            *
135            * @param dynamicQuery the dynamic query
136            * @param start the lower bound of the range of model instances
137            * @param end the upper bound of the range of model instances (not inclusive)
138            * @return the range of matching rows
139            */
140            public <T> java.util.List<T> dynamicQuery(
141                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
142                    int end);
143    
144            /**
145            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
146            *
147            * <p>
148            * 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.WebsiteModelImpl}. 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.
149            * </p>
150            *
151            * @param dynamicQuery the dynamic query
152            * @param start the lower bound of the range of model instances
153            * @param end the upper bound of the range of model instances (not inclusive)
154            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
155            * @return the ordered range of matching rows
156            */
157            public <T> java.util.List<T> dynamicQuery(
158                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
159                    int end,
160                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
161    
162            /**
163            * Returns the number of rows matching the dynamic query.
164            *
165            * @param dynamicQuery the dynamic query
166            * @return the number of rows matching the dynamic query
167            */
168            public long dynamicQueryCount(
169                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
170    
171            /**
172            * Returns the number of rows matching the dynamic query.
173            *
174            * @param dynamicQuery the dynamic query
175            * @param projection the projection to apply to the query
176            * @return the number of rows matching the dynamic query
177            */
178            public long dynamicQueryCount(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
180                    com.liferay.portal.kernel.dao.orm.Projection projection);
181    
182            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183            public com.liferay.portal.model.Website fetchWebsite(long websiteId);
184    
185            /**
186            * Returns the website with the matching UUID and company.
187            *
188            * @param uuid the website's UUID
189            * @param companyId the primary key of the company
190            * @return the matching website, or <code>null</code> if a matching website could not be found
191            */
192            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193            public com.liferay.portal.model.Website fetchWebsiteByUuidAndCompanyId(
194                    java.lang.String uuid, long companyId);
195    
196            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
198    
199            /**
200            * Returns the Spring bean ID for this bean.
201            *
202            * @return the Spring bean ID for this bean
203            */
204            public java.lang.String getBeanIdentifier();
205    
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
208                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
209    
210            @Override
211            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212            public com.liferay.portal.model.PersistedModel getPersistedModel(
213                    java.io.Serializable primaryKeyObj)
214                    throws com.liferay.portal.kernel.exception.PortalException;
215    
216            /**
217            * Returns the website with the primary key.
218            *
219            * @param websiteId the primary key of the website
220            * @return the website
221            * @throws PortalException if a website with the primary key could not be found
222            */
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public com.liferay.portal.model.Website getWebsite(long websiteId)
225                    throws com.liferay.portal.kernel.exception.PortalException;
226    
227            /**
228            * Returns the website with the matching UUID and company.
229            *
230            * @param uuid the website's UUID
231            * @param companyId the primary key of the company
232            * @return the matching website
233            * @throws PortalException if a matching website could not be found
234            */
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public com.liferay.portal.model.Website getWebsiteByUuidAndCompanyId(
237                    java.lang.String uuid, long companyId)
238                    throws com.liferay.portal.kernel.exception.PortalException;
239    
240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241            public java.util.List<com.liferay.portal.model.Website> getWebsites();
242    
243            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244            public java.util.List<com.liferay.portal.model.Website> getWebsites(
245                    long companyId, java.lang.String className, long classPK);
246    
247            /**
248            * Returns a range of all the websites.
249            *
250            * <p>
251            * 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.WebsiteModelImpl}. 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.
252            * </p>
253            *
254            * @param start the lower bound of the range of websites
255            * @param end the upper bound of the range of websites (not inclusive)
256            * @return the range of websites
257            */
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public java.util.List<com.liferay.portal.model.Website> getWebsites(
260                    int start, int end);
261    
262            /**
263            * Returns the number of websites.
264            *
265            * @return the number of websites
266            */
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public int getWebsitesCount();
269    
270            /**
271            * Sets the Spring bean ID for this bean.
272            *
273            * @param beanIdentifier the Spring bean ID for this bean
274            */
275            public void setBeanIdentifier(java.lang.String beanIdentifier);
276    
277            /**
278            * Updates the website in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
279            *
280            * @param website the website
281            * @return the website that was updated
282            */
283            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
284            public com.liferay.portal.model.Website updateWebsite(
285                    com.liferay.portal.model.Website website);
286    
287            public com.liferay.portal.model.Website updateWebsite(long websiteId,
288                    java.lang.String url, int typeId, boolean primary)
289                    throws com.liferay.portal.kernel.exception.PortalException;
290    }