Package cz.metacentrum.perun.core.bl
Interface SecurityTeamsManagerBl
- All Known Implementing Classes:
SecurityTeamsManagerBlImpl
public interface SecurityTeamsManagerBl
- Author:
- Ondrej Velisek invalid input: '<'ondrejvelisek@gmail.com>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addUserToBlacklist
(PerunSession sess, SecurityTeam securityTeam, User user, String description) Blacklist user by given security team with description.void
checkGroupIsNotSecurityAdmin
(PerunSession sess, SecurityTeam securityTeam, Group group) check if group is not security admin of given security team throw exception if it isvoid
checkGroupIsSecurityAdmin
(PerunSession sess, SecurityTeam securityTeam, Group group) check if group is security admin of given security team throw exception if is notvoid
checkSecurityTeamExists
(PerunSession sess, SecurityTeam securityTeam) check if security team exists throw exception if doesn'tvoid
checkSecurityTeamNotExists
(PerunSession sess, SecurityTeam securityTeam) check if security team does not exist throw exception if dovoid
checkSecurityTeamUniqueName
(PerunSession sess, SecurityTeam securityTeam) check if name is unique throw exception if it is notvoid
checkUserIsInBlacklist
(PerunSession sess, SecurityTeam securityTeam, User user) check if user is blacklisted by given security team throw exception if is notvoid
checkUserIsNotInBlacklist
(PerunSession sess, SecurityTeam securityTeam, User user) check if user is not blacklisted by given security team throw exception if isvoid
checkUserIsNotSecurityAdmin
(PerunSession sess, SecurityTeam securityTeam, User user) check if user is not security admin of given security team throw exception if it isvoid
checkUserIsSecurityAdmin
(PerunSession sess, SecurityTeam securityTeam, User user) check if user is security admin of given security team throw exception if is notcreateSecurityTeam
(PerunSession sess, SecurityTeam securityTeam) Create security teamvoid
deleteSecurityTeam
(PerunSession sess, SecurityTeam securityTeam, boolean forceDelete) Delete security teamgetAdminGroups
(PerunSession sess, SecurityTeam securityTeam) Gets list of all group administrators of the SecurityTeam.getAdmins
(PerunSession sess, SecurityTeam securityTeam, boolean onlyDirectAdmins) get all security admins of given security teamget all security teams in perun systemgetBlacklist
(PerunSession sess, Facility facility) get union of blacklists of all security teams assigned to facilitygetBlacklist
(PerunSession sess, SecurityTeam securityTeam) get blacklist of security teamgetBlacklistWithDescription
(PerunSession sess, Facility facility) get union of blacklists of all security teams assigned to facility containing also descriptiongetBlacklistWithDescription
(PerunSession sess, SecurityTeam securityTeam) get blacklist of security team containing also descriptiongetSecurityTeamById
(PerunSession sess, int id) get security team by its idgetSecurityTeamByName
(PerunSession sess, String name) get security team by its namegetSecurityTeams
(PerunSession sess) Get list of SecurityTeams by access rights - PERUNADMIN : all teams - SECURITYADMIN : teams where user is adminboolean
isUserBlacklisted
(PerunSession sess, SecurityTeam st, User user) control if user is blacklisted by given security teamboolean
isUserBlacklisted
(PerunSession sess, User user) Check if user is blacklisted by any security teamvoid
removeUserFromAllBlacklists
(PerunSession sess, User user) Remove user from all blacklistsvoid
removeUserFromBlacklist
(PerunSession sess, SecurityTeam securityTeam, User user) remove user from blacklist of given security teamupdateSecurityTeam
(PerunSession sess, SecurityTeam securityTeam) Update security team
-
Method Details
-
addUserToBlacklist
void addUserToBlacklist(PerunSession sess, SecurityTeam securityTeam, User user, String description) Blacklist user by given security team with description.Description can be null.
- Parameters:
sess
-securityTeam
-user
-description
-- Throws:
InternalErrorException
-
checkGroupIsNotSecurityAdmin
void checkGroupIsNotSecurityAdmin(PerunSession sess, SecurityTeam securityTeam, Group group) throws AlreadyAdminException check if group is not security admin of given security team throw exception if it is- Parameters:
sess
-securityTeam
-group
-- Throws:
AlreadyAdminException
InternalErrorException
-
checkGroupIsSecurityAdmin
void checkGroupIsSecurityAdmin(PerunSession sess, SecurityTeam securityTeam, Group group) throws GroupNotAdminException check if group is security admin of given security team throw exception if is not- Parameters:
sess
-securityTeam
-group
-- Throws:
GroupNotAdminException
InternalErrorException
-
checkSecurityTeamExists
void checkSecurityTeamExists(PerunSession sess, SecurityTeam securityTeam) throws SecurityTeamNotExistsException check if security team exists throw exception if doesn't- Parameters:
sess
-securityTeam
-- Throws:
SecurityTeamNotExistsException
InternalErrorException
-
checkSecurityTeamNotExists
void checkSecurityTeamNotExists(PerunSession sess, SecurityTeam securityTeam) throws SecurityTeamExistsException check if security team does not exist throw exception if do- Parameters:
sess
-securityTeam
-- Throws:
SecurityTeamExistsException
InternalErrorException
-
checkSecurityTeamUniqueName
void checkSecurityTeamUniqueName(PerunSession sess, SecurityTeam securityTeam) throws SecurityTeamExistsException check if name is unique throw exception if it is not- Parameters:
sess
-securityTeam
-- Throws:
InternalErrorException
SecurityTeamExistsException
-
checkUserIsInBlacklist
void checkUserIsInBlacklist(PerunSession sess, SecurityTeam securityTeam, User user) throws UserAlreadyRemovedException check if user is blacklisted by given security team throw exception if is not- Parameters:
sess
-securityTeam
-user
-- Throws:
UserAlreadyRemovedException
InternalErrorException
-
checkUserIsNotInBlacklist
void checkUserIsNotInBlacklist(PerunSession sess, SecurityTeam securityTeam, User user) throws UserAlreadyBlacklistedException check if user is not blacklisted by given security team throw exception if is- Parameters:
sess
-securityTeam
-user
-- Throws:
UserAlreadyBlacklistedException
InternalErrorException
-
checkUserIsNotSecurityAdmin
void checkUserIsNotSecurityAdmin(PerunSession sess, SecurityTeam securityTeam, User user) throws AlreadyAdminException check if user is not security admin of given security team throw exception if it is- Parameters:
sess
-securityTeam
-user
-- Throws:
AlreadyAdminException
InternalErrorException
-
checkUserIsSecurityAdmin
void checkUserIsSecurityAdmin(PerunSession sess, SecurityTeam securityTeam, User user) throws UserNotAdminException check if user is security admin of given security team throw exception if is not- Parameters:
sess
-securityTeam
-user
-- Throws:
UserNotAdminException
InternalErrorException
-
createSecurityTeam
Create security team- Parameters:
sess
-securityTeam
-- Returns:
- Newly created Security team with new id
- Throws:
InternalErrorException
-
deleteSecurityTeam
void deleteSecurityTeam(PerunSession sess, SecurityTeam securityTeam, boolean forceDelete) throws SecurityTeamNotExistsException, RelationExistsException Delete security team- Parameters:
sess
-securityTeam
-forceDelete
- TRUE if Team should be forcefully deleted.- Throws:
InternalErrorException
SecurityTeamNotExistsException
RelationExistsException
- if forceDelete == FALSE and team is assigned to any facility or has blacklisted users.
-
getAdminGroups
Gets list of all group administrators of the SecurityTeam.- Parameters:
sess
-securityTeam
-- Returns:
- list of Groups that are admins in the security team
- Throws:
InternalErrorException
-
getAdmins
get all security admins of given security team- Parameters:
sess
-securityTeam
-- Returns:
- list of users which are security admins in security team
- Throws:
InternalErrorException
-
getAllSecurityTeams
get all security teams in perun system- Parameters:
sess
-- Returns:
- list of all security teams
- Throws:
InternalErrorException
-
getBlacklist
get blacklist of security team- Parameters:
sess
-securityTeam
-- Returns:
- list of blacklisted users by security team
- Throws:
InternalErrorException
-
getBlacklist
get union of blacklists of all security teams assigned to facility- Parameters:
sess
-facility
-- Returns:
- list of blacklisted users for facility
- Throws:
InternalErrorException
-
getBlacklistWithDescription
get blacklist of security team containing also description- Parameters:
sess
-securityTeam
-- Returns:
- List of pairs of blacklisted users by security team
- Throws:
InternalErrorException
-
getBlacklistWithDescription
get union of blacklists of all security teams assigned to facility containing also description- Parameters:
sess
-facility
-- Returns:
- List of pairs of blacklisted users for facility
- Throws:
InternalErrorException
-
getSecurityTeamById
get security team by its id- Parameters:
sess
-id
-- Returns:
- security team with given id
- Throws:
InternalErrorException
SecurityTeamNotExistsException
-
getSecurityTeamByName
SecurityTeam getSecurityTeamByName(PerunSession sess, String name) throws SecurityTeamNotExistsException get security team by its name- Parameters:
sess
-name
-- Returns:
- security team with given name
- Throws:
InternalErrorException
SecurityTeamNotExistsException
-
getSecurityTeams
Get list of SecurityTeams by access rights - PERUNADMIN : all teams - SECURITYADMIN : teams where user is admin- Parameters:
sess
-- Returns:
- list of security teams by access rights
- Throws:
InternalErrorException
-
isUserBlacklisted
control if user is blacklisted by given security team- Parameters:
sess
-st
-user
-- Returns:
- true if given user is blacklisted
- Throws:
InternalErrorException
-
isUserBlacklisted
Check if user is blacklisted by any security team- Parameters:
sess
-user
-- Returns:
- true if given user is blacklisted by any security team
- Throws:
InternalErrorException
-
removeUserFromAllBlacklists
Remove user from all blacklists- Parameters:
sess
-user
-- Throws:
InternalErrorException
-
removeUserFromBlacklist
remove user from blacklist of given security team- Parameters:
sess
-securityTeam
-user
-- Throws:
InternalErrorException
-
updateSecurityTeam
SecurityTeam updateSecurityTeam(PerunSession sess, SecurityTeam securityTeam) throws SecurityTeamNotExistsException Update security team- Parameters:
sess
-securityTeam
-- Returns:
- updated security team
- Throws:
InternalErrorException
SecurityTeamNotExistsException
-