1
22
23 package com.liferay.portlet.blogs.service.http;
24
25 import com.liferay.portlet.blogs.service.BlogsEntryServiceUtil;
26
27 import org.json.JSONArray;
28 import org.json.JSONObject;
29
30
74 public class BlogsEntryServiceJSON {
75 public static void deleteEntry(long entryId)
76 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
77 com.liferay.portal.PortalException {
78 BlogsEntryServiceUtil.deleteEntry(entryId);
79 }
80
81 public static JSONArray getCompanyEntries(long companyId, int max)
82 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
83 com.liferay.portal.PortalException {
84 java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue = BlogsEntryServiceUtil.getCompanyEntries(companyId,
85 max);
86
87 return BlogsEntryJSONSerializer.toJSONArray(returnValue);
88 }
89
90 public static java.lang.String getCompanyEntriesRSS(long companyId,
91 int max, java.lang.String type, double version,
92 java.lang.String displayStyle, java.lang.String feedURL,
93 java.lang.String entryURL)
94 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
95 com.liferay.portal.PortalException {
96 java.lang.String returnValue = BlogsEntryServiceUtil.getCompanyEntriesRSS(companyId,
97 max, type, version, displayStyle, feedURL, entryURL);
98
99 return returnValue;
100 }
101
102 public static JSONObject getEntry(long entryId)
103 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
104 com.liferay.portal.PortalException {
105 com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(entryId);
106
107 return BlogsEntryJSONSerializer.toJSONObject(returnValue);
108 }
109
110 public static JSONObject getEntry(long groupId, java.lang.String urlTitle)
111 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
112 com.liferay.portal.PortalException {
113 com.liferay.portlet.blogs.model.BlogsEntry returnValue = BlogsEntryServiceUtil.getEntry(groupId,
114 urlTitle);
115
116 return BlogsEntryJSONSerializer.toJSONObject(returnValue);
117 }
118
119 public static JSONArray getGroupEntries(long groupId, int max)
120 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
121 com.liferay.portal.PortalException {
122 java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue = BlogsEntryServiceUtil.getGroupEntries(groupId,
123 max);
124
125 return BlogsEntryJSONSerializer.toJSONArray(returnValue);
126 }
127
128 public static java.lang.String getGroupEntriesRSS(long groupId, int max,
129 java.lang.String type, double version, java.lang.String displayStyle,
130 java.lang.String feedURL, java.lang.String entryURL)
131 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
132 com.liferay.portal.PortalException {
133 java.lang.String returnValue = BlogsEntryServiceUtil.getGroupEntriesRSS(groupId,
134 max, type, version, displayStyle, feedURL, entryURL);
135
136 return returnValue;
137 }
138
139 public static JSONArray getOrganizationEntries(long organizationId, int max)
140 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
141 com.liferay.portal.PortalException {
142 java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> returnValue = BlogsEntryServiceUtil.getOrganizationEntries(organizationId,
143 max);
144
145 return BlogsEntryJSONSerializer.toJSONArray(returnValue);
146 }
147
148 public static java.lang.String getOrganizationEntriesRSS(
149 long organizationId, int max, java.lang.String type, double version,
150 java.lang.String displayStyle, java.lang.String feedURL,
151 java.lang.String entryURL)
152 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
153 com.liferay.portal.PortalException {
154 java.lang.String returnValue = BlogsEntryServiceUtil.getOrganizationEntriesRSS(organizationId,
155 max, type, version, displayStyle, feedURL, entryURL);
156
157 return returnValue;
158 }
159 }