Package cz.metacentrum.perun.core.blImpl
Class VosManagerBlImpl
java.lang.Object
cz.metacentrum.perun.core.blImpl.VosManagerBlImpl
- All Implemented Interfaces:
VosManagerBl
VosManager business logic
- Author:
- Michal Prochazka michalp@ics.muni.cz, Slavek Licehammer glory@ics.muni.cz
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMemberVo
(PerunSession sess, Vo vo, Vo memberVo) Adds new relationship between vo and a member vo.void
checkVoExists
(PerunSession sess, Vo vo) void
convertSponsoredUsers
(PerunSession sess, Vo vo) For the given vo, creates sponsored members for each sponsored user who is a member of the given vo.void
convertSponsoredUsersWithNewSponsor
(PerunSession sess, Vo vo, User newSponsor) For the given vo, creates sponsored members for each sponsored user who is a member of the given vo.createMemberCandidates
(PerunSession sess, List<RichUser> users, Vo vo, Group group, List<Candidate> candidates, List<String> attrNames) Creates MemberCandidates for given RichUsers, vo, group and candidates.createVo
(PerunSession sess, Vo vo) Create new VO.void
deleteVo
(PerunSession sess, Vo vo) Delete VO.void
deleteVo
(PerunSession sess, Vo vo, boolean forceDelete) Delete VO.findCandidates
(PerunSession sess, Group group, String searchString) Finds users, who can join the group in Vo.findCandidates
(PerunSession sess, Group group, String searchString, List<ExtSource> extSources, boolean filterExistingMembers) findCandidates
(PerunSession sess, Vo vo, String searchString) Finds users, who can join the Vo.findCandidates
(PerunSession sess, Vo vo, String searchString, int maxNumOfResults) Finds users, who can join the Vo.findCandidates
(PerunSession sess, Vo vo, String searchString, int maxNumOfResults, List<ExtSource> extSources, boolean filterExistingMembers) getAdminGroups
(PerunSession sess, Vo vo) Deprecated.getAdminGroups
(PerunSession perunSession, Vo vo, String role) Get list of group administrators of the given VO.getAdmins
(PerunSession sess, Vo vo) Deprecated.getAdmins
(PerunSession perunSession, Vo vo, String role, boolean onlyDirectAdmins) Get list of user administrators of specific vo for specific role.getBanById
(PerunSession sess, int banId) Get ban by its id.getBanForMember
(PerunSession sess, int memberId) Get ban for given member, if it exists.getBansForUser
(PerunSession sess, int userId) Gets all bans for given usergetBansForVo
(PerunSession sess, int voId) Get list of all bans for vo with given id.getCompleteCandidates
(PerunSession sess, Vo vo, Group group, List<String> attrNames, String searchString, List<ExtSource> extSources) Finds MemberCandidates who can join the Group.getCompleteCandidates
(PerunSession sess, Vo vo, List<String> attrNames, String searchString) Finds MemberCandidates who can join the Vo.getDirectAdmins
(PerunSession sess, Vo vo) Deprecated.getDirectRichAdmins
(PerunSession sess, Vo vo) Deprecated.getDirectRichAdminsWithSpecificAttributes
(PerunSession perunSession, Vo vo, List<String> specificAttributes) Deprecated.getEnrichedBansForUser
(PerunSession sess, int userId, List<String> attrNames) Get all Enriched Bans for given UsergetEnrichedBansForVo
(PerunSession sess, Vo vo, List<String> attrNames) Get all Enriched Bans for given VO and attribute namesgetEnrichedVoById
(PerunSession sess, int id) Finds existing vo by and id and returns corresponding EnrichedVogetEnrichedVos
(PerunSession sess) Get list of all EnrichedVosgetMemberVos
(PerunSession sess, int voId) Gets all member organizations of the given vo.getParentVos
(PerunSession sess, int memberVoId) Gets all organizations where given vo is direct member.Gets the perunBl.getRichAdmins
(PerunSession perunSession, Vo vo) Deprecated.getRichAdmins
(PerunSession perunSession, Vo vo, String role, List<String> specificAttributes, boolean allUserAttributes, boolean onlyDirectAdmins) Get list of richUser administrators of specific vo for specific role.getRichAdminsWithAttributes
(PerunSession perunSession, Vo vo) Deprecated.getRichAdminsWithSpecificAttributes
(PerunSession perunSession, Vo vo, List<String> specificAttributes) Deprecated.getVoById
(PerunSession sess, int id) Finds existing VO by id.getVoByShortName
(PerunSession sess, String shortName) Find existing VO by short name (short name is unique).getVoMembersCountsByStatus
(PerunSession sess, Vo vo) Returns number of vo members by their status.getVos
(PerunSession sess) Get list of all Vos.getVosByIds
(PerunSession sess, List<Integer> ids) Finds existing VOs by ids.getVosByPerunBean
(PerunSession sess, Facility facility) Returns list of vos connected with a facilitygetVosByPerunBean
(PerunSession sess, Group group) Returns list of vos connected with a groupgetVosByPerunBean
(PerunSession sess, Host host) Returns list of vos connected with a hostgetVosByPerunBean
(PerunSession sess, Member member) Returns list of vos connected with a membergetVosByPerunBean
(PerunSession sess, Resource resource) Returns list of vos connected with a resourcegetVosByPerunBean
(PerunSession sess, User user) Returns list of vos connected with a userint
getVosCount
(PerunSession sess) Get count of all vos.void
handleGroupLostVoRole
(PerunSession sess, Group group, Vo vo, String role) Handles a group that lost a role.void
handleUserLostVoRole
(PerunSession sess, User user, Vo vo, String role) Handles a user that lost a role.boolean
isMemberBanned
(PerunSession sess, int memberId) Information if there is a ban for member with given id.boolean
isUserInRoleForVo
(PerunSession session, User user, String role, Vo vo, boolean checkGroups) Check whether a user is in a role for a given VO, possibly checking also user's groups.void
removeBan
(PerunSession sess, int banId) Removes ban with given id.void
removeBanForMember
(PerunSession sess, int memberId) Removes ban for member with given id.void
removeMemberVo
(PerunSession sess, Vo vo, Vo memberVo) Removes member vo from given vo.searchForVos
(PerunSession sess, String searchString, boolean includeIDs) Similarity substring search in all VOs based on shortname and descriptionsearchForVos
(PerunSession sess, String searchString, Set<Integer> voIds, boolean includeIDs) Similarity substring search in provided VOs based on shortname and descriptionsetBan
(PerunSession sess, BanOnVo banOnVo) Set given ban.void
setPerunBl
(PerunBl perunBl) Sets the perunBl for this instance.updateBan
(PerunSession sess, BanOnVo banOnVo) Update ban information.updateVo
(PerunSession sess, Vo vo) Updates VO.boolean
usesEmbeddedGroupRegistrations
(PerunSession sess, Vo vo) Returns true, if the given vo uses EMBEDDED_GROUP_APPLICATION item in its form.
-
Field Details
-
A_MEMBER_DEF_MEMBER_ORGANIZATIONS
- See Also:
-
A_MEMBER_DEF_MEMBER_ORGANIZATIONS_HISTORY
- See Also:
-
-
Constructor Details
-
VosManagerBlImpl
Constructor.
-
-
Method Details
-
addMemberVo
Description copied from interface:VosManagerBl
Adds new relationship between vo and a member vo. If user is member in both vos, updates memberOrganizations list attribute. If user is member only in member vo, creates member in parent vo and sets memberOrganizations list attribute.- Specified by:
addMemberVo
in interfaceVosManagerBl
- Parameters:
sess
- sessionvo
- vomemberVo
- new member of the vo- Throws:
RelationExistsException
- if member vo is already member of the vo
-
checkVoExists
- Specified by:
checkVoExists
in interfaceVosManagerBl
- Throws:
VoNotExistsException
-
convertSponsoredUsers
Description copied from interface:VosManagerBl
For the given vo, creates sponsored members for each sponsored user who is a member of the given vo. Original sponsors of the users will be set to the sponsored members.- Specified by:
convertSponsoredUsers
in interfaceVosManagerBl
- Parameters:
sess
- sessionvo
- vo where members will be converted
-
convertSponsoredUsersWithNewSponsor
Description copied from interface:VosManagerBl
For the given vo, creates sponsored members for each sponsored user who is a member of the given vo. The sponsored members will be sponsored by the given user, not by its original sponsors.- Specified by:
convertSponsoredUsersWithNewSponsor
in interfaceVosManagerBl
- Parameters:
sess
- sessionvo
- vo where members will be convertednewSponsor
- user, who will be set as a sponsor to the sponsored members
-
createMemberCandidates
public List<MemberCandidate> createMemberCandidates(PerunSession sess, List<RichUser> users, Vo vo, Group group, List<Candidate> candidates, List<String> attrNames) Creates MemberCandidates for given RichUsers, vo, group and candidates. If the given group is not null then to all members who are in this group is assigned the sourceGroupId of the given group. The given group can be null.- Parameters:
sess
- sessionusers
- usersgroup
- groupcandidates
- candidatesattrNames
- names of attributes that will be returned- Returns:
- list of MemberCandidates for given RichUsers, group and candidates
- Throws:
InternalErrorException
- internal error
-
createVo
Description copied from interface:VosManagerBl
Create new VO.- Specified by:
createVo
in interfaceVosManagerBl
- Parameters:
sess
-vo
- vo object with prefilled voShortName and voName- Returns:
- newly created VO
- Throws:
VoExistsException
-
deleteVo
Description copied from interface:VosManagerBl
Delete VO.- Specified by:
deleteVo
in interfaceVosManagerBl
- Parameters:
sess
-vo
-forceDelete
- force the deletion of the VO, regardless there are any existing entities associated with the VO (they will be deleted)
-
deleteVo
Description copied from interface:VosManagerBl
Delete VO.- Specified by:
deleteVo
in interfaceVosManagerBl
- Parameters:
sess
-vo
-
-
findCandidates
public List<Candidate> findCandidates(PerunSession sess, Vo vo, String searchString, int maxNumOfResults) Description copied from interface:VosManagerBl
Finds users, who can join the Vo.- Specified by:
findCandidates
in interfaceVosManagerBl
- Parameters:
sess
-vo
-searchString
- depends on the extSource of the VO, could by part of the name, email or something like that.maxNumOfResults
- limit the maximum number of returned entries- Returns:
- list of candidates who match the searchString
-
findCandidates
-
findCandidates
Description copied from interface:VosManagerBl
Finds users, who can join the Vo.- Specified by:
findCandidates
in interfaceVosManagerBl
- Parameters:
sess
-vo
- vo to be usedsearchString
- depends on the extSource of the VO, could by part of the name, email or something like that.- Returns:
- list of candidates who match the searchString
-
findCandidates
Description copied from interface:VosManagerBl
Finds users, who can join the group in Vo.- Specified by:
findCandidates
in interfaceVosManagerBl
- Parameters:
sess
-group
- group to be usedsearchString
- depends on the extSource of the Group, could by part of the name, email or something like that.- Returns:
- list of candidates who match the searchString
-
findCandidates
-
getAdminGroups
Description copied from interface:VosManagerBl
Get list of group administrators of the given VO.Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN
- Specified by:
getAdminGroups
in interfaceVosManagerBl
- Parameters:
perunSession
-vo
-role
-- Returns:
- List of groups, who are administrators of the Vo with supported role. Returns empty list if there is no VO group admin.
-
getAdminGroups
Deprecated.Description copied from interface:VosManagerBl
Get list of group administrators of the given VO.- Specified by:
getAdminGroups
in interfaceVosManagerBl
- Parameters:
sess
-vo
-- Returns:
- List of groups, who are administrators of the Vo. Returns empty list if there is no VO group admin.
-
getAdmins
public List<User> getAdmins(PerunSession perunSession, Vo vo, String role, boolean onlyDirectAdmins) Description copied from interface:VosManagerBl
Get list of user administrators of specific vo for specific role. If some group is administrator of the VO, all VALID members are included in the list.If onlyDirectAdmins is true, return only direct users of the group for supported role.
Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN
- Specified by:
getAdmins
in interfaceVosManagerBl
- Parameters:
perunSession
-vo
-role
- supported roleonlyDirectAdmins
- if true, get only direct user administrators (if false, get both direct and indirect)- Returns:
- list of all user administrators of the given vo for supported role
-
getAdmins
Deprecated.Description copied from interface:VosManagerBl
Get list of Vo administrators. If some group is administrator of the VO, all members are included in the list.- Specified by:
getAdmins
in interfaceVosManagerBl
- Parameters:
sess
-vo
-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
-
getBanById
Description copied from interface:VosManagerBl
Get ban by its id.- Specified by:
getBanById
in interfaceVosManagerBl
- Parameters:
sess
- sessionbanId
- ban id- Returns:
- ban object
- Throws:
BanNotExistsException
- if ban with given id is not found
-
getBanForMember
Description copied from interface:VosManagerBl
Get ban for given member, if it exists.- Specified by:
getBanForMember
in interfaceVosManagerBl
- Parameters:
sess
- sessionmemberId
- member id- Returns:
- ban object, or null if there is no ban for given member
-
getBansForUser
Description copied from interface:VosManagerBl
Gets all bans for given user- Specified by:
getBansForUser
in interfaceVosManagerBl
- Parameters:
sess
- sessionuserId
- id of user- Returns:
- list of bans for given user
-
getBansForVo
Description copied from interface:VosManagerBl
Get list of all bans for vo with given id.- Specified by:
getBansForVo
in interfaceVosManagerBl
- Parameters:
sess
- sessionvoId
- vo id- Returns:
- list of bans for given vo
-
getCompleteCandidates
public List<MemberCandidate> getCompleteCandidates(PerunSession sess, Vo vo, List<String> attrNames, String searchString) Description copied from interface:VosManagerBl
Finds MemberCandidates who can join the Vo.- Specified by:
getCompleteCandidates
in interfaceVosManagerBl
- Parameters:
sess
- sessionvo
- vo to be usedattrNames
- name of attributes to be searchedsearchString
- depends on the extSource of the Vo, could by part of the name, email or something like that.- Returns:
- list of memberCandidates who match the searchString
-
getCompleteCandidates
public List<MemberCandidate> getCompleteCandidates(PerunSession sess, Vo vo, Group group, List<String> attrNames, String searchString, List<ExtSource> extSources) Description copied from interface:VosManagerBl
Finds MemberCandidates who can join the Group. If the given vo is not null, it searches only users who belong to this Vo or who have ues in any of given extSources.- Specified by:
getCompleteCandidates
in interfaceVosManagerBl
- Parameters:
sess
- sessionvo
- vo if vo is null, users are searched in whole perun, otherwise users are searched in members of given vo and in users with ues in any of given extSourcesgroup
- group to be usedattrNames
- name of attributes to be searchedsearchString
- depends on the extSource of the Vo, could by part of the name, email or something like that.extSources
- extSources used to find candidates and possibly users- Returns:
- list of memberCandidates who match the searchString
-
getDirectAdmins
Deprecated.Description copied from interface:VosManagerBl
Gets list of direct user administrators of the VO. 'Direct' means, there aren't included users, who are members of group administrators, in the returned list.- Specified by:
getDirectAdmins
in interfaceVosManagerBl
- Parameters:
sess
-vo
-
-
getDirectRichAdmins
Deprecated.Description copied from interface:VosManagerBl
Get list of Vo administrators directly assigned to VO like RichUsers without attributes.- Specified by:
getDirectRichAdmins
in interfaceVosManagerBl
- Parameters:
sess
-vo
-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
-
getDirectRichAdminsWithSpecificAttributes
@Deprecated public List<RichUser> getDirectRichAdminsWithSpecificAttributes(PerunSession perunSession, Vo vo, List<String> specificAttributes) Deprecated.Description copied from interface:VosManagerBl
Get list of Vo administrators, which are directly assigned (not by group membership) with specific attributes. From list of specificAttributes get all Users Attributes and find those for every RichAdmin (only, other attributes are not searched)- Specified by:
getDirectRichAdminsWithSpecificAttributes
in interfaceVosManagerBl
- Parameters:
perunSession
-vo
-specificAttributes
-- Returns:
- list of RichUsers with specific attributes.
-
getEnrichedBansForUser
public List<EnrichedBanOnVo> getEnrichedBansForUser(PerunSession sess, int userId, List<String> attrNames) throws AttributeNotExistsException Description copied from interface:VosManagerBl
Get all Enriched Bans for given User- Specified by:
getEnrichedBansForUser
in interfaceVosManagerBl
- Parameters:
sess
- sesionuserId
- User IDattrNames
- List of attributes, returns all attributes if null or empty- Returns:
- List of Enriched Bans
- Throws:
AttributeNotExistsException
-
getEnrichedBansForVo
public List<EnrichedBanOnVo> getEnrichedBansForVo(PerunSession sess, Vo vo, List<String> attrNames) throws AttributeNotExistsException Description copied from interface:VosManagerBl
Get all Enriched Bans for given VO and attribute names- Specified by:
getEnrichedBansForVo
in interfaceVosManagerBl
- Parameters:
sess
- sesionvo
- VOattrNames
- List of attributes, returns all attributes if null or empty- Returns:
- list of enriched bans
- Throws:
AttributeNotExistsException
-
getEnrichedVoById
Description copied from interface:VosManagerBl
Finds existing vo by and id and returns corresponding EnrichedVo- Specified by:
getEnrichedVoById
in interfaceVosManagerBl
- Parameters:
sess
-id
-- Returns:
- EnrichedVO object of requested VO, which contains its member and parent VOs
- Throws:
VoNotExistsException
-
getEnrichedVos
Description copied from interface:VosManagerBl
Get list of all EnrichedVos- Specified by:
getEnrichedVos
in interfaceVosManagerBl
- Parameters:
sess
-- Returns:
- List of EnrichedVos or empty list
-
getMemberVos
Description copied from interface:VosManagerBl
Gets all member organizations of the given vo.- Specified by:
getMemberVos
in interfaceVosManagerBl
- Parameters:
sess
- sessionvoId
- vo id- Returns:
- list of member vos
-
getParentVos
Description copied from interface:VosManagerBl
Gets all organizations where given vo is direct member.- Specified by:
getParentVos
in interfaceVosManagerBl
- Parameters:
sess
- sessionmemberVoId
- member vo id- Returns:
- list of direct parent vos
-
getPerunBl
Gets the perunBl.- Returns:
- The perunBl.
-
getRichAdmins
public List<RichUser> getRichAdmins(PerunSession perunSession, Vo vo, String role, List<String> specificAttributes, boolean allUserAttributes, boolean onlyDirectAdmins) throws UserNotExistsException Description copied from interface:VosManagerBl
Get list of richUser administrators of specific vo for specific role. If some group is administrator of the VO, all VALID members are included in the list.Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN
If "onlyDirectAdmins" is "true", return only direct users of the vo for supported role with specific attributes. If "allUserAttributes" is "true", do not specify attributes through list and return them all in objects richUser . Ignoring list of specific attributes.
- Specified by:
getRichAdmins
in interfaceVosManagerBl
- Parameters:
perunSession
-vo
-specificAttributes
- list of specified attributes which are needed in object richUserallUserAttributes
- if true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes)onlyDirectAdmins
- if true, get only direct user administrators (if false, get both direct and indirect)- Returns:
- list of RichUser administrators for the vo and supported role with attributes
- Throws:
UserNotExistsException
-
getRichAdmins
Deprecated.Description copied from interface:VosManagerBl
Get list of Vo administrators like RichUsers without attributes.- Specified by:
getRichAdmins
in interfaceVosManagerBl
- Parameters:
perunSession
-vo
-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
-
getRichAdminsWithAttributes
@Deprecated public List<RichUser> getRichAdminsWithAttributes(PerunSession perunSession, Vo vo) throws UserNotExistsException Deprecated.Description copied from interface:VosManagerBl
Get list of Vo administrators like RichUsers with attributes.- Specified by:
getRichAdminsWithAttributes
in interfaceVosManagerBl
- Parameters:
perunSession
-vo
-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
- Throws:
UserNotExistsException
-
getRichAdminsWithSpecificAttributes
@Deprecated public List<RichUser> getRichAdminsWithSpecificAttributes(PerunSession perunSession, Vo vo, List<String> specificAttributes) Deprecated.Description copied from interface:VosManagerBl
Get list of Vo administrators with specific attributes. From list of specificAttributes get all Users Attributes and find those for every RichAdmin (only, other attributes are not searched)- Specified by:
getRichAdminsWithSpecificAttributes
in interfaceVosManagerBl
- Parameters:
perunSession
-vo
-specificAttributes
-- Returns:
- list of RichUsers with specific attributes.
-
getVoById
Description copied from interface:VosManagerBl
Finds existing VO by id.- Specified by:
getVoById
in interfaceVosManagerBl
- Parameters:
sess
-id
-- Returns:
- VO with requested id or throws if the VO with specified id doesn't exist
- Throws:
VoNotExistsException
-
getVoByShortName
Description copied from interface:VosManagerBl
Find existing VO by short name (short name is unique).- Specified by:
getVoByShortName
in interfaceVosManagerBl
- Parameters:
sess
-shortName
- short name of VO which you find (for example "KZCU")- Returns:
- VO with requested shortName or throws if the VO with specified shortName doesn't exist
- Throws:
VoNotExistsException
-
getVoMembersCountsByStatus
Description copied from interface:VosManagerBl
Returns number of vo members by their status.- Specified by:
getVoMembersCountsByStatus
in interfaceVosManagerBl
- Parameters:
sess
- perun sessionvo
- vo of members- Returns:
- map of status in vo to number of vo members with the status
-
getVos
Description copied from interface:VosManagerBl
Get list of all Vos.- Specified by:
getVos
in interfaceVosManagerBl
- Parameters:
sess
-- Returns:
- List of VOs or empty ArrayList
-
getVosByIds
Description copied from interface:VosManagerBl
Finds existing VOs by ids.- Specified by:
getVosByIds
in interfaceVosManagerBl
- Parameters:
sess
-ids
-- Returns:
- VOs with requested ids
-
getVosByPerunBean
Description copied from interface:VosManagerBl
Returns list of vos connected with a group- Specified by:
getVosByPerunBean
in interfaceVosManagerBl
- Parameters:
sess
-group
-- Returns:
- list of vos connected with group
- Throws:
VoNotExistsException
-
getVosByPerunBean
Description copied from interface:VosManagerBl
Returns list of vos connected with a member- Specified by:
getVosByPerunBean
in interfaceVosManagerBl
- Parameters:
sess
-member
-- Returns:
- list of vos connected with member
-
getVosByPerunBean
Description copied from interface:VosManagerBl
Returns list of vos connected with a resource- Specified by:
getVosByPerunBean
in interfaceVosManagerBl
- Parameters:
sess
-resource
-- Returns:
- list of vos connected with resource
- Throws:
VoNotExistsException
-
getVosByPerunBean
Description copied from interface:VosManagerBl
Returns list of vos connected with a user- Specified by:
getVosByPerunBean
in interfaceVosManagerBl
- Parameters:
sess
-user
-- Returns:
- list of vos connected with user
-
getVosByPerunBean
Description copied from interface:VosManagerBl
Returns list of vos connected with a host- Specified by:
getVosByPerunBean
in interfaceVosManagerBl
- Parameters:
sess
-host
-- Returns:
- list of vos connected with host
-
getVosByPerunBean
Description copied from interface:VosManagerBl
Returns list of vos connected with a facility- Specified by:
getVosByPerunBean
in interfaceVosManagerBl
- Parameters:
sess
-facility
-- Returns:
- list of vos connected with facility
-
getVosCount
Description copied from interface:VosManagerBl
Get count of all vos.- Specified by:
getVosCount
in interfaceVosManagerBl
- Parameters:
sess
-- Returns:
- count of all vos
-
handleGroupLostVoRole
Description copied from interface:VosManagerBl
Handles a group that lost a role.- Specified by:
handleGroupLostVoRole
in interfaceVosManagerBl
- Parameters:
sess
- perun sessiongroup
- groupvo
- virtual organizationrole
- role of group in VO
-
handleUserLostVoRole
Description copied from interface:VosManagerBl
Handles a user that lost a role.- Specified by:
handleUserLostVoRole
in interfaceVosManagerBl
- Parameters:
sess
- perun sessionuser
- uservo
- virtual organizationrole
- role of user in VO
-
isMemberBanned
Description copied from interface:VosManagerBl
Information if there is a ban for member with given id.- Specified by:
isMemberBanned
in interfaceVosManagerBl
- Parameters:
sess
- sessionmemberId
- member id- Returns:
- true, if member with given id is banned, false otherwise
-
isUserInRoleForVo
public boolean isUserInRoleForVo(PerunSession session, User user, String role, Vo vo, boolean checkGroups) Description copied from interface:VosManagerBl
Check whether a user is in a role for a given VO, possibly checking also user's groups.- Specified by:
isUserInRoleForVo
in interfaceVosManagerBl
- Parameters:
session
- sessionuser
- userrole
- rolevo
- virtual organizationcheckGroups
- check also groups of the user whether they have the role- Returns:
- true if user is directly in role for the vo, or if "checkGroups" flag is set and at least one of the groups is in the role
-
removeBan
Description copied from interface:VosManagerBl
Removes ban with given id.- Specified by:
removeBan
in interfaceVosManagerBl
- Parameters:
sess
- sessionbanId
- ban id- Throws:
BanNotExistsException
- if there is no ban with given id
-
removeBanForMember
Description copied from interface:VosManagerBl
Removes ban for member with given id.- Specified by:
removeBanForMember
in interfaceVosManagerBl
- Parameters:
sess
- sessionmemberId
- member id- Throws:
BanNotExistsException
- if there is no ban for member with given id
-
removeMemberVo
Description copied from interface:VosManagerBl
Removes member vo from given vo. Updates memberOrganizations list attribute for those members of parent vo who came from the member vo.- Specified by:
removeMemberVo
in interfaceVosManagerBl
- Parameters:
sess
- sessionvo
- vomemberVo
- vo to be removed- Throws:
RelationNotExistsException
- if member vo is not a member of the vo
-
searchForVos
Description copied from interface:VosManagerBl
Similarity substring search in all VOs based on shortname and description- Specified by:
searchForVos
in interfaceVosManagerBl
- Parameters:
sess
- sessionsearchString
- string to search forincludeIDs
- whether to search in IDs as well, used for PERUNADMINs- Returns:
- list of matched vos
-
searchForVos
public List<Vo> searchForVos(PerunSession sess, String searchString, Set<Integer> voIds, boolean includeIDs) Description copied from interface:VosManagerBl
Similarity substring search in provided VOs based on shortname and description- Specified by:
searchForVos
in interfaceVosManagerBl
- Parameters:
sess
- sessionsearchString
- string to search forvoIds
- VO IDs in which to perform the searchincludeIDs
- whether to search in IDs as well, used for PERUNADMINs- Returns:
- list of matched vos
-
setBan
public BanOnVo setBan(PerunSession sess, BanOnVo banOnVo) throws MemberNotExistsException, BanAlreadyExistsException Description copied from interface:VosManagerBl
Set given ban.- Specified by:
setBan
in interfaceVosManagerBl
- Parameters:
sess
- sessionbanOnVo
- ban information, memberId, voId, validity and description are needed- Returns:
- created ban object
- Throws:
MemberNotExistsException
BanAlreadyExistsException
-
setPerunBl
Sets the perunBl for this instance.- Parameters:
perunBl
- The perunBl.
-
updateBan
Description copied from interface:VosManagerBl
Update ban information. Only description and validity are updated.- Specified by:
updateBan
in interfaceVosManagerBl
- Parameters:
sess
- sessionbanOnVo
- updated ban- Returns:
- updated ban object
-
updateVo
Description copied from interface:VosManagerBl
Updates VO.- Specified by:
updateVo
in interfaceVosManagerBl
- Parameters:
sess
-vo
-- Returns:
- returns updated VO
-
usesEmbeddedGroupRegistrations
Description copied from interface:VosManagerBl
Returns true, if the given vo uses EMBEDDED_GROUP_APPLICATION item in its form.- Specified by:
usesEmbeddedGroupRegistrations
in interfaceVosManagerBl
- Parameters:
sess
- sessionvo
- vo- Returns:
- true, if the given vo uses EMBEDDED_GROUP_APPLICATION item in its form, false otherwise.
-