com.sap.ip.collaboration.room.api
Interface IUserRoles


public interface IUserRoles

Interface describing the role assignments of a single user. Instances of this interface are used and returned in the interface IRoomUsers.

See Also:
IRoomUsers

Method Summary
 boolean addRole(com.sap.ip.collaboration.room.api.template.IRoomRole role)
          Assign the user to a new role.
 boolean addRoles(com.sap.ip.collaboration.room.api.template.IRoomRole[] roles)
          Assign multiple roles to the user.
 com.sap.ip.collaboration.room.api.template.IRoomRole[] getRoles()
          Get all roles the user is assigned to
 java.lang.String getUserId()
          Get the id of the user
 boolean hasRole(com.sap.ip.collaboration.room.api.template.IRoomRole role)
          Check if the user is assigned to a specific role
 boolean isEmpty()
          Check if the user is assigned to no roles at all
 boolean removeAllRoles()
          Remove all roles from the user
 boolean removeRole(com.sap.ip.collaboration.room.api.template.IRoomRole role)
          Remove a specific role from the user
 

Method Detail

getUserId

public java.lang.String getUserId()
Get the id of the user
Returns:
String containing the id of the user

getRoles

public com.sap.ip.collaboration.room.api.template.IRoomRole[] getRoles()
Get all roles the user is assigned to
Returns:
Array containing all roles of the user

hasRole

public boolean hasRole(com.sap.ip.collaboration.room.api.template.IRoomRole role)
Check if the user is assigned to a specific role
Parameters:
role - the role for the check
Returns:
true if the user is assigned to the given role, false otherwise

removeAllRoles

public boolean removeAllRoles()
Remove all roles from the user
Returns:
true if successful, false otherwise

removeRole

public boolean removeRole(com.sap.ip.collaboration.room.api.template.IRoomRole role)
Remove a specific role from the user
Parameters:
role - the role to be removed from the user
Returns:
true if successful, false otherwise

isEmpty

public boolean isEmpty()
Check if the user is assigned to no roles at all
Returns:
true if there are no roles assigned to the user, false if the user is assigned to at least one role

addRole

public boolean addRole(com.sap.ip.collaboration.room.api.template.IRoomRole role)
Assign the user to a new role. If the user was already assigned to the given role before the call, nothing happens.
Parameters:
newRole - the new role for the user
Returns:
true if successful, false otherwise

addRoles

public boolean addRoles(com.sap.ip.collaboration.room.api.template.IRoomRole[] roles)
Assign multiple roles to the 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:
newRoles - Array containing all roles to be assigned to the user
Returns:
true if successful, false otherwise