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