1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.asset.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="AssetEntryServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link AssetEntryService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       AssetEntryService
37   * @generated
38   */
39  public class AssetEntryServiceUtil {
40      public static void deleteEntry(long entryId)
41          throws com.liferay.portal.kernel.exception.PortalException,
42              com.liferay.portal.kernel.exception.SystemException {
43          getService().deleteEntry(entryId);
44      }
45  
46      public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getCompanyEntries(
47          long companyId, int start, int end)
48          throws com.liferay.portal.kernel.exception.SystemException {
49          return getService().getCompanyEntries(companyId, start, end);
50      }
51  
52      public static int getCompanyEntriesCount(long companyId)
53          throws com.liferay.portal.kernel.exception.SystemException {
54          return getService().getCompanyEntriesCount(companyId);
55      }
56  
57      public static java.lang.String getCompanyEntriesRSS(long companyId,
58          int max, java.lang.String type, double version,
59          java.lang.String displayStyle, java.lang.String feedURL,
60          java.lang.String tagURL)
61          throws com.liferay.portal.kernel.exception.PortalException,
62              com.liferay.portal.kernel.exception.SystemException {
63          return getService()
64                     .getCompanyEntriesRSS(companyId, max, type, version,
65              displayStyle, feedURL, tagURL);
66      }
67  
68      public static com.liferay.portlet.asset.model.AssetEntryDisplay[] getCompanyEntryDisplays(
69          long companyId, int start, int end, java.lang.String languageId)
70          throws com.liferay.portal.kernel.exception.SystemException {
71          return getService()
72                     .getCompanyEntryDisplays(companyId, start, end, languageId);
73      }
74  
75      public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getEntries(
76          com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
77          throws com.liferay.portal.kernel.exception.PortalException,
78              com.liferay.portal.kernel.exception.SystemException {
79          return getService().getEntries(entryQuery);
80      }
81  
82      public static int getEntriesCount(
83          com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
84          throws com.liferay.portal.kernel.exception.PortalException,
85              com.liferay.portal.kernel.exception.SystemException {
86          return getService().getEntriesCount(entryQuery);
87      }
88  
89      public static java.lang.String getEntriesRSS(
90          com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery,
91          java.lang.String type, double version, java.lang.String displayStyle,
92          java.lang.String feedURL, java.lang.String tagURL)
93          throws com.liferay.portal.kernel.exception.PortalException,
94              com.liferay.portal.kernel.exception.SystemException {
95          return getService()
96                     .getEntriesRSS(entryQuery, type, version, displayStyle,
97              feedURL, tagURL);
98      }
99  
100     public static com.liferay.portlet.asset.model.AssetEntry getEntry(
101         long entryId)
102         throws com.liferay.portal.kernel.exception.PortalException,
103             com.liferay.portal.kernel.exception.SystemException {
104         return getService().getEntry(entryId);
105     }
106 
107     public static com.liferay.portlet.asset.model.AssetEntry incrementViewCounter(
108         java.lang.String className, long classPK)
109         throws com.liferay.portal.kernel.exception.SystemException {
110         return getService().incrementViewCounter(className, classPK);
111     }
112 
113     public static com.liferay.portlet.asset.model.AssetEntryDisplay[] searchEntryDisplays(
114         long companyId, java.lang.String portletId, java.lang.String keywords,
115         java.lang.String languageId, int start, int end)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getService()
118                    .searchEntryDisplays(companyId, portletId, keywords,
119             languageId, start, end);
120     }
121 
122     public static int searchEntryDisplaysCount(long companyId,
123         java.lang.String portletId, java.lang.String keywords,
124         java.lang.String languageId)
125         throws com.liferay.portal.kernel.exception.SystemException {
126         return getService()
127                    .searchEntryDisplaysCount(companyId, portletId, keywords,
128             languageId);
129     }
130 
131     public static com.liferay.portlet.asset.model.AssetEntry updateEntry(
132         long groupId, java.lang.String className, long classPK,
133         long[] categoryIds, java.lang.String[] tagNames, boolean visible,
134         java.util.Date startDate, java.util.Date endDate,
135         java.util.Date publishDate, java.util.Date expirationDate,
136         java.lang.String mimeType, java.lang.String title,
137         java.lang.String description, java.lang.String summary,
138         java.lang.String url, int height, int width,
139         java.lang.Integer priority, boolean sync)
140         throws com.liferay.portal.kernel.exception.PortalException,
141             com.liferay.portal.kernel.exception.SystemException {
142         return getService()
143                    .updateEntry(groupId, className, classPK, categoryIds,
144             tagNames, visible, startDate, endDate, publishDate, expirationDate,
145             mimeType, title, description, summary, url, height, width,
146             priority, sync);
147     }
148 
149     public static AssetEntryService getService() {
150         if (_service == null) {
151             _service = (AssetEntryService)PortalBeanLocatorUtil.locate(AssetEntryService.class.getName());
152         }
153 
154         return _service;
155     }
156 
157     public void setService(AssetEntryService service) {
158         _service = service;
159     }
160 
161     private static AssetEntryService _service;
162 }