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.TagsAssetServiceUtil;
26
27
73 public class TagsAssetServiceJSON {
74 public static void deleteAsset(long assetId)
75 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
76 com.liferay.portal.SystemException {
77 TagsAssetServiceUtil.deleteAsset(assetId);
78 }
79
80 public static JSONObject getAsset(long assetId)
81 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
82 com.liferay.portal.SystemException {
83 com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.getAsset(assetId);
84
85 return TagsAssetJSONSerializer.toJSONObject(returnValue);
86 }
87
88 public static java.lang.String getAssetsRSS(long groupId,
89 long[] classNameIds, long[] entryIds, long[] notEntryIds,
90 boolean andOperator, java.lang.String orderByCol1,
91 java.lang.String orderByCol2, java.lang.String orderByType1,
92 java.lang.String orderByType2, boolean excludeZeroViewCount,
93 java.util.Date publishDate, java.util.Date expirationDate, int max,
94 java.lang.String type, double version, java.lang.String displayStyle,
95 java.lang.String feedURL, java.lang.String entryURL)
96 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
97 com.liferay.portal.SystemException {
98 java.lang.String returnValue = TagsAssetServiceUtil.getAssetsRSS(groupId,
99 classNameIds, entryIds, notEntryIds, andOperator, orderByCol1,
100 orderByCol2, orderByType1, orderByType2, excludeZeroViewCount,
101 publishDate, expirationDate, max, type, version, displayStyle,
102 feedURL, entryURL);
103
104 return returnValue;
105 }
106
107 public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
108 java.lang.String languageId) throws java.rmi.RemoteException {
109 com.liferay.portlet.tags.model.TagsAssetType[] returnValue = TagsAssetServiceUtil.getAssetTypes(languageId);
110
111 return returnValue;
112 }
113
114 public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
115 long companyId, int start, int end, java.lang.String languageId)
116 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
117 com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.getCompanyAssetDisplays(companyId,
118 start, end, languageId);
119
120 return returnValue;
121 }
122
123 public static JSONArray getCompanyAssets(long companyId, int start, int end)
124 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
125 java.util.List<com.liferay.portlet.tags.model.TagsAsset> returnValue = TagsAssetServiceUtil.getCompanyAssets(companyId,
126 start, end);
127
128 return TagsAssetJSONSerializer.toJSONArray(returnValue);
129 }
130
131 public static int getCompanyAssetsCount(long companyId)
132 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
133 int returnValue = TagsAssetServiceUtil.getCompanyAssetsCount(companyId);
134
135 return returnValue;
136 }
137
138 public static java.lang.String getCompanyAssetsRSS(long companyId, int max,
139 java.lang.String type, double version, java.lang.String displayStyle,
140 java.lang.String feedURL, java.lang.String entryURL)
141 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
142 com.liferay.portal.SystemException {
143 java.lang.String returnValue = TagsAssetServiceUtil.getCompanyAssetsRSS(companyId,
144 max, type, version, displayStyle, feedURL, entryURL);
145
146 return returnValue;
147 }
148
149 public static JSONObject incrementViewCounter(java.lang.String className,
150 long classPK)
151 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
152 com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.incrementViewCounter(className,
153 classPK);
154
155 return TagsAssetJSONSerializer.toJSONObject(returnValue);
156 }
157
158 public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
159 long companyId, java.lang.String portletId, java.lang.String keywords,
160 java.lang.String languageId, int start, int end)
161 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
162 com.liferay.portlet.tags.model.TagsAssetDisplay[] returnValue = TagsAssetServiceUtil.searchAssetDisplays(companyId,
163 portletId, keywords, languageId, start, end);
164
165 return returnValue;
166 }
167
168 public static int searchAssetDisplaysCount(long companyId,
169 java.lang.String portletId, java.lang.String keywords,
170 java.lang.String languageId)
171 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
172 int returnValue = TagsAssetServiceUtil.searchAssetDisplaysCount(companyId,
173 portletId, keywords, languageId);
174
175 return returnValue;
176 }
177
178 public static JSONObject updateAsset(long groupId,
179 java.lang.String className, long classPK,
180 java.lang.String[] entryNames, java.util.Date startDate,
181 java.util.Date endDate, java.util.Date publishDate,
182 java.util.Date expirationDate, java.lang.String mimeType,
183 java.lang.String title, java.lang.String description,
184 java.lang.String summary, java.lang.String url, int height, int width,
185 java.lang.Integer priority)
186 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
187 com.liferay.portal.SystemException {
188 com.liferay.portlet.tags.model.TagsAsset returnValue = TagsAssetServiceUtil.updateAsset(groupId,
189 className, classPK, entryNames, startDate, endDate,
190 publishDate, expirationDate, mimeType, title, description,
191 summary, url, height, width, priority);
192
193 return TagsAssetJSONSerializer.toJSONObject(returnValue);
194 }
195 }