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 name, java.lang.String type, double version,
92          java.lang.String displayStyle, java.lang.String feedURL,
93          java.lang.String tagURL)
94          throws com.liferay.portal.kernel.exception.PortalException,
95              com.liferay.portal.kernel.exception.SystemException {
96          return getService()
97                     .getEntriesRSS(entryQuery, name, type, version,
98              displayStyle, feedURL, tagURL);
99      }
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, java.lang.String portletId, java.lang.String keywords,
117         java.lang.String languageId, int start, int end)
118         throws com.liferay.portal.kernel.exception.SystemException {
119         return getService()
120                    .searchEntryDisplays(companyId, portletId, keywords,
121             languageId, start, end);
122     }
123 
124     public static int searchEntryDisplaysCount(long companyId,
125         java.lang.String portletId, java.lang.String keywords,
126         java.lang.String languageId)
127         throws com.liferay.portal.kernel.exception.SystemException {
128         return getService()
129                    .searchEntryDisplaysCount(companyId, portletId, keywords,
130             languageId);
131     }
132 
133     public static com.liferay.portlet.asset.model.AssetEntry updateEntry(
134         long groupId, java.lang.String className, long classPK,
135         long[] categoryIds, java.lang.String[] tagNames, boolean visible,
136         java.util.Date startDate, java.util.Date endDate,
137         java.util.Date publishDate, java.util.Date expirationDate,
138         java.lang.String mimeType, java.lang.String title,
139         java.lang.String description, java.lang.String summary,
140         java.lang.String url, int height, int width,
141         java.lang.Integer priority, boolean sync)
142         throws com.liferay.portal.kernel.exception.PortalException,
143             com.liferay.portal.kernel.exception.SystemException {
144         return getService()
145                    .updateEntry(groupId, className, classPK, categoryIds,
146             tagNames, visible, startDate, endDate, publishDate, expirationDate,
147             mimeType, title, description, summary, url, height, width,
148             priority, sync);
149     }
150 
151     public static AssetEntryService getService() {
152         if (_service == null) {
153             _service = (AssetEntryService)PortalBeanLocatorUtil.locate(AssetEntryService.class.getName());
154         }
155 
156         return _service;
157     }
158 
159     public void setService(AssetEntryService service) {
160         _service = service;
161     }
162 
163     private static AssetEntryService _service;
164 }