1   /**
2    * Copyright (c) 2000-2010 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   *
12   *
13   */
14  
15  package com.liferay.portlet.tags.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="TagsEntryServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link TagsEntryService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       TagsEntryService
39   * @generated
40   */
41  public class TagsEntryServiceUtil {
42      public static com.liferay.portlet.tags.model.TagsEntry addEntry(
43          java.lang.String parentEntryName, java.lang.String name,
44          java.lang.String vocabularyName, java.lang.String[] properties,
45          com.liferay.portal.service.ServiceContext serviceContext)
46          throws com.liferay.portal.PortalException,
47              com.liferay.portal.SystemException {
48          return getService()
49                     .addEntry(parentEntryName, name, vocabularyName, properties,
50              serviceContext);
51      }
52  
53      public static void deleteEntry(long entryId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteEntry(entryId);
57      }
58  
59      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries(
60          long groupId, long classNameId, java.lang.String name)
61          throws com.liferay.portal.PortalException,
62              com.liferay.portal.SystemException {
63          return getService().getEntries(groupId, classNameId, name);
64      }
65  
66      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getEntries(
67          java.lang.String className, long classPK)
68          throws com.liferay.portal.PortalException,
69              com.liferay.portal.SystemException {
70          return getService().getEntries(className, classPK);
71      }
72  
73      public static com.liferay.portlet.tags.model.TagsEntry getEntry(
74          long entryId)
75          throws com.liferay.portal.PortalException,
76              com.liferay.portal.SystemException {
77          return getService().getEntry(entryId);
78      }
79  
80      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getGroupVocabularyEntries(
81          long groupId, java.lang.String vocabularyName)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getGroupVocabularyEntries(groupId, vocabularyName);
85      }
86  
87      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getGroupVocabularyEntries(
88          long groupId, java.lang.String parentEntryName,
89          java.lang.String vocabularyName)
90          throws com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException {
92          return getService()
93                     .getGroupVocabularyEntries(groupId, parentEntryName,
94              vocabularyName);
95      }
96  
97      public static java.util.List<com.liferay.portlet.tags.model.TagsEntry> getGroupVocabularyRootEntries(
98          long groupId, java.lang.String vocabularyName)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException {
101         return getService()
102                    .getGroupVocabularyRootEntries(groupId, vocabularyName);
103     }
104 
105     public static void mergeEntries(long fromEntryId, long toEntryId)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException {
108         getService().mergeEntries(fromEntryId, toEntryId);
109     }
110 
111     public static com.liferay.portal.kernel.json.JSONArray search(
112         long groupId, java.lang.String name, java.lang.String[] properties,
113         int start, int end) throws com.liferay.portal.SystemException {
114         return getService().search(groupId, name, properties, start, end);
115     }
116 
117     public static com.liferay.portlet.tags.model.TagsEntry updateEntry(
118         long entryId, java.lang.String parentEntryName, java.lang.String name,
119         java.lang.String vocabularyName, java.lang.String[] properties)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException {
122         return getService()
123                    .updateEntry(entryId, parentEntryName, name, vocabularyName,
124             properties);
125     }
126 
127     public static TagsEntryService getService() {
128         if (_service == null) {
129             _service = (TagsEntryService)PortalBeanLocatorUtil.locate(TagsEntryService.class.getName());
130 
131             ReferenceRegistry.registerReference(TagsEntryServiceUtil.class,
132                 "_service");
133             MethodCache.remove(TagsEntryService.class);
134         }
135 
136         return _service;
137     }
138 
139     public void setService(TagsEntryService service) {
140         MethodCache.remove(TagsEntryService.class);
141 
142         _service = service;
143 
144         ReferenceRegistry.registerReference(TagsEntryServiceUtil.class,
145             "_service");
146         MethodCache.remove(TagsEntryService.class);
147     }
148 
149     private static TagsEntryService _service;
150 }