public interface GlobalPrivilegeService
Modifier and Type | Method and Description |
---|---|
Set<UserDescriptor> |
getAllGrantees(Set<String> globalPrivilegeIds)
Gets the set of users who have been granted the specified set of global privileges.
|
Set<GlobalPrivilege> |
getAvailablePrivileges()
Returns a list of global privileges that are available for assignment.
|
Set<GlobalPrivilege> |
getGrantedPrivileges(String userId)
Gets the set of global privileges that are granted to a user.
|
Set<UserDescriptor> |
getGrantees(String globalPrivilegeId)
Gets the set of users who have been granted the specified global privilege.
|
void |
grantPrivilege(String userId,
String globalPrivilegeId)
Grants a global privilege to the specified user.
|
void |
grantPrivileges(String userId,
Set<String> globalPrivilegeIds)
Grants the global privileges to the specified user.
|
void |
grantPrivilegesToUsers(Set<String> userIds,
Set<String> globalPrivilegeIds)
Grants the global privileges to the specified set of users.
|
boolean |
hasPrivilege(String userId,
String globalPrivilegeId)
Indicates whether the specified user has the specified global privilege.
|
void |
revokeAllPrivileges(String userId)
Revokes all global privileges from the specified user.
|
void |
revokePrivilege(String userId,
String globalPrivilegeId)
Revokes a global privilege from the specified user.
|
void |
revokePrivileges(String userId,
Set<String> globalPrivilegeIds)
Revokes a set of global privileges from the set of users.
|
void |
revokePrivilegesFromUsers(Set<String> userIds,
Set<String> globalPrivilegeIds)
Revokes a set of global privileges from a set of users.
|
void |
setPrivileges(String userId,
Set<String> globalPrivilegeIds)
Sets the global privileges that are granted to the specified user.
|
void grantPrivilege(String userId, String globalPrivilegeId) throws PrincipalNotFoundException, PrivilegeNotFoundException
userId
- the user to grant the privilege to.globalPrivilegeId
- the global privilege to grant to the user.PrincipalNotFoundException
- thrown when the user specified is not found.PrivilegeNotFoundException
- thrown when the privilege specified is not defined.void grantPrivileges(String userId, Set<String> globalPrivilegeIds) throws PrincipalNotFoundException, PrivilegeNotFoundException
userId
- the user to grant the privileges to.globalPrivilegeIds
- the set of global privileges to grant to the user.PrincipalNotFoundException
- thrown when the user specified is not found.PrivilegeNotFoundException
- thrown when the privilege specified is not defined.void grantPrivilegesToUsers(Set<String> userIds, Set<String> globalPrivilegeIds) throws PrincipalNotFoundException, PrivilegeNotFoundException
userIds
- the users to grant the privileges to.globalPrivilegeIds
- the set of global privileges to grant.PrincipalNotFoundException
- thrown when a user specified is not found.PrivilegeNotFoundException
- thrown when a privilege specified is not defined.void revokePrivilege(String userId, String globalPrivilegeId) throws PrincipalNotFoundException, PrivilegeNotFoundException
userId
- the user to revoke the privilege from.globalPrivilegeId
- the global privilege to revoke from the user.PrincipalNotFoundException
- thrown when the user specified is not found.PrivilegeNotFoundException
- thrown when the privilege specified is not defined.void revokePrivileges(String userId, Set<String> globalPrivilegeIds) throws PrincipalNotFoundException, PrivilegeNotFoundException
userId
- the user to revoke the privilege from.globalPrivilegeIds
- the set of global privileges to revoke from the user.PrincipalNotFoundException
- thrown when the user specified is not found.PrivilegeNotFoundException
- thrown when a privilege specified is not defined.void revokePrivilegesFromUsers(Set<String> userIds, Set<String> globalPrivilegeIds) throws PrincipalNotFoundException, PrivilegeNotFoundException
userIds
- the users to grant the privileges to.globalPrivilegeIds
- the set of global privileges to revoke from the user.PrincipalNotFoundException
- thrown when a user specified is not found.PrivilegeNotFoundException
- thrown when a privilege specified is not defined.void revokeAllPrivileges(String userId) throws PrincipalNotFoundException
userId
- the user to revoke the privileges from.PrincipalNotFoundException
- thrown when the user specified is not found.void setPrivileges(String userId, Set<String> globalPrivilegeIds) throws PrincipalNotFoundException, PrivilegeNotFoundException
userId
- the user to set global privileges on.globalPrivilegeIds
- the set of global privileges to assign to the user.PrincipalNotFoundException
- thrown when a user specified is not found.PrivilegeNotFoundException
- thrown when the privilege specified is not defined.Set<GlobalPrivilege> getGrantedPrivileges(String userId) throws PrincipalNotFoundException
userId
- the user to retrieve granted global privileges.PrincipalNotFoundException
- thrown when the user specified is not found.Set<UserDescriptor> getGrantees(String globalPrivilegeId) throws PrivilegeNotFoundException
globalPrivilegeId
- the global privilege in question.PrivilegeNotFoundException
- thrown when the privilege specified is not defined.Set<UserDescriptor> getAllGrantees(Set<String> globalPrivilegeIds) throws PrivilegeNotFoundException
globalPrivilegeIds
- the global privileges in question.PrivilegeNotFoundException
- thrown when a privilege specified is not defined.boolean hasPrivilege(String userId, String globalPrivilegeId)
userId
- the user to check.globalPrivilegeId
- the global privilege in question.Set<GlobalPrivilege> getAvailablePrivileges()
GlobalPrivilege
objects that are available for assignment.Copyright (c) 2020, SAS Institute Inc., Cary, NC, USA