001    /**
002     * Copyright (c) 2000-2012 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)
066                    throws com.liferay.portal.kernel.exception.SystemException {
067                    return getService().getFileEntryTypes(groupIds);
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 java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryType> search(
076                    long companyId, long[] groupIds, java.lang.String keywords,
077                    boolean includeBasicFileEntryType, int start, int end,
078                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
079                    throws com.liferay.portal.kernel.exception.SystemException {
080                    return getService()
081                                       .search(companyId, groupIds, keywords,
082                            includeBasicFileEntryType, start, end, orderByComparator);
083            }
084    
085            public static int searchCount(long companyId, long[] groupIds,
086                    java.lang.String keywords, boolean includeBasicFileEntryType)
087                    throws com.liferay.portal.kernel.exception.SystemException {
088                    return getService()
089                                       .searchCount(companyId, groupIds, keywords,
090                            includeBasicFileEntryType);
091            }
092    
093            public static void updateFileEntryType(long fileEntryTypeId,
094                    java.lang.String name, java.lang.String description,
095                    long[] ddmStructureIds,
096                    com.liferay.portal.service.ServiceContext serviceContext)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    getService()
100                            .updateFileEntryType(fileEntryTypeId, name, description,
101                            ddmStructureIds, serviceContext);
102            }
103    
104            public static DLFileEntryTypeService getService() {
105                    if (_service == null) {
106                            _service = (DLFileEntryTypeService)PortalBeanLocatorUtil.locate(DLFileEntryTypeService.class.getName());
107    
108                            ReferenceRegistry.registerReference(DLFileEntryTypeServiceUtil.class,
109                                    "_service");
110                            MethodCache.remove(DLFileEntryTypeService.class);
111                    }
112    
113                    return _service;
114            }
115    
116            public void setService(DLFileEntryTypeService service) {
117                    MethodCache.remove(DLFileEntryTypeService.class);
118    
119                    _service = service;
120    
121                    ReferenceRegistry.registerReference(DLFileEntryTypeServiceUtil.class,
122                            "_service");
123                    MethodCache.remove(DLFileEntryTypeService.class);
124            }
125    
126            private static DLFileEntryTypeService _service;
127    }