001
014
015 package com.liferay.portlet.bookmarks.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.ListUtil;
020
021 import com.liferay.portlet.bookmarks.service.BookmarksFolderServiceUtil;
022
023 import java.rmi.RemoteException;
024
025
068 public class BookmarksFolderServiceSoap {
069 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap addFolder(
070 long parentFolderId, java.lang.String name,
071 java.lang.String description,
072 com.liferay.portal.service.ServiceContext serviceContext)
073 throws RemoteException {
074 try {
075 com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.addFolder(parentFolderId,
076 name, description, serviceContext);
077
078 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
079 }
080 catch (Exception e) {
081 _log.error(e, e);
082
083 throw new RemoteException(e.getMessage());
084 }
085 }
086
087 public static void deleteFolder(long folderId) throws RemoteException {
088 try {
089 BookmarksFolderServiceUtil.deleteFolder(folderId);
090 }
091 catch (Exception e) {
092 _log.error(e, e);
093
094 throw new RemoteException(e.getMessage());
095 }
096 }
097
098 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap getFolder(
099 long folderId) throws RemoteException {
100 try {
101 com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.getFolder(folderId);
102
103 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
104 }
105 catch (Exception e) {
106 _log.error(e, e);
107
108 throw new RemoteException(e.getMessage());
109 }
110 }
111
112 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
113 long groupId) throws RemoteException {
114 try {
115 java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
116 BookmarksFolderServiceUtil.getFolders(groupId);
117
118 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModels(returnValue);
119 }
120 catch (Exception e) {
121 _log.error(e, e);
122
123 throw new RemoteException(e.getMessage());
124 }
125 }
126
127 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
128 long groupId, long parentFolderId) throws RemoteException {
129 try {
130 java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
131 BookmarksFolderServiceUtil.getFolders(groupId, parentFolderId);
132
133 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModels(returnValue);
134 }
135 catch (Exception e) {
136 _log.error(e, e);
137
138 throw new RemoteException(e.getMessage());
139 }
140 }
141
142 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
143 long groupId, long parentFolderId, int start, int end)
144 throws RemoteException {
145 try {
146 java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
147 BookmarksFolderServiceUtil.getFolders(groupId, parentFolderId,
148 start, end);
149
150 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModels(returnValue);
151 }
152 catch (Exception e) {
153 _log.error(e, e);
154
155 throw new RemoteException(e.getMessage());
156 }
157 }
158
159 public static int getFoldersCount(long groupId, long parentFolderId)
160 throws RemoteException {
161 try {
162 int returnValue = BookmarksFolderServiceUtil.getFoldersCount(groupId,
163 parentFolderId);
164
165 return returnValue;
166 }
167 catch (Exception e) {
168 _log.error(e, e);
169
170 throw new RemoteException(e.getMessage());
171 }
172 }
173
174 public static void getSubfolderIds(Long[] folderIds, long groupId,
175 long folderId) throws RemoteException {
176 try {
177 BookmarksFolderServiceUtil.getSubfolderIds(ListUtil.toList(
178 folderIds), groupId, folderId);
179 }
180 catch (Exception e) {
181 _log.error(e, e);
182
183 throw new RemoteException(e.getMessage());
184 }
185 }
186
187 public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap updateFolder(
188 long folderId, long parentFolderId, java.lang.String name,
189 java.lang.String description, boolean mergeWithParentFolder,
190 com.liferay.portal.service.ServiceContext serviceContext)
191 throws RemoteException {
192 try {
193 com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.updateFolder(folderId,
194 parentFolderId, name, description, mergeWithParentFolder,
195 serviceContext);
196
197 return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
198 }
199 catch (Exception e) {
200 _log.error(e, e);
201
202 throw new RemoteException(e.getMessage());
203 }
204 }
205
206 private static Log _log = LogFactoryUtil.getLog(BookmarksFolderServiceSoap.class);
207 }