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.imagegallery.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 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.
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 IGFolderService
030     * @see com.liferay.portlet.imagegallery.service.base.IGFolderServiceBaseImpl
031     * @see com.liferay.portlet.imagegallery.service.impl.IGFolderServiceImpl
032     * @generated
033     */
034    public class IGFolderServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * 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.
039             */
040            public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
041                    long parentFolderId, java.lang.String name,
042                    java.lang.String description,
043                    com.liferay.portal.service.ServiceContext serviceContext)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException {
046                    return getService()
047                                       .addFolder(parentFolderId, name, description, serviceContext);
048            }
049    
050            public static com.liferay.portlet.imagegallery.model.IGFolder copyFolder(
051                    long sourceFolderId, long parentFolderId, java.lang.String name,
052                    java.lang.String description,
053                    com.liferay.portal.service.ServiceContext serviceContext)
054                    throws com.liferay.portal.kernel.exception.PortalException,
055                            com.liferay.portal.kernel.exception.SystemException {
056                    return getService()
057                                       .copyFolder(sourceFolderId, parentFolderId, name,
058                            description, serviceContext);
059            }
060    
061            public static void deleteFolder(long folderId)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException {
064                    getService().deleteFolder(folderId);
065            }
066    
067            public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
068                    long folderId)
069                    throws com.liferay.portal.kernel.exception.PortalException,
070                            com.liferay.portal.kernel.exception.SystemException {
071                    return getService().getFolder(folderId);
072            }
073    
074            public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
075                    long groupId, long parentFolderId, java.lang.String name)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    return getService().getFolder(groupId, parentFolderId, name);
079            }
080    
081            public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
082                    long groupId, long parentFolderId)
083                    throws com.liferay.portal.kernel.exception.SystemException {
084                    return getService().getFolders(groupId, parentFolderId);
085            }
086    
087            public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
088                    long groupId, long parentFolderId, int start, int end)
089                    throws com.liferay.portal.kernel.exception.SystemException {
090                    return getService().getFolders(groupId, parentFolderId, start, end);
091            }
092    
093            public static int getFoldersCount(long groupId, long parentFolderId)
094                    throws com.liferay.portal.kernel.exception.SystemException {
095                    return getService().getFoldersCount(groupId, parentFolderId);
096            }
097    
098            public static void getSubfolderIds(
099                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    getService().getSubfolderIds(folderIds, groupId, folderId);
102            }
103    
104            public static com.liferay.portlet.imagegallery.model.IGFolder updateFolder(
105                    long folderId, long parentFolderId, java.lang.String name,
106                    java.lang.String description, boolean mergeWithParentFolder,
107                    com.liferay.portal.service.ServiceContext serviceContext)
108                    throws com.liferay.portal.kernel.exception.PortalException,
109                            com.liferay.portal.kernel.exception.SystemException {
110                    return getService()
111                                       .updateFolder(folderId, parentFolderId, name, description,
112                            mergeWithParentFolder, serviceContext);
113            }
114    
115            public static IGFolderService getService() {
116                    if (_service == null) {
117                            _service = (IGFolderService)PortalBeanLocatorUtil.locate(IGFolderService.class.getName());
118    
119                            ReferenceRegistry.registerReference(IGFolderServiceUtil.class,
120                                    "_service");
121                            MethodCache.remove(IGFolderService.class);
122                    }
123    
124                    return _service;
125            }
126    
127            public void setService(IGFolderService service) {
128                    MethodCache.remove(IGFolderService.class);
129    
130                    _service = service;
131    
132                    ReferenceRegistry.registerReference(IGFolderServiceUtil.class,
133                            "_service");
134                    MethodCache.remove(IGFolderService.class);
135            }
136    
137            private static IGFolderService _service;
138    }