1
22
23 package com.liferay.portlet.tags.service.http;
24
25 import com.liferay.portal.kernel.json.JSONArray;
26 import com.liferay.portal.kernel.json.JSONObject;
27
28 import com.liferay.portlet.tags.service.TagsEntryServiceUtil;
29
30
76 public class TagsEntryServiceJSON {
77 public static JSONObject addEntry(java.lang.String name)
78 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
79 com.liferay.portal.SystemException {
80 com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.addEntry(name);
81
82 return TagsEntryJSONSerializer.toJSONObject(returnValue);
83 }
84
85 public static JSONObject addEntry(java.lang.String name,
86 java.lang.String[] properties)
87 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
88 com.liferay.portal.SystemException {
89 com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.addEntry(name,
90 properties);
91
92 return TagsEntryJSONSerializer.toJSONObject(returnValue);
93 }
94
95 public static void deleteEntry(long entryId)
96 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
97 com.liferay.portal.SystemException {
98 TagsEntryServiceUtil.deleteEntry(entryId);
99 }
100
101 public static JSONArray getEntries(java.lang.String className, long classPK)
102 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
103 java.util.List<com.liferay.portlet.tags.model.TagsEntry> returnValue = TagsEntryServiceUtil.getEntries(className,
104 classPK);
105
106 return TagsEntryJSONSerializer.toJSONArray(returnValue);
107 }
108
109 public static JSONArray getEntries(long groupId, long companyId,
110 long classNameId, java.lang.String name)
111 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
112 java.util.List<com.liferay.portlet.tags.model.TagsEntry> returnValue = TagsEntryServiceUtil.getEntries(groupId,
113 companyId, classNameId, name);
114
115 return TagsEntryJSONSerializer.toJSONArray(returnValue);
116 }
117
118 public static void mergeEntries(long fromEntryId, long toEntryId)
119 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
120 com.liferay.portal.SystemException {
121 TagsEntryServiceUtil.mergeEntries(fromEntryId, toEntryId);
122 }
123
124 public static JSONArray search(long companyId, java.lang.String name,
125 java.lang.String[] properties)
126 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
127 java.util.List<com.liferay.portlet.tags.model.TagsEntry> returnValue = TagsEntryServiceUtil.search(companyId,
128 name, properties);
129
130 return TagsEntryJSONSerializer.toJSONArray(returnValue);
131 }
132
133 public static JSONArray search(long companyId, java.lang.String name,
134 java.lang.String[] properties, int start, int end)
135 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
136 java.util.List<com.liferay.portlet.tags.model.TagsEntry> returnValue = TagsEntryServiceUtil.search(companyId,
137 name, properties, start, end);
138
139 return TagsEntryJSONSerializer.toJSONArray(returnValue);
140 }
141
142 public static com.liferay.portal.kernel.json.JSONArray searchAutocomplete(
143 long companyId, java.lang.String name, java.lang.String[] properties,
144 int start, int end)
145 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
146 com.liferay.portal.kernel.json.JSONArray returnValue = TagsEntryServiceUtil.searchAutocomplete(companyId,
147 name, properties, start, end);
148
149 return returnValue;
150 }
151
152 public static int searchCount(long companyId, java.lang.String name,
153 java.lang.String[] properties)
154 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
155 int returnValue = TagsEntryServiceUtil.searchCount(companyId, name,
156 properties);
157
158 return returnValue;
159 }
160
161 public static JSONObject updateEntry(long entryId, java.lang.String name)
162 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
163 com.liferay.portal.SystemException {
164 com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.updateEntry(entryId,
165 name);
166
167 return TagsEntryJSONSerializer.toJSONObject(returnValue);
168 }
169
170 public static JSONObject updateEntry(long entryId, java.lang.String name,
171 java.lang.String[] properties)
172 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
173 com.liferay.portal.SystemException {
174 com.liferay.portlet.tags.model.TagsEntry returnValue = TagsEntryServiceUtil.updateEntry(entryId,
175 name, properties);
176
177 return TagsEntryJSONSerializer.toJSONObject(returnValue);
178 }
179 }