Class FavoritesRestController
- java.lang.Object
 - 
- org.neotropic.kuwaiba.northbound.rest.aem.FavoritesRestController
 
 
- 
- All Implemented Interfaces:
 FavoritesRestOpenApi
@RestController @RequestMapping("/v2.1.1/favorites/") public class FavoritesRestController extends Object implements FavoritesRestOpenApiThe definition of the Favorites Rest Controller.- Author:
 - Mauricio Ruiz Beltrán <mauricio.ruiz@kuwaiba.org>
 
 
- 
- 
Constructor Summary
Constructors Constructor Description FavoritesRestController() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddObjectTofavoritesFolder(String className, String objectId, long folderId, long userId, String sessionId)Adds an object to the favorites folder.longcreateFavoritesFolderForUser(String name, long userId, String sessionId)Create a relationship between an user and a new favorites folder.voiddeleteFavoritesFolders(long[] ids, long userId, String sessionId)Delete a Bookmark Folder of an User.FavoritesFoldergetFavoritesFolder(long folderId, long userId, String sessionId)Gets a favorites folder.List<FavoritesFolder>getFavoritesFoldersForObject(long userId, String className, String objectId, String sessionId)Get the bookmarks where an object is associated.List<FavoritesFolder>getFavoritesFoldersForUser(long userId, String sessionId)Get the favorites folders create by an user.List<BusinessObjectLight>getObjectsInFavoritesFolder(long folderId, long userId, int limit, String sessionId)Get the object assigned to the bookmark.voidremoveObjectFromfavoritesFolder(String className, String objectId, long folderId, long userId, String sessionId)Removes an object associated to a favorites folder.voidupdateFavoritesFolder(long folderId, long userId, String name, String sessionId)Updates a favorites folder. 
 - 
 
- 
- 
Field Detail
- 
PATH
public static final String PATH
Path that includes the Kuwaiba version and the module id- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
addObjectTofavoritesFolder
@RequestMapping(method=PUT, value="addObjectTofavoritesFolder/{className}/{objectId}/{folderId}/{userId}/{sessionId}", produces="application/json") public void addObjectTofavoritesFolder(@PathVariable("className") String className, @PathVariable("objectId") String objectId, @PathVariable("folderId") long folderId, @PathVariable("userId") long userId, @PathVariable("sessionId") String sessionId)Adds an object to the favorites folder.- Specified by:
 addObjectTofavoritesFolderin interfaceFavoritesRestOpenApi- Parameters:
 className- Object class name.objectId- Object id.folderId- Favorites folder id.userId- User id.sessionId- The session token id.
 
- 
removeObjectFromfavoritesFolder
@RequestMapping(method=DELETE, value="removeObjectFromfavoritesFolder/{className}/{objectId}/{folderId}/{userId}/{sessionId}", produces="application/json") public void removeObjectFromfavoritesFolder(@PathVariable("className") String className, @PathVariable("objectId") String objectId, @PathVariable("folderId") long folderId, @PathVariable("userId") long userId, @PathVariable("sessionId") String sessionId)Removes an object associated to a favorites folder.- Specified by:
 removeObjectFromfavoritesFolderin interfaceFavoritesRestOpenApi- Parameters:
 className- Object class name.objectId- Object id.folderId- favorites folder id.userId- User id.sessionId- The session token id.
 
- 
createFavoritesFolderForUser
@RequestMapping(method=POST, value="createFavoritesFolderForUser/{name}/{userId}/{sessionId}", produces="application/json") public long createFavoritesFolderForUser(@PathVariable("name") String name, @PathVariable("userId") long userId, @PathVariable("sessionId") String sessionId)Create a relationship between an user and a new favorites folder.- Specified by:
 createFavoritesFolderForUserin interfaceFavoritesRestOpenApi- Parameters:
 name- Favorites folder name.userId- User id.sessionId- The session token id.- Returns:
 - The new favorites folder id.
 
 
- 
deleteFavoritesFolders
@RequestMapping(method=DELETE, value="deleteFavoritesFolders/{ids}/{userId}/{sessionId}", produces="application/json") public void deleteFavoritesFolders(@PathVariable("ids") long[] ids, @PathVariable("userId") long userId, @PathVariable("sessionId") String sessionId)Delete a Bookmark Folder of an User.- Specified by:
 deleteFavoritesFoldersin interfaceFavoritesRestOpenApi- Parameters:
 ids- Favorites folders id.userId- User id.sessionId- The session token id.
 
- 
getFavoritesFoldersForUser
@RequestMapping(method=GET, value="getFavoritesFoldersForUser/{userId}/{sessionId}", produces="application/json") public List<FavoritesFolder> getFavoritesFoldersForUser(@PathVariable("userId") long userId, @PathVariable("sessionId") String sessionId)Get the favorites folders create by an user.- Specified by:
 getFavoritesFoldersForUserin interfaceFavoritesRestOpenApi- Parameters:
 userId- user id.sessionId- The session token id.- Returns:
 - List of Bookmarks folders for an User.
 
 
- 
getObjectsInFavoritesFolder
@RequestMapping(method=GET, value="getObjectsInFavoritesFolder/{folderId}/{userId}/{limit}/{sessionId}", produces="application/json") public List<BusinessObjectLight> getObjectsInFavoritesFolder(@PathVariable("folderId") long folderId, @PathVariable("userId") long userId, @PathVariable("limit") int limit, @PathVariable("sessionId") String sessionId)Get the object assigned to the bookmark.- Specified by:
 getObjectsInFavoritesFolderin interfaceFavoritesRestOpenApi- Parameters:
 folderId- Favorites folder id.userId- User id.limit- Max number of results.sessionId- The session token id.- Returns:
 - List of objects related to bookmark.
 
 
- 
getFavoritesFoldersForObject
@RequestMapping(method=GET, value="getFavoritesFoldersForObject/{userId}/{className}/{objectId}/{sessionId}", produces="application/json") public List<FavoritesFolder> getFavoritesFoldersForObject(@PathVariable("userId") long userId, @PathVariable("className") String className, @PathVariable("objectId") String objectId, @PathVariable("sessionId") String sessionId)Get the bookmarks where an object is associated.- Specified by:
 getFavoritesFoldersForObjectin interfaceFavoritesRestOpenApi- Parameters:
 userId- User id.className- Object class name.objectId- Object id.sessionId- The session token id.- Returns:
 - List of favorites folders where an object are an item.
 
 
- 
getFavoritesFolder
@RequestMapping(method=GET, value="getFavoritesFolder/{folderId}/{userId}/{sessionId}", produces="application/json") public FavoritesFolder getFavoritesFolder(@PathVariable("folderId") long folderId, @PathVariable("userId") long userId, @PathVariable("sessionId") String sessionId)Gets a favorites folder.- Specified by:
 getFavoritesFolderin interfaceFavoritesRestOpenApi- Parameters:
 folderId- Favorites folder id.userId- User id.sessionId- The session token id.- Returns:
 - The favorite folder with id.
 
 
- 
updateFavoritesFolder
@RequestMapping(method=PUT, value="updateFavoritesFolder/{folderId}/{userId}/{name}/{sessionId}", produces="application/json") public void updateFavoritesFolder(@PathVariable("folderId") long folderId, @PathVariable("userId") long userId, @PathVariable("name") String name, @PathVariable("sessionId") String sessionId)Updates a favorites folder.- Specified by:
 updateFavoritesFolderin interfaceFavoritesRestOpenApi- Parameters:
 folderId- Favorites folder iduserId- User id.name- Favorites folder name.sessionId- The favorite folder with id.
 
 - 
 
 -