1
19
20 package com.liferay.portlet.bookmarks.service.http;
21
22 import com.liferay.portal.kernel.json.JSONObject;
23
24 import com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil;
25
26
72 public class BookmarksEntryServiceJSON {
73 public static JSONObject addEntry(long folderId, java.lang.String name,
74 java.lang.String url, java.lang.String comments,
75 java.lang.String[] tagsEntries, boolean addCommunityPermissions,
76 boolean addGuestPermissions)
77 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
78 com.liferay.portal.SystemException {
79 com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.addEntry(folderId,
80 name, url, comments, tagsEntries, addCommunityPermissions,
81 addGuestPermissions);
82
83 return BookmarksEntryJSONSerializer.toJSONObject(returnValue);
84 }
85
86 public static JSONObject addEntry(long folderId, java.lang.String name,
87 java.lang.String url, java.lang.String comments,
88 java.lang.String[] tagsEntries,
89 java.lang.String[] communityPermissions,
90 java.lang.String[] guestPermissions)
91 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
92 com.liferay.portal.SystemException {
93 com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.addEntry(folderId,
94 name, url, comments, tagsEntries, communityPermissions,
95 guestPermissions);
96
97 return BookmarksEntryJSONSerializer.toJSONObject(returnValue);
98 }
99
100 public static void deleteEntry(long entryId)
101 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
102 com.liferay.portal.SystemException {
103 BookmarksEntryServiceUtil.deleteEntry(entryId);
104 }
105
106 public static JSONObject getEntry(long entryId)
107 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
108 com.liferay.portal.SystemException {
109 com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.getEntry(entryId);
110
111 return BookmarksEntryJSONSerializer.toJSONObject(returnValue);
112 }
113
114 public static JSONObject openEntry(long entryId)
115 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
116 com.liferay.portal.SystemException {
117 com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.openEntry(entryId);
118
119 return BookmarksEntryJSONSerializer.toJSONObject(returnValue);
120 }
121
122 public static JSONObject updateEntry(long entryId, long folderId,
123 java.lang.String name, java.lang.String url, java.lang.String comments,
124 java.lang.String[] tagsEntries)
125 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
126 com.liferay.portal.SystemException {
127 com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.updateEntry(entryId,
128 folderId, name, url, comments, tagsEntries);
129
130 return BookmarksEntryJSONSerializer.toJSONObject(returnValue);
131 }
132 }