001    /**
002     * Copyright (c) 2000-2011 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.documentlibrary.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 document library file entry type remote service. This utility wraps {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeServiceImpl} 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 DLFileEntryTypeService
030     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryTypeServiceBaseImpl
031     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeServiceImpl
032     * @generated
033     */
034    public class DLFileEntryTypeServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.documentlibrary.model.DLFileEntryType addFileEntryType(
041                    long groupId, java.lang.String name, java.lang.String description,
042                    long[] ddmStructureIds,
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                                       .addFileEntryType(groupId, name, description,
048                            ddmStructureIds, serviceContext);
049            }
050    
051            public static void deleteFileEntryType(long fileEntryTypeId)
052                    throws com.liferay.portal.kernel.exception.PortalException,
053                            com.liferay.portal.kernel.exception.SystemException {
054                    getService().deleteFileEntryType(fileEntryTypeId);
055            }
056    
057            public static com.liferay.portlet.documentlibrary.model.DLFileEntryType getFileEntryType(
058                    long fileEntryTypeId)
059                    throws com.liferay.portal.kernel.exception.PortalException,
060                            com.liferay.portal.kernel.exception.SystemException {
061                    return getService().getFileEntryType(fileEntryTypeId);
062            }
063    
064            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> getFileEntryTypes(
065                    long[] groupIds, int start, int end)
066                    throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().getFileEntryTypes(groupIds, start, end);
068            }
069    
070            public static int getFileEntryTypesCount(long[] groupIds)
071                    throws com.liferay.portal.kernel.exception.SystemException {
072                    return getService().getFileEntryTypesCount(groupIds);
073            }
074    
075            public static void updateFileEntryType(long fileEntryTypeId,
076                    java.lang.String name, java.lang.String description,
077                    long[] ddmStructureIds,
078                    com.liferay.portal.service.ServiceContext serviceContext)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    getService()
082                            .updateFileEntryType(fileEntryTypeId, name, description,
083                            ddmStructureIds, serviceContext);
084            }
085    
086            public static DLFileEntryTypeService getService() {
087                    if (_service == null) {
088                            _service = (DLFileEntryTypeService)PortalBeanLocatorUtil.locate(DLFileEntryTypeService.class.getName());
089    
090                            ReferenceRegistry.registerReference(DLFileEntryTypeServiceUtil.class,
091                                    "_service");
092                            MethodCache.remove(DLFileEntryTypeService.class);
093                    }
094    
095                    return _service;
096            }
097    
098            public void setService(DLFileEntryTypeService service) {
099                    MethodCache.remove(DLFileEntryTypeService.class);
100    
101                    _service = service;
102    
103                    ReferenceRegistry.registerReference(DLFileEntryTypeServiceUtil.class,
104                            "_service");
105                    MethodCache.remove(DLFileEntryTypeService.class);
106            }
107    
108            private static DLFileEntryTypeService _service;
109    }