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