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