public class FavoriteServiceImpl extends Object implements FavoriteService
| Constructor and Description |
|---|
FavoriteServiceImpl(org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
LinkManager linkManager,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService,
org.exoplatform.services.organization.OrganizationService organizationService) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFavorite(javax.jcr.Node node,
String userName)
Adds favorite to a node.
|
List<javax.jcr.Node> |
getAllFavoriteNodesByUser(String workspace,
String repository,
String userName)
Gets all favorite nodes by a given user.
|
boolean |
isFavoriter(String userName,
javax.jcr.Node node)
Checks if a node is in favorite list of a given user.
|
void |
removeFavorite(javax.jcr.Node node,
String userName)
Removes favorite from a node.
|
public FavoriteServiceImpl(org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
LinkManager linkManager,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService,
org.exoplatform.services.organization.OrganizationService organizationService)
public void addFavorite(javax.jcr.Node node,
String userName)
throws Exception
addFavorite in interface FavoriteServicenode - The node to which favorite is added.userName - The user who added favorite to the node.Exception - The exception will be raised if the node can not add
mixin.public List<javax.jcr.Node> getAllFavoriteNodesByUser(String workspace, String repository, String userName) throws Exception
getAllFavoriteNodesByUser in interface FavoriteServiceworkspace - The workspace from which the favorite nodes are got.repository - The repository from which the favorite nodes are got.userName - The user who added favorite.Exceptionpublic void removeFavorite(javax.jcr.Node node,
String userName)
throws Exception
removeFavorite in interface FavoriteServicenode - The node from which favorite is removed.userName - The user who removed favorite from the node.Exceptionpublic boolean isFavoriter(String userName, javax.jcr.Node node) throws Exception
FavoriteServiceisFavoriter in interface FavoriteServiceuserName - The given user.node - The node to be checked.ExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.