Package org.silverpeas.core.admin.space
Class UserFavoriteSpaceServiceImpl
- java.lang.Object
-
- org.silverpeas.core.admin.space.UserFavoriteSpaceServiceImpl
-
- All Implemented Interfaces:
UserFavoriteSpaceService
@Service @Singleton @Default public class UserFavoriteSpaceServiceImpl extends Object implements UserFavoriteSpaceService
-
-
Constructor Summary
Constructors Constructor Description UserFavoriteSpaceServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete 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
public List<UserFavoriteSpaceVO> getListUserFavoriteSpace(String userId)
Description copied from interface:UserFavoriteSpaceService
Retrieve the list of user favorite space- Specified by:
getListUserFavoriteSpace
in interfaceUserFavoriteSpaceService
- Parameters:
userId
- : the user identifier- Returns:
- the list of User Favorite Space Value Object
-
addUserFavoriteSpace
public boolean addUserFavoriteSpace(UserFavoriteSpaceVO ufsVO)
Description copied from interface:UserFavoriteSpaceService
Add given User Favorite Space Value Object parameter in Database- Specified by:
addUserFavoriteSpace
in interfaceUserFavoriteSpaceService
- Parameters:
ufsVO
- a UserFavoriteSpaceVO- Returns:
- true if action was successful, false otherwise
-
removeUserFavoriteSpace
public boolean removeUserFavoriteSpace(UserFavoriteSpaceVO ufsVO)
Description copied from interface:UserFavoriteSpaceService
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
- Specified by:
removeUserFavoriteSpace
in interfaceUserFavoriteSpaceService
- Parameters:
ufsVO
- a UserFavoriteSpaceVO- Returns:
- true if action was successful, false otherwise
-
isUserFavoriteSpace
public boolean isUserFavoriteSpace(List<UserFavoriteSpaceVO> listUFS, SpaceInstLight space)
Description copied from interface:UserFavoriteSpaceService
Is the specified space instance is one of the user's favorite spaces?- Specified by:
isUserFavoriteSpace
in interfaceUserFavoriteSpaceService
- Parameters:
listUFS
- : the list of user favorite spacespace
- : a space instance- Returns:
- true if list of user favorites space contains spaceId identifier, false else if
-
containsFavoriteSubSpace
public boolean containsFavoriteSubSpace(SpaceInstLight space, List<UserFavoriteSpaceVO> listUFS, String userId)
Description copied from interface:UserFavoriteSpaceService
Is the specified space contains the specified user's favorite spaces as subspaces?- Specified by:
containsFavoriteSubSpace
in interfaceUserFavoriteSpaceService
- Parameters:
space
- : space instancelistUFS
- : the list of user favorite space- Returns:
- true if the current space contains user favorites sub space, false else if
-
-