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.asset.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 asset entry remote service. This utility wraps {@link com.liferay.portlet.asset.service.impl.AssetEntryServiceImpl} 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 AssetEntryService
030     * @see com.liferay.portlet.asset.service.base.AssetEntryServiceBaseImpl
031     * @see com.liferay.portlet.asset.service.impl.AssetEntryServiceImpl
032     * @generated
033     */
034    public class AssetEntryServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.asset.service.impl.AssetEntryServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getCompanyEntries(
041                    long companyId, int start, int end)
042                    throws com.liferay.portal.kernel.exception.SystemException {
043                    return getService().getCompanyEntries(companyId, start, end);
044            }
045    
046            public static int getCompanyEntriesCount(long companyId)
047                    throws com.liferay.portal.kernel.exception.SystemException {
048                    return getService().getCompanyEntriesCount(companyId);
049            }
050    
051            public static com.liferay.portlet.asset.model.AssetEntryDisplay[] getCompanyEntryDisplays(
052                    long companyId, int start, int end, java.lang.String languageId)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getService()
055                                       .getCompanyEntryDisplays(companyId, start, end, languageId);
056            }
057    
058            public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getEntries(
059                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
060                    throws com.liferay.portal.kernel.exception.PortalException,
061                            com.liferay.portal.kernel.exception.SystemException {
062                    return getService().getEntries(entryQuery);
063            }
064    
065            public static int getEntriesCount(
066                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
067                    throws com.liferay.portal.kernel.exception.PortalException,
068                            com.liferay.portal.kernel.exception.SystemException {
069                    return getService().getEntriesCount(entryQuery);
070            }
071    
072            public static com.liferay.portlet.asset.model.AssetEntry getEntry(
073                    long entryId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().getEntry(entryId);
077            }
078    
079            public static com.liferay.portlet.asset.model.AssetEntry incrementViewCounter(
080                    java.lang.String className, long classPK)
081                    throws com.liferay.portal.kernel.exception.PortalException,
082                            com.liferay.portal.kernel.exception.SystemException {
083                    return getService().incrementViewCounter(className, classPK);
084            }
085    
086            public static com.liferay.portlet.asset.model.AssetEntryDisplay[] searchEntryDisplays(
087                    long companyId, long[] groupIds, java.lang.String className,
088                    java.lang.String keywords, java.lang.String languageId, int start,
089                    int end) throws com.liferay.portal.kernel.exception.SystemException {
090                    return getService()
091                                       .searchEntryDisplays(companyId, groupIds, className,
092                            keywords, languageId, start, end);
093            }
094    
095            public static int searchEntryDisplaysCount(long companyId, long[] groupIds,
096                    java.lang.String className, java.lang.String keywords,
097                    java.lang.String languageId)
098                    throws com.liferay.portal.kernel.exception.SystemException {
099                    return getService()
100                                       .searchEntryDisplaysCount(companyId, groupIds, className,
101                            keywords, languageId);
102            }
103    
104            public static com.liferay.portlet.asset.model.AssetEntry updateEntry(
105                    long groupId, java.lang.String className, long classPK,
106                    java.lang.String classUuid, long classTypeId, long[] categoryIds,
107                    java.lang.String[] tagNames, boolean visible, java.util.Date startDate,
108                    java.util.Date endDate, java.util.Date publishDate,
109                    java.util.Date expirationDate, java.lang.String mimeType,
110                    java.lang.String title, java.lang.String description,
111                    java.lang.String summary, java.lang.String url,
112                    java.lang.String layoutUuid, int height, int width,
113                    java.lang.Integer priority, boolean sync)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException {
116                    return getService()
117                                       .updateEntry(groupId, className, classPK, classUuid,
118                            classTypeId, categoryIds, tagNames, visible, startDate, endDate,
119                            publishDate, expirationDate, mimeType, title, description, summary,
120                            url, layoutUuid, height, width, priority, sync);
121            }
122    
123            public static AssetEntryService getService() {
124                    if (_service == null) {
125                            _service = (AssetEntryService)PortalBeanLocatorUtil.locate(AssetEntryService.class.getName());
126    
127                            ReferenceRegistry.registerReference(AssetEntryServiceUtil.class,
128                                    "_service");
129                            MethodCache.remove(AssetEntryService.class);
130                    }
131    
132                    return _service;
133            }
134    
135            public void setService(AssetEntryService service) {
136                    MethodCache.remove(AssetEntryService.class);
137    
138                    _service = service;
139    
140                    ReferenceRegistry.registerReference(AssetEntryServiceUtil.class,
141                            "_service");
142                    MethodCache.remove(AssetEntryService.class);
143            }
144    
145            private static AssetEntryService _service;
146    }