Class RoleDAO
- java.lang.Object
-
- org.silverpeas.core.admin.user.dao.RoleDAO
-
@Repository public class RoleDAO extends Object
-
-
Constructor Summary
Constructors Constructor Description RoleDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<UserRoleRow>
getAllComponentObjectRoles(Connection con, List<String> groupIds, int userId)
Gets several groups and/or one user component object roles (not the direct component roles).List<UserRoleRow>
getRoles(Connection con, List<String> groupIds, int userId)
List<UserRoleRow>
getRoles(Connection con, List<String> groupIds, int userId, Collection<Integer> instanceIds)
Gets several groups and/or one user roles for the given identifier of component instance (not of objects managed by the component).List<UserRoleRow>
getRoles(Connection con, ProfiledObjectIds profiledObjectIds, Collection<Integer> instanceIds, List<String> groupIds, int userId)
Gets several groups and/or one user roles for objects of given identifiers of component instance (not directly those of of the component).
-
-
-
Method Detail
-
getAllComponentObjectRoles
public List<UserRoleRow> getAllComponentObjectRoles(Connection con, List<String> groupIds, int userId) throws SQLException
Gets several groups and/or one user component object roles (not the direct component roles). To get only groups roles, specify -1 for userId. To get only user roles, specify null or empty list for groupIds.- Parameters:
con
- connection with the database.groupIds
- a list of group identifiers.userId
- the user identifier.- Returns:
- a list of
UserRoleRow
instances. - Throws:
SQLException
- if an error occurs.
-
getRoles
public List<UserRoleRow> getRoles(Connection con, List<String> groupIds, int userId) throws SQLException
- Throws:
SQLException
-
getRoles
public List<UserRoleRow> getRoles(Connection con, List<String> groupIds, int userId, Collection<Integer> instanceIds) throws SQLException
Gets several groups and/or one user roles for the given identifier of component instance (not of objects managed by the component). To get only groups roles, specify -1 for userId. To get only user roles, specify null or empty list for groupIds.- Parameters:
con
- the connection with the database.groupIds
- a list of group identifiers.userId
- the user identifier.instanceIds
- the component instance identifiers.- Returns:
- a list of
UserRoleRow
instances. - Throws:
SQLException
- if an error occurs.
-
getRoles
public List<UserRoleRow> getRoles(Connection con, ProfiledObjectIds profiledObjectIds, Collection<Integer> instanceIds, List<String> groupIds, int userId) throws SQLException
Gets several groups and/or one user roles for objects of given identifiers of component instance (not directly those of of the component). To get only groups roles, specify -1 for userId. To get only user roles, specify null or empty list for groupIds.- Parameters:
con
- a connection with the database.profiledObjectIds
- if NOTHING is given, then all the rows associated to the type are returned, otherwise all the rows associated to type and ids.instanceIds
- the component instance identifiers.groupIds
- a list of group identifiers.userId
- the user identifier.- Returns:
- a list of
UserRoleRow
instances. - Throws:
SQLException
- if an error occurs.
-
-