com.sap.workspaces.workspace

Interface IRole


public interface IRole

Provides methods for management of users in a workspace role


Method Summary
 void addGroup(com.sap.security.api.IUser user, com.sap.security.api.IGroup group)
          Adds the specified group to the role
 void addUser(com.sap.security.api.IUser user, com.sap.security.api.IUser userToAdd)
          Adds the specified user to the role
 void addUser(com.sap.security.api.IUser user, com.sap.security.api.IUser userToAdd, String requestReason)
          Adds the specified user to the role
 Collection getGroups()
          Returns all groups in this role
 Collection getUsers()
          Deprecated. Returns all users in this role - use getUsers(boolean recursive) instead
 Collection getUsers(boolean recursive)
          Returns all users in the role
 boolean isUserInRole(com.sap.security.api.IPrincipal user)
          Checks if the specified user is in the role
 void removeGroup(com.sap.security.api.IUser user, com.sap.security.api.IGroup group)
          Removes the specified group from the role
 void removeUser(com.sap.security.api.IUser user, com.sap.security.api.IUser userToRemove)
          Removes the specified user from the role
 

Method Detail

addUser

void addUser(com.sap.security.api.IUser user,
             com.sap.security.api.IUser userToAdd)
             throws MemberListException
Adds the specified user to the role

Parameters:
user - the performing user who has appropriate permissions
userToAdd - the user to add to the role
Throws:
MemberListException

addUser

void addUser(com.sap.security.api.IUser user,
             com.sap.security.api.IUser userToAdd,
             String requestReason)
             throws MemberListException
Adds the specified user to the role

Parameters:
user - the performing user who has appropriate permissions
userToAdd - the user to add to the role
requestReason - the reason for requesting to join the workspace; optional, can be null
Throws:
MemberListException

removeUser

void removeUser(com.sap.security.api.IUser user,
                com.sap.security.api.IUser userToRemove)
                throws MemberListException
Removes the specified user from the role

Parameters:
user - the performing user who has appropriate permissions
userToRemove - the user to remove from the role
Throws:
MemberListException

getUsers

Collection getUsers()
Deprecated. Returns all users in this role - use getUsers(boolean recursive) instead

Returns:
A collection of all users in this role

getUsers

Collection getUsers(boolean recursive)
Returns all users in the role

Parameters:
recursive - if true, returns all users in the role, including members of the nested groups; otherwise only users that are directly in the role
Returns:
A collection of all users in this role

isUserInRole

boolean isUserInRole(com.sap.security.api.IPrincipal user)
Checks if the specified user is in the role

Parameters:
user - the user
Returns:
True if the user is in the role

addGroup

void addGroup(com.sap.security.api.IUser user,
              com.sap.security.api.IGroup group)
              throws MemberListException
Adds the specified group to the role

Parameters:
user - the performing user who has appropriate permissions
group - the group to add to the role
Throws:
MemberListException

removeGroup

void removeGroup(com.sap.security.api.IUser user,
                 com.sap.security.api.IGroup group)
                 throws MemberListException
Removes the specified group from the role

Parameters:
user - the performing user who has appropriate permissions
group - the group to remove from the role
Throws:
MemberListException

getGroups

Collection getGroups()
Returns all groups in this role

Returns:
A collection of all groups in this role


Copyright 2011 SAP AG Complete Copyright Notice