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