1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.tags.service.impl;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.service.impl.PrincipalBean;
28  import com.liferay.portlet.tags.model.TagsAsset;
29  import com.liferay.portlet.tags.model.TagsAssetDisplay;
30  import com.liferay.portlet.tags.model.TagsAssetType;
31  import com.liferay.portlet.tags.service.TagsAssetLocalServiceUtil;
32  import com.liferay.portlet.tags.service.TagsAssetService;
33  
34  import java.util.Date;
35  import java.util.List;
36  
37  /**
38   * <a href="TagsAssetServiceImpl.java.html"><b><i>View Source</i></b></a>
39   *
40   * @author Brian Wing Shun Chan
41   *
42   */
43  public class TagsAssetServiceImpl
44      extends PrincipalBean implements TagsAssetService {
45  
46      public void deleteAsset(long assetId)
47          throws PortalException, SystemException {
48  
49          TagsAssetLocalServiceUtil.deleteAsset(assetId);
50      }
51  
52      public TagsAsset getAsset(long assetId)
53          throws PortalException, SystemException {
54  
55          return TagsAssetLocalServiceUtil.getAsset(assetId);
56      }
57  
58      public TagsAssetType[] getAssetTypes(String languageId) {
59          return TagsAssetLocalServiceUtil.getAssetTypes(languageId);
60      }
61  
62      public TagsAssetDisplay[] getCompanyAssetDisplays(
63              long companyId, int begin, int end, String languageId)
64          throws PortalException, SystemException {
65  
66          return TagsAssetLocalServiceUtil.getCompanyAssetDisplays(
67              companyId, begin, end, languageId);
68      }
69  
70      public List getCompanyAssets(long companyId, int begin, int end)
71          throws SystemException {
72  
73          return TagsAssetLocalServiceUtil.getCompanyAssets(
74              companyId, begin, end);
75      }
76  
77      public int getCompanyAssetsCount(long companyId) throws SystemException {
78          return TagsAssetLocalServiceUtil.getCompanyAssetsCount(companyId);
79      }
80  
81      public TagsAssetDisplay[] searchAssetDisplays(
82              long companyId, String portletId, String keywords,
83              String languageId, int begin, int end)
84          throws PortalException, SystemException {
85  
86          return TagsAssetLocalServiceUtil.searchAssetDisplays(
87              companyId, portletId, keywords, languageId, begin, end);
88      }
89  
90      public int searchAssetDisplaysCount(
91              long companyId, String portletId, String keywords,
92              String languageId)
93          throws SystemException {
94  
95          return TagsAssetLocalServiceUtil.searchAssetDisplaysCount(
96              companyId, portletId, keywords, languageId);
97      }
98  
99      public TagsAsset updateAsset(
100             String className, long classPK, String[] entryNames, Date startDate,
101             Date endDate, Date publishDate, Date expirationDate,
102             String mimeType, String title, String description, String summary,
103             String url, int height, int width)
104         throws PortalException, SystemException {
105 
106         return TagsAssetLocalServiceUtil.updateAsset(
107             getUserId(), className, classPK, entryNames, startDate, endDate,
108             publishDate, expirationDate, mimeType, title, description, summary,
109             url, height, width);
110     }
111 
112 }