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