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.imagegallery.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link IGFolderService} 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       IGFolderService
030     * @generated
031     */
032    public class IGFolderServiceUtil {
033            public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
034                    long parentFolderId, java.lang.String name,
035                    java.lang.String description,
036                    com.liferay.portal.service.ServiceContext serviceContext)
037                    throws com.liferay.portal.kernel.exception.PortalException,
038                            com.liferay.portal.kernel.exception.SystemException {
039                    return getService()
040                                       .addFolder(parentFolderId, name, description, serviceContext);
041            }
042    
043            public static com.liferay.portlet.imagegallery.model.IGFolder copyFolder(
044                    long sourceFolderId, long parentFolderId, java.lang.String name,
045                    java.lang.String description,
046                    com.liferay.portal.service.ServiceContext serviceContext)
047                    throws com.liferay.portal.kernel.exception.PortalException,
048                            com.liferay.portal.kernel.exception.SystemException {
049                    return getService()
050                                       .copyFolder(sourceFolderId, parentFolderId, name,
051                            description, serviceContext);
052            }
053    
054            public static void deleteFolder(long folderId)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    getService().deleteFolder(folderId);
058            }
059    
060            public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
061                    long folderId)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException {
064                    return getService().getFolder(folderId);
065            }
066    
067            public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
068                    long groupId, long parentFolderId, java.lang.String name)
069                    throws com.liferay.portal.kernel.exception.PortalException,
070                            com.liferay.portal.kernel.exception.SystemException {
071                    return getService().getFolder(groupId, parentFolderId, name);
072            }
073    
074            public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
075                    long groupId, long parentFolderId)
076                    throws com.liferay.portal.kernel.exception.SystemException {
077                    return getService().getFolders(groupId, parentFolderId);
078            }
079    
080            public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
081                    long groupId, long parentFolderId, int start, int end)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getService().getFolders(groupId, parentFolderId, start, end);
084            }
085    
086            public static int getFoldersCount(long groupId, long parentFolderId)
087                    throws com.liferay.portal.kernel.exception.SystemException {
088                    return getService().getFoldersCount(groupId, parentFolderId);
089            }
090    
091            public static com.liferay.portlet.imagegallery.model.IGFolder updateFolder(
092                    long folderId, long parentFolderId, java.lang.String name,
093                    java.lang.String description, boolean mergeWithParentFolder,
094                    com.liferay.portal.service.ServiceContext serviceContext)
095                    throws com.liferay.portal.kernel.exception.PortalException,
096                            com.liferay.portal.kernel.exception.SystemException {
097                    return getService()
098                                       .updateFolder(folderId, parentFolderId, name, description,
099                            mergeWithParentFolder, serviceContext);
100            }
101    
102            public static IGFolderService getService() {
103                    if (_service == null) {
104                            _service = (IGFolderService)PortalBeanLocatorUtil.locate(IGFolderService.class.getName());
105                    }
106    
107                    return _service;
108            }
109    
110            public void setService(IGFolderService service) {
111                    _service = service;
112            }
113    
114            private static IGFolderService _service;
115    }