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.trash.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.service.ServiceWrapper;
020    
021    /**
022     * Provides a wrapper for {@link TrashEntryService}.
023     *
024     * @author Brian Wing Shun Chan
025     * @see TrashEntryService
026     * @generated
027     */
028    @ProviderType
029    public class TrashEntryServiceWrapper implements TrashEntryService,
030            ServiceWrapper<TrashEntryService> {
031            public TrashEntryServiceWrapper(TrashEntryService trashEntryService) {
032                    _trashEntryService = trashEntryService;
033            }
034    
035            /**
036            * Deletes the trash entries with the primary keys.
037            *
038            * @param entryIds the primary keys of the trash entries
039            * @throws PortalException if a trash entry with the primary key could not
040            be found or if the user did not have permission to delete any one
041            of the trash entries
042            */
043            @Override
044            public void deleteEntries(long[] entryIds)
045                    throws com.liferay.portal.kernel.exception.PortalException {
046                    _trashEntryService.deleteEntries(entryIds);
047            }
048    
049            /**
050            * Deletes the trash entries with the matching group ID considering
051            * permissions.
052            *
053            * @param groupId the primary key of the group
054            * @throws PortalException if a portal exception occurred
055            */
056            @Override
057            public void deleteEntries(long groupId)
058                    throws com.liferay.portal.kernel.exception.PortalException {
059                    _trashEntryService.deleteEntries(groupId);
060            }
061    
062            /**
063            * Deletes the trash entry with the entity class name and class primary key.
064            *
065            * <p>
066            * This method throws a {@link TrashPermissionException} with type {@link
067            * TrashPermissionException#DELETE} if the user did not have permission to
068            * delete the trash entry.
069            * </p>
070            *
071            * @param className the class name of the entity
072            * @param classPK the primary key of the entity
073            * @throws PortalException if a trash entry with the entity class name and
074            primary key could not be found or if the user did not have
075            permission to delete the entry
076            */
077            @Override
078            public void deleteEntry(java.lang.String className, long classPK)
079                    throws com.liferay.portal.kernel.exception.PortalException {
080                    _trashEntryService.deleteEntry(className, classPK);
081            }
082    
083            /**
084            * Deletes the trash entry with the primary key.
085            *
086            * <p>
087            * This method throws a {@link TrashPermissionException} with type {@link
088            * TrashPermissionException#DELETE} if the user did not have permission to
089            * delete the trash entry.
090            * </p>
091            *
092            * @param entryId the primary key of the trash entry
093            * @throws PortalException if a trash entry with the primary key could not
094            be found or if the user did not have permission to delete the
095            trash entry
096            */
097            @Override
098            public void deleteEntry(long entryId)
099                    throws com.liferay.portal.kernel.exception.PortalException {
100                    _trashEntryService.deleteEntry(entryId);
101            }
102    
103            /**
104            * Returns the Spring bean ID for this bean.
105            *
106            * @return the Spring bean ID for this bean
107            */
108            @Override
109            public java.lang.String getBeanIdentifier() {
110                    return _trashEntryService.getBeanIdentifier();
111            }
112    
113            /**
114            * Returns the trash entries with the matching group ID.
115            *
116            * @param groupId the primary key of the group
117            * @return the matching trash entries
118            * @throws PrincipalException if a principal exception occurred
119            */
120            @Override
121            public com.liferay.portlet.trash.model.TrashEntryList getEntries(
122                    long groupId)
123                    throws com.liferay.portal.security.auth.PrincipalException {
124                    return _trashEntryService.getEntries(groupId);
125            }
126    
127            @Override
128            public java.util.List<com.liferay.portlet.trash.model.TrashEntry> getEntries(
129                    long groupId, java.lang.String className)
130                    throws com.liferay.portal.security.auth.PrincipalException {
131                    return _trashEntryService.getEntries(groupId, className);
132            }
133    
134            /**
135            * Returns a range of all the trash entries matching the group ID.
136            *
137            * @param groupId the primary key of the group
138            * @param start the lower bound of the range of trash entries to return
139            * @param end the upper bound of the range of trash entries to return (not
140            inclusive)
141            * @param obc the comparator to order the trash entries (optionally
142            <code>null</code>)
143            * @return the range of matching trash entries ordered by comparator
144            <code>obc</code>
145            * @throws PrincipalException if a system exception occurred
146            */
147            @Override
148            public com.liferay.portlet.trash.model.TrashEntryList getEntries(
149                    long groupId, int start, int end,
150                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.trash.model.TrashEntry> obc)
151                    throws com.liferay.portal.security.auth.PrincipalException {
152                    return _trashEntryService.getEntries(groupId, start, end, obc);
153            }
154    
155            /**
156            * Moves the trash entry with the entity class name and primary key,
157            * restoring it to a new location identified by the destination container
158            * model ID.
159            *
160            * <p>
161            * This method throws a {@link TrashPermissionException} if the user did not
162            * have the permission to perform one of the necessary operations. The
163            * exception is created with a type specific to the operation:
164            * </p>
165            *
166            * <ul>
167            * <li>
168            * {@link TrashPermissionException#MOVE} - if the user did not have
169            * permission to move the trash entry to the new
170            * destination
171            * </li>
172            * <li>
173            * {@link TrashPermissionException#RESTORE} - if the user did not have
174            * permission to restore the trash entry
175            * </li>
176            * </ul>
177            *
178            * @param className the class name of the entity
179            * @param classPK the primary key of the entity
180            * @param destinationContainerModelId the primary key of the new location
181            * @param serviceContext the service context to be applied (optionally
182            <code>null</code>)
183            * @throws PortalException if a matching trash entry could not be found, if
184            the user did not have permission to move the trash entry to the
185            new location, if the user did not have permission to restore the
186            trash entry, if a duplicate trash entry exists at the new
187            location, or if a portal exception occurred
188            */
189            @Override
190            public void moveEntry(java.lang.String className, long classPK,
191                    long destinationContainerModelId,
192                    com.liferay.portal.service.ServiceContext serviceContext)
193                    throws com.liferay.portal.kernel.exception.PortalException {
194                    _trashEntryService.moveEntry(className, classPK,
195                            destinationContainerModelId, serviceContext);
196            }
197    
198            @Override
199            public com.liferay.portlet.trash.model.TrashEntry restoreEntry(
200                    java.lang.String className, long classPK)
201                    throws com.liferay.portal.kernel.exception.PortalException {
202                    return _trashEntryService.restoreEntry(className, classPK);
203            }
204    
205            @Override
206            public com.liferay.portlet.trash.model.TrashEntry restoreEntry(
207                    java.lang.String className, long classPK, long overrideClassPK,
208                    java.lang.String name)
209                    throws com.liferay.portal.kernel.exception.PortalException {
210                    return _trashEntryService.restoreEntry(className, classPK,
211                            overrideClassPK, name);
212            }
213    
214            @Override
215            public com.liferay.portlet.trash.model.TrashEntry restoreEntry(long entryId)
216                    throws com.liferay.portal.kernel.exception.PortalException {
217                    return _trashEntryService.restoreEntry(entryId);
218            }
219    
220            /**
221            * Restores the trash entry to its original location. In order to handle a
222            * duplicate trash entry already existing at the original location, either
223            * pass in the primary key of the existing trash entry's entity to overwrite
224            * or pass in a new name to give to the trash entry being restored.
225            *
226            * <p>
227            * This method throws a {@link TrashPermissionException} if the user did not
228            * have the permission to perform one of the necessary operations. The
229            * exception is created with a type specific to the operation:
230            * </p>
231            *
232            * <ul>
233            * <li>
234            * {@link TrashPermissionException#RESTORE} - if the user did not have
235            * permission to restore the trash entry
236            * </li>
237            * <li>
238            * {@link TrashPermissionException#RESTORE_OVERWRITE} - if the user did not
239            * have permission to delete the existing trash entry
240            * </li>
241            * <li>
242            * {@link TrashPermissionException#RESTORE_RENAME} - if the user did not
243            * have permission to rename the trash entry
244            * </li>
245            * </ul>
246            *
247            * @param entryId the primary key of the trash entry to restore
248            * @param overrideClassPK the primary key of the entity to overwrite
249            (optionally <code>0</code>)
250            * @param name a new name to give to the trash entry being restored
251            (optionally <code>null</code>)
252            * @return the restored trash entry
253            * @throws PortalException if a matching trash entry could not be found, if
254            the user did not have permission to overwrite an existing trash
255            entry, to rename the trash entry being restored, or to restore
256            the trash entry in general
257            */
258            @Override
259            public com.liferay.portlet.trash.model.TrashEntry restoreEntry(
260                    long entryId, long overrideClassPK, java.lang.String name)
261                    throws com.liferay.portal.kernel.exception.PortalException {
262                    return _trashEntryService.restoreEntry(entryId, overrideClassPK, name);
263            }
264    
265            /**
266            * Sets the Spring bean ID for this bean.
267            *
268            * @param beanIdentifier the Spring bean ID for this bean
269            */
270            @Override
271            public void setBeanIdentifier(java.lang.String beanIdentifier) {
272                    _trashEntryService.setBeanIdentifier(beanIdentifier);
273            }
274    
275            /**
276             * @deprecated As of 6.1.0, replaced by {@link #getWrappedService}
277             */
278            @Deprecated
279            public TrashEntryService getWrappedTrashEntryService() {
280                    return _trashEntryService;
281            }
282    
283            /**
284             * @deprecated As of 6.1.0, replaced by {@link #setWrappedService}
285             */
286            @Deprecated
287            public void setWrappedTrashEntryService(TrashEntryService trashEntryService) {
288                    _trashEntryService = trashEntryService;
289            }
290    
291            @Override
292            public TrashEntryService getWrappedService() {
293                    return _trashEntryService;
294            }
295    
296            @Override
297            public void setWrappedService(TrashEntryService trashEntryService) {
298                    _trashEntryService = trashEntryService;
299            }
300    
301            private TrashEntryService _trashEntryService;
302    }