1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.tags.service;
21  
22  
23  /**
24   * <a href="TagsAssetServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.tags.service.TagsAssetService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.tags.service.TagsAssetService
42   *
43   */
44  public class TagsAssetServiceUtil {
45      public static void deleteAsset(long assetId)
46          throws com.liferay.portal.PortalException,
47              com.liferay.portal.SystemException, java.rmi.RemoteException {
48          getService().deleteAsset(assetId);
49      }
50  
51      public static com.liferay.portlet.tags.model.TagsAsset getAsset(
52          long assetId)
53          throws com.liferay.portal.PortalException,
54              com.liferay.portal.SystemException, java.rmi.RemoteException {
55          return getService().getAsset(assetId);
56      }
57  
58      public static java.lang.String getAssetsRSS(long groupId,
59          long[] classNameIds, long[] entryIds, long[] notEntryIds,
60          boolean andOperator, java.lang.String orderByCol1,
61          java.lang.String orderByCol2, java.lang.String orderByType1,
62          java.lang.String orderByType2, boolean excludeZeroViewCount,
63          java.util.Date publishDate, java.util.Date expirationDate, int max,
64          java.lang.String type, double version, java.lang.String displayStyle,
65          java.lang.String feedURL, java.lang.String entryURL)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException, java.rmi.RemoteException {
68          return getService()
69                     .getAssetsRSS(groupId, classNameIds, entryIds, notEntryIds,
70              andOperator, orderByCol1, orderByCol2, orderByType1, orderByType2,
71              excludeZeroViewCount, publishDate, expirationDate, max, type,
72              version, displayStyle, feedURL, entryURL);
73      }
74  
75      public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
76          java.lang.String languageId) throws java.rmi.RemoteException {
77          return getService().getAssetTypes(languageId);
78      }
79  
80      public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
81          long companyId, int start, int end, java.lang.String languageId)
82          throws com.liferay.portal.SystemException, java.rmi.RemoteException {
83          return getService()
84                     .getCompanyAssetDisplays(companyId, start, end, languageId);
85      }
86  
87      public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getCompanyAssets(
88          long companyId, int start, int end)
89          throws com.liferay.portal.SystemException, java.rmi.RemoteException {
90          return getService().getCompanyAssets(companyId, start, end);
91      }
92  
93      public static int getCompanyAssetsCount(long companyId)
94          throws com.liferay.portal.SystemException, java.rmi.RemoteException {
95          return getService().getCompanyAssetsCount(companyId);
96      }
97  
98      public static java.lang.String getCompanyAssetsRSS(long companyId, int max,
99          java.lang.String type, double version, java.lang.String displayStyle,
100         java.lang.String feedURL, java.lang.String entryURL)
101         throws com.liferay.portal.PortalException,
102             com.liferay.portal.SystemException, java.rmi.RemoteException {
103         return getService()
104                    .getCompanyAssetsRSS(companyId, max, type, version,
105             displayStyle, feedURL, entryURL);
106     }
107 
108     public static com.liferay.portlet.tags.model.TagsAsset incrementViewCounter(
109         java.lang.String className, long classPK)
110         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
111         return getService().incrementViewCounter(className, classPK);
112     }
113 
114     public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
115         long companyId, java.lang.String portletId, java.lang.String keywords,
116         java.lang.String languageId, int start, int end)
117         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
118         return getService()
119                    .searchAssetDisplays(companyId, portletId, keywords,
120             languageId, start, end);
121     }
122 
123     public static int searchAssetDisplaysCount(long companyId,
124         java.lang.String portletId, java.lang.String keywords,
125         java.lang.String languageId)
126         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
127         return getService()
128                    .searchAssetDisplaysCount(companyId, portletId, keywords,
129             languageId);
130     }
131 
132     public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
133         long groupId, java.lang.String className, long classPK,
134         java.lang.String[] entryNames, java.util.Date startDate,
135         java.util.Date endDate, java.util.Date publishDate,
136         java.util.Date expirationDate, java.lang.String mimeType,
137         java.lang.String title, java.lang.String description,
138         java.lang.String summary, java.lang.String url, int height, int width,
139         java.lang.Integer priority)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException, java.rmi.RemoteException {
142         return getService()
143                    .updateAsset(groupId, className, classPK, entryNames,
144             startDate, endDate, publishDate, expirationDate, mimeType, title,
145             description, summary, url, height, width, priority);
146     }
147 
148     public static TagsAssetService getService() {
149         if (_service == null) {
150             throw new RuntimeException("TagsAssetService is not set");
151         }
152 
153         return _service;
154     }
155 
156     public void setService(TagsAssetService service) {
157         _service = service;
158     }
159 
160     private static TagsAssetService _service;
161 }