1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.JSONArray;
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  public class TagsEntryServiceImpl extends TagsEntryServiceBaseImpl {
39  
40      public TagsEntry addEntry(String name)
41          throws PortalException, SystemException {
42  
43          return tagsEntryLocalService.addEntry(getUserId(), name);
44      }
45  
46      public TagsEntry addEntry(String name, String[] properties)
47          throws PortalException, SystemException {
48  
49          return tagsEntryLocalService.addEntry(getUserId(), name, properties);
50      }
51  
52      public void deleteEntry(long entryId)
53          throws PortalException, SystemException {
54  
55          tagsEntryLocalService.deleteEntry(entryId);
56      }
57  
58      public List<TagsEntry> getEntries(String className, long classPK)
59          throws SystemException {
60  
61          return tagsEntryLocalService.getEntries(className, classPK);
62      }
63  
64      public List<TagsEntry> getEntries(
65              long groupId, long companyId, long classNameId, String name)
66          throws SystemException {
67  
68          return tagsEntryLocalService.getEntries(
69              groupId, companyId, classNameId, name);
70      }
71  
72      public void mergeEntries(long fromEntryId, long toEntryId)
73          throws PortalException, SystemException {
74  
75          tagsEntryLocalService.mergeEntries(fromEntryId, toEntryId);
76      }
77  
78      public List<TagsEntry> search(
79              long companyId, String name, String[] properties)
80          throws SystemException {
81  
82          return tagsEntryLocalService.search(companyId, name, properties);
83      }
84  
85      public List<TagsEntry> search(
86          long companyId, String name, String[] properties, int start, int end)
87          throws SystemException {
88  
89          return tagsEntryLocalService.search(
90              companyId, name, properties, start, end);
91      }
92  
93      public JSONArray searchAutocomplete(
94              long companyId, String name, String[] properties, int start,
95              int end)
96          throws SystemException {
97  
98          return tagsEntryLocalService.searchAutocomplete(
99              companyId, name, properties, start, end);
100     }
101 
102     public int searchCount(long companyId, String name, String[] properties)
103         throws SystemException {
104 
105         return tagsEntryLocalService.searchCount(companyId, name, properties);
106     }
107 
108     public TagsEntry updateEntry(long entryId, String name)
109         throws PortalException, SystemException {
110 
111         return tagsEntryLocalService.updateEntry(entryId, name);
112     }
113 
114     public TagsEntry updateEntry(long entryId, String name, String[] properties)
115         throws PortalException, SystemException {
116 
117         return tagsEntryLocalService.updateEntry(
118             getUserId(), entryId, name, properties);
119     }
120 
121 }