001    /**
002     * Copyright (c) 2000-2010 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.tasks.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link TasksProposalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       TasksProposalService
030     * @generated
031     */
032    public class TasksProposalServiceUtil {
033            public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
034                    long groupId, java.lang.String className, java.lang.String classPK,
035                    java.lang.String name, java.lang.String description, long reviewUserId,
036                    boolean addCommunityPermissions, boolean addGuestPermissions)
037                    throws com.liferay.portal.kernel.exception.PortalException,
038                            com.liferay.portal.kernel.exception.SystemException {
039                    return getService()
040                                       .addProposal(groupId, className, classPK, name, description,
041                            reviewUserId, addCommunityPermissions, addGuestPermissions);
042            }
043    
044            public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
045                    long groupId, java.lang.String className, java.lang.String classPK,
046                    java.lang.String name, java.lang.String description, long reviewUserId,
047                    java.lang.String[] communityPermissions,
048                    java.lang.String[] guestPermissions)
049                    throws com.liferay.portal.kernel.exception.PortalException,
050                            com.liferay.portal.kernel.exception.SystemException {
051                    return getService()
052                                       .addProposal(groupId, className, classPK, name, description,
053                            reviewUserId, communityPermissions, guestPermissions);
054            }
055    
056            public static void deleteProposal(long proposalId)
057                    throws com.liferay.portal.kernel.exception.PortalException,
058                            com.liferay.portal.kernel.exception.SystemException {
059                    getService().deleteProposal(proposalId);
060            }
061    
062            public static com.liferay.portlet.tasks.model.TasksProposal updateProposal(
063                    long proposalId, java.lang.String description, int dueDateMonth,
064                    int dueDateDay, int dueDateYear, int dueDateHour, int dueDateMinute)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    return getService()
068                                       .updateProposal(proposalId, description, dueDateMonth,
069                            dueDateDay, dueDateYear, dueDateHour, dueDateMinute);
070            }
071    
072            public static TasksProposalService getService() {
073                    if (_service == null) {
074                            _service = (TasksProposalService)PortalBeanLocatorUtil.locate(TasksProposalService.class.getName());
075                    }
076    
077                    return _service;
078            }
079    
080            public void setService(TasksProposalService service) {
081                    _service = service;
082            }
083    
084            private static TasksProposalService _service;
085    }