001    /**
002     * Copyright (c) 2000-2012 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.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * The utility for the trash entry remote service. This utility wraps {@link com.liferay.portlet.trash.service.impl.TrashEntryServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
022     *
023     * <p>
024     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see TrashEntryService
029     * @see com.liferay.portlet.trash.service.base.TrashEntryServiceBaseImpl
030     * @see com.liferay.portlet.trash.service.impl.TrashEntryServiceImpl
031     * @generated
032     */
033    public class TrashEntryServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.trash.service.impl.TrashEntryServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Returns the Spring bean ID for this bean.
042            *
043            * @return the Spring bean ID for this bean
044            */
045            public static java.lang.String getBeanIdentifier() {
046                    return getService().getBeanIdentifier();
047            }
048    
049            /**
050            * Sets the Spring bean ID for this bean.
051            *
052            * @param beanIdentifier the Spring bean ID for this bean
053            */
054            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055                    getService().setBeanIdentifier(beanIdentifier);
056            }
057    
058            /**
059            * Deletes the trash entries with the matching group ID considering
060            * permissions.
061            *
062            * @param groupId the primary key of the group
063            * @throws PrincipalException if a principal exception occurred
064            * @throws SystemException if a system exception occurred
065            */
066            public static void deleteEntries(long groupId)
067                    throws com.liferay.portal.kernel.exception.SystemException,
068                            com.liferay.portal.security.auth.PrincipalException {
069                    getService().deleteEntries(groupId);
070            }
071    
072            /**
073            * Returns the trash entries with the matching group ID.
074            *
075            * @param groupId the primary key of the group
076            * @return the matching trash entries
077            * @throws PrincipalException if a principal exception occurred
078            * @throws SystemException if a system exception occurred
079            */
080            public static com.liferay.portlet.trash.model.TrashEntryList getEntries(
081                    long groupId)
082                    throws com.liferay.portal.kernel.exception.SystemException,
083                            com.liferay.portal.security.auth.PrincipalException {
084                    return getService().getEntries(groupId);
085            }
086    
087            /**
088            * Returns a range of all the trash entries matching the group ID.
089            *
090            * @param groupId the primary key of the group
091            * @param start the lower bound of the range of trash entries to return
092            * @param end the upper bound of the range of trash entries to return (not
093            inclusive)
094            * @param obc the comparator to order the trash entries (optionally
095            <code>null</code>)
096            * @return the range of matching trash entries ordered by comparator
097            <code>obc</code>
098            * @throws PrincipalException if a system exception occurred
099            * @throws SystemException if a system exception occurred
100            */
101            public static com.liferay.portlet.trash.model.TrashEntryList getEntries(
102                    long groupId, int start, int end,
103                    com.liferay.portal.kernel.util.OrderByComparator obc)
104                    throws com.liferay.portal.kernel.exception.SystemException,
105                            com.liferay.portal.security.auth.PrincipalException {
106                    return getService().getEntries(groupId, start, end, obc);
107            }
108    
109            public static TrashEntryService getService() {
110                    if (_service == null) {
111                            _service = (TrashEntryService)PortalBeanLocatorUtil.locate(TrashEntryService.class.getName());
112    
113                            ReferenceRegistry.registerReference(TrashEntryServiceUtil.class,
114                                    "_service");
115                    }
116    
117                    return _service;
118            }
119    
120            /**
121             * @deprecated
122             */
123            public void setService(TrashEntryService service) {
124            }
125    
126            private static TrashEntryService _service;
127    }