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            */
040            @Override
041            public void deleteEntries(long[] entryIds)
042                    throws com.liferay.portal.kernel.exception.PortalException {
043                    _trashEntryService.deleteEntries(entryIds);
044            }
045    
046            /**
047            * Deletes the trash entries with the matching group ID considering
048            * permissions.
049            *
050            * @param groupId the primary key of the group
051            */
052            @Override
053            public void deleteEntries(long groupId)
054                    throws com.liferay.portal.kernel.exception.PortalException {
055                    _trashEntryService.deleteEntries(groupId);
056            }
057    
058            /**
059            * Deletes the trash entry with the entity class name and class primary key.
060            *
061            * <p>
062            * This method throws a {@link TrashPermissionException} with type {@link
063            * TrashPermissionException#DELETE} if the user did not have permission to
064            * delete the trash entry.
065            * </p>
066            *
067            * @param className the class name of the entity
068            * @param classPK the primary key of the entity
069            */
070            @Override
071            public void deleteEntry(java.lang.String className, long classPK)
072                    throws com.liferay.portal.kernel.exception.PortalException {
073                    _trashEntryService.deleteEntry(className, classPK);
074            }
075    
076            /**
077            * Deletes the trash entry with the primary key.
078            *
079            * <p>
080            * This method throws a {@link TrashPermissionException} with type {@link
081            * TrashPermissionException#DELETE} if the user did not have permission to
082            * delete the trash entry.
083            * </p>
084            *
085            * @param entryId the primary key of the trash entry
086            */
087            @Override
088            public void deleteEntry(long entryId)
089                    throws com.liferay.portal.kernel.exception.PortalException {
090                    _trashEntryService.deleteEntry(entryId);
091            }
092    
093            /**
094            * Returns the trash entries with the matching group ID.
095            *
096            * @param groupId the primary key of the group
097            * @return the matching trash entries
098            */
099            @Override
100            public com.liferay.portlet.trash.model.TrashEntryList getEntries(
101                    long groupId)
102                    throws com.liferay.portal.security.auth.PrincipalException {
103                    return _trashEntryService.getEntries(groupId);
104            }
105    
106            @Override
107            public java.util.List<com.liferay.portlet.trash.model.TrashEntry> getEntries(
108                    long groupId, java.lang.String className)
109                    throws com.liferay.portal.security.auth.PrincipalException {
110                    return _trashEntryService.getEntries(groupId, className);
111            }
112    
113            /**
114            * Returns a range of all the trash entries matching the group ID.
115            *
116            * @param groupId the primary key of the group
117            * @param start the lower bound of the range of trash entries to return
118            * @param end the upper bound of the range of trash entries to return (not
119            inclusive)
120            * @param obc the comparator to order the trash entries (optionally
121            <code>null</code>)
122            * @return the range of matching trash entries ordered by comparator
123            <code>obc</code>
124            */
125            @Override
126            public com.liferay.portlet.trash.model.TrashEntryList getEntries(
127                    long groupId, int start, int end,
128                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.trash.model.TrashEntry> obc)
129                    throws com.liferay.portal.security.auth.PrincipalException {
130                    return _trashEntryService.getEntries(groupId, start, end, obc);
131            }
132    
133            /**
134            * Returns the OSGi service identifier.
135            *
136            * @return the OSGi service identifier
137            */
138            @Override
139            public java.lang.String getOSGiServiceIdentifier() {
140                    return _trashEntryService.getOSGiServiceIdentifier();
141            }
142    
143            /**
144            * Moves the trash entry with the entity class name and primary key,
145            * restoring it to a new location identified by the destination container
146            * model ID.
147            *
148            * <p>
149            * This method throws a {@link TrashPermissionException} if the user did not
150            * have the permission to perform one of the necessary operations. The
151            * exception is created with a type specific to the operation:
152            * </p>
153            *
154            * <ul>
155            * <li>
156            * {@link TrashPermissionException#MOVE} - if the user did not have
157            * permission to move the trash entry to the new
158            * destination
159            * </li>
160            * <li>
161            * {@link TrashPermissionException#RESTORE} - if the user did not have
162            * permission to restore the trash entry
163            * </li>
164            * </ul>
165            *
166            * @param className the class name of the entity
167            * @param classPK the primary key of the entity
168            * @param destinationContainerModelId the primary key of the new location
169            * @param serviceContext the service context to be applied (optionally
170            <code>null</code>)
171            */
172            @Override
173            public void moveEntry(java.lang.String className, long classPK,
174                    long destinationContainerModelId,
175                    com.liferay.portal.service.ServiceContext serviceContext)
176                    throws com.liferay.portal.kernel.exception.PortalException {
177                    _trashEntryService.moveEntry(className, classPK,
178                            destinationContainerModelId, serviceContext);
179            }
180    
181            @Override
182            public com.liferay.portlet.trash.model.TrashEntry restoreEntry(
183                    java.lang.String className, long classPK)
184                    throws com.liferay.portal.kernel.exception.PortalException {
185                    return _trashEntryService.restoreEntry(className, classPK);
186            }
187    
188            @Override
189            public com.liferay.portlet.trash.model.TrashEntry restoreEntry(
190                    java.lang.String className, long classPK, long overrideClassPK,
191                    java.lang.String name)
192                    throws com.liferay.portal.kernel.exception.PortalException {
193                    return _trashEntryService.restoreEntry(className, classPK,
194                            overrideClassPK, name);
195            }
196    
197            @Override
198            public com.liferay.portlet.trash.model.TrashEntry restoreEntry(long entryId)
199                    throws com.liferay.portal.kernel.exception.PortalException {
200                    return _trashEntryService.restoreEntry(entryId);
201            }
202    
203            /**
204            * Restores the trash entry to its original location. In order to handle a
205            * duplicate trash entry already existing at the original location, either
206            * pass in the primary key of the existing trash entry's entity to overwrite
207            * or pass in a new name to give to the trash entry being restored.
208            *
209            * <p>
210            * This method throws a {@link TrashPermissionException} if the user did not
211            * have the permission to perform one of the necessary operations. The
212            * exception is created with a type specific to the operation:
213            * </p>
214            *
215            * <ul>
216            * <li>
217            * {@link TrashPermissionException#RESTORE} - if the user did not have
218            * permission to restore the trash entry
219            * </li>
220            * <li>
221            * {@link TrashPermissionException#RESTORE_OVERWRITE} - if the user did not
222            * have permission to delete the existing trash entry
223            * </li>
224            * <li>
225            * {@link TrashPermissionException#RESTORE_RENAME} - if the user did not
226            * have permission to rename the trash entry
227            * </li>
228            * </ul>
229            *
230            * @param entryId the primary key of the trash entry to restore
231            * @param overrideClassPK the primary key of the entity to overwrite
232            (optionally <code>0</code>)
233            * @param name a new name to give to the trash entry being restored
234            (optionally <code>null</code>)
235            * @return the restored trash entry
236            */
237            @Override
238            public com.liferay.portlet.trash.model.TrashEntry restoreEntry(
239                    long entryId, long overrideClassPK, java.lang.String name)
240                    throws com.liferay.portal.kernel.exception.PortalException {
241                    return _trashEntryService.restoreEntry(entryId, overrideClassPK, name);
242            }
243    
244            @Override
245            public TrashEntryService getWrappedService() {
246                    return _trashEntryService;
247            }
248    
249            @Override
250            public void setWrappedService(TrashEntryService trashEntryService) {
251                    _trashEntryService = trashEntryService;
252            }
253    
254            private TrashEntryService _trashEntryService;
255    }