com.sap.workspaces.workspace

Interface IRole


public interface IRole

Provides tools for the management of users in the specific 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()
          Returns all users in this role
 Collection getUsers(boolean recursive)
          Returns all users in this role
 boolean isUserInRole(com.sap.security.api.IPrincipal user)
          Checks if the specified user is in this 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 - @see 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
Throws:
MemberListException - @see 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 - @see MemberListException

getUsers

Collection getUsers()
Returns all users in this 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 this role

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

getUsers

Collection getUsers(boolean recursive)
Returns all users in this 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 @see IUser

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 @see IGroup
Throws:
MemberListException - @see 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 @see IGroup
Throws:
MemberListException - @see MemberListException

getGroups

Collection getGroups()
Returns all groups in this role

Returns:
A collection of all groups in this role @see IGroup


Copyright 2010 SAP AG Complete Copyright Notice