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.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            /**
052            * @deprecated
053            */
054            public static java.lang.String getCompanyEntriesRSS(long companyId,
055                    int max, java.lang.String type, double version,
056                    java.lang.String displayStyle, java.lang.String feedURL,
057                    java.lang.String tagURL)
058                    throws com.liferay.portal.kernel.exception.PortalException,
059                            com.liferay.portal.kernel.exception.SystemException {
060                    return getService()
061                                       .getCompanyEntriesRSS(companyId, max, type, version,
062                            displayStyle, feedURL, tagURL);
063            }
064    
065            public static com.liferay.portlet.asset.model.AssetEntryDisplay[] getCompanyEntryDisplays(
066                    long companyId, int start, int end, java.lang.String languageId)
067                    throws com.liferay.portal.kernel.exception.SystemException {
068                    return getService()
069                                       .getCompanyEntryDisplays(companyId, start, end, languageId);
070            }
071    
072            public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getEntries(
073                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException {
076                    return getService().getEntries(entryQuery);
077            }
078    
079            public static int getEntriesCount(
080                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
081                    throws com.liferay.portal.kernel.exception.PortalException,
082                            com.liferay.portal.kernel.exception.SystemException {
083                    return getService().getEntriesCount(entryQuery);
084            }
085    
086            /**
087            * @deprecated
088            */
089            public static java.lang.String getEntriesRSS(
090                    com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery,
091                    java.lang.String name, java.lang.String type, double version,
092                    java.lang.String displayStyle, java.lang.String feedURL,
093                    java.lang.String tagURL)
094                    throws com.liferay.portal.kernel.exception.PortalException,
095                            com.liferay.portal.kernel.exception.SystemException {
096                    return getService()
097                                       .getEntriesRSS(entryQuery, name, type, version,
098                            displayStyle, feedURL, tagURL);
099            }
100    
101            public static com.liferay.portlet.asset.model.AssetEntry getEntry(
102                    long entryId)
103                    throws com.liferay.portal.kernel.exception.PortalException,
104                            com.liferay.portal.kernel.exception.SystemException {
105                    return getService().getEntry(entryId);
106            }
107    
108            public static void incrementViewCounter(java.lang.String className,
109                    long classPK)
110                    throws com.liferay.portal.kernel.exception.PortalException,
111                            com.liferay.portal.kernel.exception.SystemException {
112                    getService().incrementViewCounter(className, classPK);
113            }
114    
115            public static com.liferay.portlet.asset.model.AssetEntryDisplay[] searchEntryDisplays(
116                    long companyId, long[] groupIds, java.lang.String className,
117                    java.lang.String keywords, java.lang.String languageId, int start,
118                    int end) throws com.liferay.portal.kernel.exception.SystemException {
119                    return getService()
120                                       .searchEntryDisplays(companyId, groupIds, className,
121                            keywords, languageId, start, end);
122            }
123    
124            /**
125            * @deprecated {@link #searchEntryDisplays(long, long[], String, String,
126            String)}
127            */
128            public static com.liferay.portlet.asset.model.AssetEntryDisplay[] searchEntryDisplays(
129                    long companyId, java.lang.String portletId, java.lang.String keywords,
130                    java.lang.String languageId, int start, int end)
131                    throws com.liferay.portal.kernel.exception.SystemException {
132                    return getService()
133                                       .searchEntryDisplays(companyId, portletId, keywords,
134                            languageId, start, end);
135            }
136    
137            public static int searchEntryDisplaysCount(long companyId, long[] groupIds,
138                    java.lang.String className, java.lang.String keywords,
139                    java.lang.String languageId)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    return getService()
142                                       .searchEntryDisplaysCount(companyId, groupIds, className,
143                            keywords, languageId);
144            }
145    
146            /**
147            * @deprecated {@link #searchEntryDisplaysCount(long, long[], String,
148            String, String)}
149            */
150            public static int searchEntryDisplaysCount(long companyId,
151                    java.lang.String portletId, java.lang.String keywords,
152                    java.lang.String languageId)
153                    throws com.liferay.portal.kernel.exception.SystemException {
154                    return getService()
155                                       .searchEntryDisplaysCount(companyId, portletId, keywords,
156                            languageId);
157            }
158    
159            public static com.liferay.portlet.asset.model.AssetEntry updateEntry(
160                    long groupId, java.lang.String className, long classPK,
161                    java.lang.String classUuid, long[] categoryIds,
162                    java.lang.String[] tagNames, boolean visible, java.util.Date startDate,
163                    java.util.Date endDate, java.util.Date publishDate,
164                    java.util.Date expirationDate, java.lang.String mimeType,
165                    java.lang.String title, java.lang.String description,
166                    java.lang.String summary, java.lang.String url, int height, int width,
167                    java.lang.Integer priority, boolean sync)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException {
170                    return getService()
171                                       .updateEntry(groupId, className, classPK, classUuid,
172                            categoryIds, tagNames, visible, startDate, endDate, publishDate,
173                            expirationDate, mimeType, title, description, summary, url, height,
174                            width, priority, sync);
175            }
176    
177            public static AssetEntryService getService() {
178                    if (_service == null) {
179                            _service = (AssetEntryService)PortalBeanLocatorUtil.locate(AssetEntryService.class.getName());
180    
181                            ReferenceRegistry.registerReference(AssetEntryServiceUtil.class,
182                                    "_service");
183                            MethodCache.remove(AssetEntryService.class);
184                    }
185    
186                    return _service;
187            }
188    
189            public void setService(AssetEntryService service) {
190                    MethodCache.remove(AssetEntryService.class);
191    
192                    _service = service;
193    
194                    ReferenceRegistry.registerReference(AssetEntryServiceUtil.class,
195                            "_service");
196                    MethodCache.remove(AssetEntryService.class);
197            }
198    
199            private static AssetEntryService _service;
200    }