com.sap.ip.collaboration.room.api

Interface IRoomUsers

All Known Subinterfaces:
IRoomPrincipals

public interface IRoomUsers

Interface describing a snapshot of the current user-role assignments in a room.
This interface should not be used directly. Please use IRoomPrincipals instead


Method Summary
 boolean addGroupUsersToRole(com.sap.security.api.IGroup group, IRoomRole role, boolean childMembers)
          Assign all users who are member of a given group to a specific room role.
 boolean addGroupUsersToRoles(com.sap.security.api.IGroup group, IRoomRole[] roles, boolean childMembers)
          Assign all users who are member of a given group to a a set of room roles.
 IUserRoles addUserRole(String userId, IRoomRole role)
          Assign a new role to a user.
 boolean addUserRoles(IRoomUsers refUsers)
          Copy all user-role assignments from another IRoomUsers object to this object.
 IUserRoles addUserRoles(String userId, IRoomRole[] roles)
          Assign multiple roles to a user.
 boolean containsUser(String userId)
          Check if a user is contained
 boolean deleteAllUsers()
          Remove all users from all roles in this snapshot
 boolean deleteUser(String userId)
          Remove a specific user from all roles in this snapshot
 boolean deleteUserRoles(String userId)
          Same as deleteUser(String): Remove a specific user from all roles in this snapshot
 String[] getAllUsers()
          Get the ids of all users
 IRoomRole[] getUserRoles(String userId)
          Get all roles a specific user is assigned to
 IUserRoles getUserRolesObject(String userId)
          Get a specific user and all assigned roles to the user
 boolean hasUserRole(String userId, IRoomRole role)
          Check if a user is assigned to a specific role
 boolean removeUserRole(String userId, IRoomRole role)
          Remove a specific role from a user
 

Method Detail

getAllUsers

String[] getAllUsers()
Get the ids of all users

Returns:
Array containing all user ids

containsUser

boolean containsUser(String userId)
Check if a user is contained

Parameters:
userId - the id of the user
Returns:
true if the given user is assigned to one or more roles, false otherwise

getUserRolesObject

IUserRoles getUserRolesObject(String userId)
Get a specific user and all assigned roles to the user

Parameters:
userId - the id of the user
Returns:
IUserRoles object for the given user or null if the user is not assigned to any role

getUserRoles

IRoomRole[] getUserRoles(String userId)
Get all roles a specific user is assigned to

Parameters:
userId - the id of the user
Returns:
Array containing all roles the given user is assigned to

hasUserRole

boolean hasUserRole(String userId,
                    IRoomRole role)
Check if a user is assigned to a specific role

Parameters:
userId - the id of the user
role - the role object
Returns:
true if the given user is assigned to the given role, false otherwise

addUserRole

IUserRoles addUserRole(String userId,
                       IRoomRole role)
Assign a new role to a user. If the user was already assigned to the given role before the call, nothing happens.

Parameters:
userId - the id of the user
role - the role object
Returns:
IUserRoles object for the given user reflecting the change in the role assignments

addUserRoles

IUserRoles addUserRoles(String userId,
                        IRoomRole[] roles)
Assign multiple roles to a user. If the user was already assigned to one or more of the given roles before the call, only the remaining roles are assigned.

Parameters:
userId - the id of the user
roles - Array containing the new roles for the user
Returns:
IUserRoles object for the given user reflecting the changes in the role assignments

addGroupUsersToRole

boolean addGroupUsersToRole(com.sap.security.api.IGroup group,
                            IRoomRole role,
                            boolean childMembers)
Assign all users who are member of a given group to a specific room role. Not the group itself, but its members are assigned to the role. This means if the group is changed later (e.g. new members are invited), this doesn't affect the room role. With the flag childMembers=false only the direct members of the group are assigned. childMembers=true means that also members of sub groups (recursively) are assigned to the room role. If one or more of the group members was already assigned to the given role before the call, this is not an error.

Parameters:
group - the user group
role - the role object
childMembers - false means only direct members of the group are assigned
Returns:
true if the assignment was successful, false otherwise

addGroupUsersToRoles

boolean addGroupUsersToRoles(com.sap.security.api.IGroup group,
                             IRoomRole[] roles,
                             boolean childMembers)
Assign all users who are member of a given group to a a set of room roles. Not the group itself, but its members are assigned to the roles. This means if the group is changed later (e.g. new members are invited), this doesn't affect the room roles. With the flag childMembers=false only the direct members of the group are assigned. childMembers=true means that also members of sub groups (recursively) are assigned to the room roles. If one or more of the group members was already assigned to the given roles before the call, this is not an error.

Parameters:
group - the user group
roles - Array containing the roles for the group users
childMembers - false means only direct members of the group are assigned
Returns:
true if the assignment was successful, false otherwise

addUserRoles

boolean addUserRoles(IRoomUsers refUsers)
Copy all user-role assignments from another IRoomUsers object to this object. Previously existing assignments on this object are preserved.

Parameters:
refUsers - the IRoomUsers object containing the room-role assignments to be copied

deleteAllUsers

boolean deleteAllUsers()
Remove all users from all roles in this snapshot

Returns:
true if removal was successful, false otherwise

deleteUser

boolean deleteUser(String userId)
Remove a specific user from all roles in this snapshot

Parameters:
userId - the id of the user to be removed
Returns:
true if removal was successful, false otherwise

deleteUserRoles

boolean deleteUserRoles(String userId)
Same as deleteUser(String): Remove a specific user from all roles in this snapshot

Parameters:
userId - the id of the user to be removed
Returns:
true if removal was successful, false otherwise

removeUserRole

boolean removeUserRole(String userId,
                       IRoomRole role)
Remove a specific role from a user

Parameters:
userId - the id of the user
role - the role to be removed from the user
Returns:
true if removal was successful, false otherwise
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-COLL [sap.com] tc/kmc/coll/room api EP-KM-CRS


Copyright 2011 SAP AG Complete Copyright Notice