001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.tasks.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the tasks proposal remote service. This utility wraps {@link com.liferay.portlet.tasks.service.impl.TasksProposalServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * 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.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see TasksProposalService
030     * @see com.liferay.portlet.tasks.service.base.TasksProposalServiceBaseImpl
031     * @see com.liferay.portlet.tasks.service.impl.TasksProposalServiceImpl
032     * @generated
033     */
034    public class TasksProposalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.tasks.service.impl.TasksProposalServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
041                    long groupId, java.lang.String className, java.lang.String classPK,
042                    java.lang.String name, java.lang.String description, long reviewUserId,
043                    boolean addCommunityPermissions, boolean addGuestPermissions)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException {
046                    return getService()
047                                       .addProposal(groupId, className, classPK, name, description,
048                            reviewUserId, addCommunityPermissions, addGuestPermissions);
049            }
050    
051            public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
052                    long groupId, java.lang.String className, java.lang.String classPK,
053                    java.lang.String name, java.lang.String description, long reviewUserId,
054                    java.lang.String[] communityPermissions,
055                    java.lang.String[] guestPermissions)
056                    throws com.liferay.portal.kernel.exception.PortalException,
057                            com.liferay.portal.kernel.exception.SystemException {
058                    return getService()
059                                       .addProposal(groupId, className, classPK, name, description,
060                            reviewUserId, communityPermissions, guestPermissions);
061            }
062    
063            public static void deleteProposal(long proposalId)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    getService().deleteProposal(proposalId);
067            }
068    
069            public static com.liferay.portlet.tasks.model.TasksProposal updateProposal(
070                    long proposalId, java.lang.String description, int dueDateMonth,
071                    int dueDateDay, int dueDateYear, int dueDateHour, int dueDateMinute)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException {
074                    return getService()
075                                       .updateProposal(proposalId, description, dueDateMonth,
076                            dueDateDay, dueDateYear, dueDateHour, dueDateMinute);
077            }
078    
079            public static TasksProposalService getService() {
080                    if (_service == null) {
081                            _service = (TasksProposalService)PortalBeanLocatorUtil.locate(TasksProposalService.class.getName());
082    
083                            ReferenceRegistry.registerReference(TasksProposalServiceUtil.class,
084                                    "_service");
085                            MethodCache.remove(TasksProposalService.class);
086                    }
087    
088                    return _service;
089            }
090    
091            public void setService(TasksProposalService service) {
092                    MethodCache.remove(TasksProposalService.class);
093    
094                    _service = service;
095    
096                    ReferenceRegistry.registerReference(TasksProposalServiceUtil.class,
097                            "_service");
098                    MethodCache.remove(TasksProposalService.class);
099            }
100    
101            private static TasksProposalService _service;
102    }