Package org.silverpeas.core.admin.space
Interface UserFavoriteSpaceService
-
- All Known Implementing Classes:
UserFavoriteSpaceServiceImpl
public interface UserFavoriteSpaceService
UserFavoriteSpace DAO interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addUserFavoriteSpace(UserFavoriteSpaceVO ufsVO)
Add given User Favorite Space Value Object parameter in Databaseboolean
containsFavoriteSubSpace(SpaceInstLight space, List<UserFavoriteSpaceVO> listUFS, String userId)
Is the specified space contains the specified user's favorite spaces as subspaces?List<UserFavoriteSpaceVO>
getListUserFavoriteSpace(String userId)
Retrieve the list of user favorite spaceboolean
isUserFavoriteSpace(List<UserFavoriteSpaceVO> listUFS, SpaceInstLight space)
Is the specified space instance is one of the user's favorite spaces?boolean
removeUserFavoriteSpace(UserFavoriteSpaceVO ufsVO)
Remove given User Favorite Space Value Object from Database remove one record if ufsVO.userId and ufsVO.spaceId is not null remove all ufsVO.spaceId if ufsVO.userId is null remove all ufsVO.userId if ufsVO.spaceId is null
-
-
-
Method Detail
-
getListUserFavoriteSpace
List<UserFavoriteSpaceVO> getListUserFavoriteSpace(String userId)
Retrieve the list of user favorite space- Parameters:
userId
- : the user identifier- Returns:
- the list of User Favorite Space Value Object
-
addUserFavoriteSpace
boolean addUserFavoriteSpace(UserFavoriteSpaceVO ufsVO)
Add given User Favorite Space Value Object parameter in Database- Parameters:
ufsVO
- a UserFavoriteSpaceVO- Returns:
- true if action was successful, false otherwise
-
removeUserFavoriteSpace
boolean removeUserFavoriteSpace(UserFavoriteSpaceVO ufsVO)
Remove given User Favorite Space Value Object from Database- remove one record if ufsVO.userId and ufsVO.spaceId is not null
- remove all ufsVO.spaceId if ufsVO.userId is null
- remove all ufsVO.userId if ufsVO.spaceId is null
- Parameters:
ufsVO
- a UserFavoriteSpaceVO- Returns:
- true if action was successful, false otherwise
-
isUserFavoriteSpace
boolean isUserFavoriteSpace(List<UserFavoriteSpaceVO> listUFS, SpaceInstLight space)
Is the specified space instance is one of the user's favorite spaces?- Parameters:
listUFS
- : the list of user favorite spacespace
- : a space instance- Returns:
- true if list of user favorites space contains spaceId identifier, false otherwise.
-
containsFavoriteSubSpace
boolean containsFavoriteSubSpace(SpaceInstLight space, List<UserFavoriteSpaceVO> listUFS, String userId)
Is the specified space contains the specified user's favorite spaces as subspaces?- Parameters:
space
- : space instancelistUFS
- : the list of user favorite space- Returns:
- true if the current space contains user favorites sub space, false otherwise
-
-