1   /**
2    * Copyright (c) 2000-2008 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.kernel.json.JSONArrayWrapper;
28  import com.liferay.portlet.tags.model.TagsEntry;
29  import com.liferay.portlet.tags.service.base.TagsEntryServiceBaseImpl;
30  
31  import java.util.List;
32  
33  /**
34   * <a href="TagsEntryServiceImpl.java.html"><b><i>View Source</i></b></a>
35   *
36   * @author Brian Wing Shun Chan
37   *
38   */
39  public class TagsEntryServiceImpl extends TagsEntryServiceBaseImpl {
40  
41      public TagsEntry addEntry(String name)
42          throws PortalException, SystemException {
43  
44          return tagsEntryLocalService.addEntry(getUserId(), name);
45      }
46  
47      public TagsEntry addEntry(String name, String[] properties)
48          throws PortalException, SystemException {
49  
50          return tagsEntryLocalService.addEntry(getUserId(), name, properties);
51      }
52  
53      public void deleteEntry(long entryId)
54          throws PortalException, SystemException {
55  
56          tagsEntryLocalService.deleteEntry(entryId);
57      }
58  
59      public List<TagsEntry> getEntries(String className, long classPK)
60          throws PortalException, SystemException {
61  
62          return tagsEntryLocalService.getEntries(className, classPK);
63      }
64  
65      public List<TagsEntry> getEntries(
66              long groupId, long companyId, long classNameId, String name)
67          throws SystemException {
68  
69          return tagsEntryLocalService.getEntries(
70              groupId, companyId, classNameId, name);
71      }
72  
73      public void mergeEntries(long fromEntryId, long toEntryId)
74          throws PortalException, SystemException {
75  
76          tagsEntryLocalService.mergeEntries(fromEntryId, toEntryId);
77      }
78  
79      public List<TagsEntry> search(
80              long companyId, String name, String[] properties)
81          throws SystemException {
82  
83          return tagsEntryLocalService.search(companyId, name, properties);
84      }
85  
86      public List<TagsEntry> search(
87          long companyId, String name, String[] properties, int begin, int end)
88          throws SystemException {
89  
90          return tagsEntryLocalService.search(
91              companyId, name, properties, begin, end);
92      }
93  
94      public JSONArrayWrapper searchAutocomplete(
95              long companyId, String name, String[] properties, int begin,
96              int end)
97          throws SystemException {
98  
99          return tagsEntryLocalService.searchAutocomplete(
100             companyId, name, properties, begin, end);
101     }
102 
103     public int searchCount(long companyId, String name, String[] properties)
104         throws SystemException {
105 
106         return tagsEntryLocalService.searchCount(companyId, name, properties);
107     }
108 
109     public TagsEntry updateEntry(long entryId, String name)
110         throws PortalException, SystemException {
111 
112         return tagsEntryLocalService.updateEntry(entryId, name);
113     }
114 
115     public TagsEntry updateEntry(long entryId, String name, String[] properties)
116         throws PortalException, SystemException {
117 
118         return tagsEntryLocalService.updateEntry(
119             getUserId(), entryId, name, properties);
120     }
121 
122 }