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     * The utility for the i g folder remote service. This utility wraps {@link com.liferay.portlet.imagegallery.service.impl.IGFolderServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.imagegallery.service.impl.IGFolderServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * 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.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see IGFolderService
032     * @see com.liferay.portlet.imagegallery.service.base.IGFolderServiceBaseImpl
033     * @see com.liferay.portlet.imagegallery.service.impl.IGFolderServiceImpl
034     * @generated
035     */
036    public class IGFolderServiceUtil {
037            public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
038                    long parentFolderId, java.lang.String name,
039                    java.lang.String description,
040                    com.liferay.portal.service.ServiceContext serviceContext)
041                    throws com.liferay.portal.kernel.exception.PortalException,
042                            com.liferay.portal.kernel.exception.SystemException {
043                    return getService()
044                                       .addFolder(parentFolderId, name, description, serviceContext);
045            }
046    
047            public static com.liferay.portlet.imagegallery.model.IGFolder copyFolder(
048                    long sourceFolderId, long parentFolderId, java.lang.String name,
049                    java.lang.String description,
050                    com.liferay.portal.service.ServiceContext serviceContext)
051                    throws com.liferay.portal.kernel.exception.PortalException,
052                            com.liferay.portal.kernel.exception.SystemException {
053                    return getService()
054                                       .copyFolder(sourceFolderId, parentFolderId, name,
055                            description, serviceContext);
056            }
057    
058            public static void deleteFolder(long folderId)
059                    throws com.liferay.portal.kernel.exception.PortalException,
060                            com.liferay.portal.kernel.exception.SystemException {
061                    getService().deleteFolder(folderId);
062            }
063    
064            public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
065                    long folderId)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    return getService().getFolder(folderId);
069            }
070    
071            public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
072                    long groupId, long parentFolderId, java.lang.String name)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    return getService().getFolder(groupId, parentFolderId, name);
076            }
077    
078            public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
079                    long groupId, long parentFolderId)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    return getService().getFolders(groupId, parentFolderId);
082            }
083    
084            public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
085                    long groupId, long parentFolderId, int start, int end)
086                    throws com.liferay.portal.kernel.exception.SystemException {
087                    return getService().getFolders(groupId, parentFolderId, start, end);
088            }
089    
090            public static int getFoldersCount(long groupId, long parentFolderId)
091                    throws com.liferay.portal.kernel.exception.SystemException {
092                    return getService().getFoldersCount(groupId, parentFolderId);
093            }
094    
095            public static com.liferay.portlet.imagegallery.model.IGFolder updateFolder(
096                    long folderId, long parentFolderId, java.lang.String name,
097                    java.lang.String description, boolean mergeWithParentFolder,
098                    com.liferay.portal.service.ServiceContext serviceContext)
099                    throws com.liferay.portal.kernel.exception.PortalException,
100                            com.liferay.portal.kernel.exception.SystemException {
101                    return getService()
102                                       .updateFolder(folderId, parentFolderId, name, description,
103                            mergeWithParentFolder, serviceContext);
104            }
105    
106            public static IGFolderService getService() {
107                    if (_service == null) {
108                            _service = (IGFolderService)PortalBeanLocatorUtil.locate(IGFolderService.class.getName());
109                    }
110    
111                    return _service;
112            }
113    
114            public void setService(IGFolderService service) {
115                    _service = service;
116            }
117    
118            private static IGFolderService _service;
119    }