Package cz.metacentrum.perun.core.api
Interface VosManager
- All Known Implementing Classes:
VosManagerEntry
public interface VosManager
VOs manager can create, delete, update and find VO.
You must get an instance of VosManager from Perun:
PerunSession ps; //... VosManager vm = ps.getPerun().getVosManager();
- Author:
- Michal Prochazka, Slavek Licehammer
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdmin
(PerunSession perunSession, Vo vo, Group group) Add a group administrator to the VO.void
addAdmin
(PerunSession perunSession, Vo vo, User user) Add a user administrator to the VO.void
addMemberVo
(PerunSession sess, Vo vo, Vo memberVo) Adds new relationship between vo and a member vo.void
addSponsorRole
(PerunSession sess, Vo vo, Group group) Adds role SPONSOR for group in a VO.void
addSponsorRole
(PerunSession sess, Vo vo, User user) Adds role SPONSOR for user in a 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.createVo
(PerunSession perunSession, Vo vo) Create new VO.void
deleteVo
(PerunSession perunSession, Vo vo) Delete VO.void
deleteVo
(PerunSession perunSession, Vo vo, boolean forceDelete) Delete VO.findCandidates
(PerunSession sess, Group group, String searchString) Finds users, who can join the group in Vo.findCandidates
(PerunSession perunSession, Vo vo, String searchString) Finds users, who can join the Vo.findCandidates
(PerunSession perunSession, Vo vo, String searchString, int maxNumOfResults) Finds users, who can join the Vo.getAdminGroups
(PerunSession perunSession, Vo vo) Deprecated.getAdminGroups
(PerunSession perunSession, Vo vo, String role) Get list of group administrators of the given VO.getAdmins
(PerunSession perunSession, Vo vo) Deprecated.getAdmins
(PerunSession perunSession, Vo vo, String role, boolean onlyDirectAdmins) Get list of user administrators of specific vo for specific role.getAllVos
(PerunSession perunSession) Get list of Vos without any privilege.getBanById
(PerunSession sess, int banId) Get vo ban with given id.getBanForMember
(PerunSession sess, Member member) Get ban for given member, or null if he is not banned.getBansForVo
(PerunSession sess, int voId) Get list of all bans for vo with given id.getCompleteCandidates
(PerunSession sess, Group group, List<String> attrNames, String searchString) 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 perunSession, Vo vo) Deprecated.getDirectRichAdminsWithSpecificAttributes
(PerunSession perunSession, Vo vo, List<String> specificAttributes) Deprecated.getEnrichedBansForUser
(PerunSession sess, int userId, List<String> attrNames) Gets all Enriched Bans for given user.getEnrichedBansForVo
(PerunSession sess, int voId, List<String> attrNames) Gets all Enriched Bans for given vo.getEnrichedVoById
(PerunSession perunSession, int id) Finds existing vo by and id and returns corresponding EnrichedVogetEnrichedVos
(PerunSession perunSession) Get list of EnrichedVos of all the VOs the user has access togetMemberVos
(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.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 perunSession, int id) Finds existing VO by id.getVoByShortName
(PerunSession perunSession, 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 perunSession) Get list of Vos by Access Righs: If User is: - PERUNADMIN : get all Vos - VoAdmin : Vo where user is Admin - GroupAdmin: Vo where user is GroupAdmingetVosByIds
(PerunSession perunSession, List<Integer> ids) Finds existing VOs by ids.int
getVosCount
(PerunSession sess) Get count of all vos.void
removeAdmin
(PerunSession perunSession, Vo vo, Group group) Removes a group administrator from the VO.void
removeAdmin
(PerunSession perunSession, Vo vo, User user) Removes a user administrator from the VO.void
removeBan
(PerunSession sess, int banId) Remove vo ban with given id.void
removeBanForMember
(PerunSession sess, Member member) Remove vo ban for given member.void
removeMemberVo
(PerunSession sess, Vo vo, Vo memberVo) Removes member vo from given vo.void
removeSponsorRole
(PerunSession sess, Vo vo, Group group) Removes role SPONSOR from group in a VO.void
removeSponsorRole
(PerunSession sess, Vo vo, User user) Removes role SPONSOR from user in a VO.setBan
(PerunSession sess, BanOnVo ban) Set ban for member on his vo.updateBan
(PerunSession sess, BanOnVo banOnVo) Update existing ban (description, validation timestamp)updateVo
(PerunSession perunSession, Vo vo) Updates VO.
-
Field Details
-
MEMBERS_GROUP
- See Also:
-
MEMBERS_GROUP_DESCRIPTION
- See Also:
-
-
Method Details
-
getVos
Get list of Vos by Access Righs: If User is: - PERUNADMIN : get all Vos - VoAdmin : Vo where user is Admin - GroupAdmin: Vo where user is GroupAdmin- Parameters:
perunSession
-- Returns:
- List of VOs or empty ArrayList
- Throws:
RelationExistsException
InternalErrorException
PrivilegeException
-
getEnrichedVos
Get list of EnrichedVos of all the VOs the user has access to- Parameters:
perunSession
-- Returns:
- List of EnrichedVos or empty list
- Throws:
PrivilegeException
-
getAllVos
Get list of Vos without any privilege.- Parameters:
perunSession
-- Returns:
- List of VOs or empty ArrayList
- Throws:
RelationExistsException
InternalErrorException
PrivilegeException
-
deleteVo
Delete VO.- Parameters:
perunSession
-vo
-- Throws:
VoNotExistsException
InternalErrorException
PrivilegeException
-
deleteVo
void deleteVo(PerunSession perunSession, Vo vo, boolean forceDelete) throws VoNotExistsException, PrivilegeException Delete VO.- Parameters:
perunSession
-vo
-forceDelete
- force the deletion of the VO, regardless there are any existing entities associated with the VO (they will be deleted)- Throws:
VoNotExistsException
InternalErrorException
PrivilegeException
-
createVo
Create new VO.- Parameters:
perunSession
-vo
- vo object with prefilled voShortName and voName- Returns:
- newly created VO
- Throws:
VoExistsException
InternalErrorException
PrivilegeException
-
updateVo
Updates VO.- Parameters:
perunSession
-vo
-- Returns:
- returns updated VO
- Throws:
VoNotExistsException
PrivilegeException
InternalErrorException
-
getVoByShortName
Vo getVoByShortName(PerunSession perunSession, String shortName) throws VoNotExistsException, PrivilegeException Find existing VO by short name (short name is unique).- Parameters:
perunSession
-shortName
- short name of VO which you find (for example "KZCU")- Returns:
- VO with requested shortName or throws VoNotExistsException if the VO with specified shortName doesn't exist
- Throws:
VoNotExistsException
PrivilegeException
InternalErrorException
-
getVoById
Finds existing VO by id.- Parameters:
perunSession
-id
-- Returns:
- VO with requested id or throws VoNotExistsException if the VO with specified id doesn't exist
- Throws:
VoNotExistsException
InternalErrorException
PrivilegeException
-
getEnrichedVoById
EnrichedVo getEnrichedVoById(PerunSession perunSession, int id) throws VoNotExistsException, PrivilegeException Finds existing vo by and id and returns corresponding EnrichedVo- Parameters:
perunSession
-id
-- Returns:
- EnrichedVO object of requested VO, which contains its member and parent VOs
- Throws:
VoNotExistsException
PrivilegeException
-
getVosByIds
Finds existing VOs by ids.- Parameters:
perunSession
-ids
-- Returns:
- VOs with requested ids
- Throws:
InternalErrorException
PrivilegeException
-
findCandidates
List<Candidate> findCandidates(PerunSession perunSession, Vo vo, String searchString, int maxNumOfResults) throws VoNotExistsException, PrivilegeException Finds users, who can join the Vo.- Parameters:
perunSession
-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
- Throws:
InternalErrorException
VoNotExistsException
PrivilegeException
-
findCandidates
List<Candidate> findCandidates(PerunSession perunSession, Vo vo, String searchString) throws VoNotExistsException, PrivilegeException Finds users, who can join the Vo.- Parameters:
perunSession
-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
- Throws:
InternalErrorException
VoNotExistsException
PrivilegeException
-
findCandidates
List<Candidate> findCandidates(PerunSession sess, Group group, String searchString) throws GroupNotExistsException, PrivilegeException Finds users, who can join the group in Vo.- 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
- Throws:
InternalErrorException
GroupNotExistsException
PrivilegeException
-
getCompleteCandidates
List<MemberCandidate> getCompleteCandidates(PerunSession sess, Vo vo, List<String> attrNames, String searchString) throws VoNotExistsException, PrivilegeException Finds MemberCandidates who can join the Vo.- Parameters:
sess
- sessionvo
- vo to be usedattrNames
- names of attributes that will be foundsearchString
- depends on the extSource of the Group, could by part of the name, email or something like that.- Returns:
- list of MemberCandidates for given vo.
- Throws:
InternalErrorException
- internal errorVoNotExistsException
- when vo does not existPrivilegeException
- privilege exception
-
getCompleteCandidates
List<MemberCandidate> getCompleteCandidates(PerunSession sess, Group group, List<String> attrNames, String searchString) throws GroupNotExistsException, PrivilegeException Finds MemberCandidates who can join the Group.- Parameters:
sess
- sessiongroup
- group to be usedattrNames
- names of attributes that will be foundsearchString
- depends on the extSource of the Group, could by part of the name, email or something like that.- Returns:
- list of MemberCandidates for given vo.
- Throws:
InternalErrorException
- internal errorGroupNotExistsException
- when group does not existPrivilegeException
- privilege exception
-
addAdmin
void addAdmin(PerunSession perunSession, Vo vo, User user) throws PrivilegeException, AlreadyAdminException, VoNotExistsException, UserNotExistsException, RoleCannotBeManagedException Add a user administrator to the VO.- Parameters:
perunSession
-vo
-user
- user who will became an VO administrator- Throws:
InternalErrorException
PrivilegeException
AlreadyAdminException
VoNotExistsException
UserNotExistsException
RoleCannotBeManagedException
-
addAdmin
void addAdmin(PerunSession perunSession, Vo vo, Group group) throws PrivilegeException, AlreadyAdminException, VoNotExistsException, GroupNotExistsException, RoleCannotBeManagedException Add a group administrator to the VO.- Parameters:
perunSession
-vo
-group
- that will become a VO administrator- Throws:
InternalErrorException
PrivilegeException
AlreadyAdminException
VoNotExistsException
GroupNotExistsException
RoleCannotBeManagedException
-
removeAdmin
void removeAdmin(PerunSession perunSession, Vo vo, User user) throws PrivilegeException, VoNotExistsException, UserNotAdminException, UserNotExistsException, RoleCannotBeManagedException Removes a user administrator from the VO.- Parameters:
perunSession
-vo
-user
- user who will lose an VO administrator role- Throws:
InternalErrorException
PrivilegeException
VoNotExistsException
UserNotAdminException
UserNotExistsException
RoleCannotBeManagedException
-
removeAdmin
void removeAdmin(PerunSession perunSession, Vo vo, Group group) throws PrivilegeException, VoNotExistsException, GroupNotAdminException, GroupNotExistsException, RoleCannotBeManagedException Removes a group administrator from the VO.- Parameters:
perunSession
-vo
-group
- group that will lose a VO administrator role- Throws:
InternalErrorException
PrivilegeException
VoNotExistsException
GroupNotAdminException
GroupNotExistsException
RoleCannotBeManagedException
-
getAdmins
List<User> getAdmins(PerunSession perunSession, Vo vo, String role, boolean onlyDirectAdmins) throws PrivilegeException, VoNotExistsException, RoleNotSupportedException 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- 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
- Throws:
InternalErrorException
PrivilegeException
RoleNotSupportedException
VoNotExistsException
-
getRichAdmins
List<RichUser> getRichAdmins(PerunSession perunSession, Vo vo, String role, List<String> specificAttributes, boolean allUserAttributes, boolean onlyDirectAdmins) throws PrivilegeException, VoNotExistsException, RoleNotSupportedException, UserNotExistsException 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, SPONSOR 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.- 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:
InternalErrorException
PrivilegeException
VoNotExistsException
RoleNotSupportedException
UserNotExistsException
-
getAdminGroups
List<Group> getAdminGroups(PerunSession perunSession, Vo vo, String role) throws PrivilegeException, VoNotExistsException, RoleNotSupportedException Get list of group administrators of the given VO. Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN, SPONSOR- 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.
- Throws:
VoNotExistsException
InternalErrorException
PrivilegeException
RoleNotSupportedException
-
getAdmins
@Deprecated List<User> getAdmins(PerunSession perunSession, Vo vo) throws PrivilegeException, VoNotExistsException Deprecated.Get list of Vo administrators. If some group is administrator of the VO, all members are included in the list.- Parameters:
perunSession
-vo
-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
- Throws:
VoNotExistsException
InternalErrorException
PrivilegeException
-
getDirectAdmins
@Deprecated List<User> getDirectAdmins(PerunSession perunSession, Vo vo) throws PrivilegeException, VoNotExistsException Deprecated.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.- Parameters:
perunSession
-vo
-- Throws:
InternalErrorException
PrivilegeException
VoNotExistsException
-
getAdminGroups
@Deprecated List<Group> getAdminGroups(PerunSession perunSession, Vo vo) throws PrivilegeException, VoNotExistsException Deprecated.Get list of group administrators of the given VO.- Parameters:
perunSession
-vo
-- Returns:
- List of groups, who are administrators of the Vo. Returns empty list if there is no VO group admin.
- Throws:
VoNotExistsException
InternalErrorException
PrivilegeException
-
getDirectRichAdminsWithSpecificAttributes
@Deprecated List<RichUser> getDirectRichAdminsWithSpecificAttributes(PerunSession perunSession, Vo vo, List<String> specificAttributes) throws PrivilegeException, VoNotExistsException Deprecated.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)- Parameters:
perunSession
-vo
-specificAttributes
-- Returns:
- list of RichUsers with specific attributes.
- Throws:
InternalErrorException
PrivilegeException
VoNotExistsException
-
getRichAdminsWithSpecificAttributes
@Deprecated List<RichUser> getRichAdminsWithSpecificAttributes(PerunSession perunSession, Vo vo, List<String> specificAttributes) throws PrivilegeException, VoNotExistsException Deprecated.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)- Parameters:
perunSession
-vo
-specificAttributes
-- Returns:
- list of RichUsers with specific attributes.
- Throws:
InternalErrorException
PrivilegeException
VoNotExistsException
-
getRichAdmins
@Deprecated List<RichUser> getRichAdmins(PerunSession perunSession, Vo vo) throws PrivilegeException, VoNotExistsException Deprecated.Get list of Vo administrators like RichUsers without attributes.- Parameters:
perunSession
-vo
-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
- Throws:
VoNotExistsException
InternalErrorException
PrivilegeException
-
getRichAdminsWithAttributes
@Deprecated List<RichUser> getRichAdminsWithAttributes(PerunSession perunSession, Vo vo) throws PrivilegeException, VoNotExistsException, UserNotExistsException Deprecated.Get list of Vo administrators like RichUsers with attributes.- Parameters:
perunSession
-vo
-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
- Throws:
VoNotExistsException
InternalErrorException
UserNotExistsException
PrivilegeException
-
getVosCount
Get count of all vos.- Parameters:
sess
- PerunSession- Returns:
- count of all vos
- Throws:
InternalErrorException
-
getVoMembersCountsByStatus
Map<Status,Integer> getVoMembersCountsByStatus(PerunSession sess, Vo vo) throws VoNotExistsException, PrivilegeException Returns number of vo members by their status.- Parameters:
sess
- perun sessionvo
- vo of members- Returns:
- map of status in vo to number of vo members with the status
- Throws:
VoNotExistsException
- if vo does not existPrivilegeException
- insufficient permissions
-
addSponsorRole
void addSponsorRole(PerunSession sess, Vo vo, User user) throws AlreadyAdminException, VoNotExistsException, UserNotExistsException, PrivilegeException, RoleCannotBeManagedException Adds role SPONSOR for user in a VO.- Parameters:
sess
- perun sessionvo
- virtual organizationuser
- specific user in VO- Throws:
InternalErrorException
AlreadyAdminException
VoNotExistsException
UserNotExistsException
PrivilegeException
RoleCannotBeManagedException
-
addSponsorRole
void addSponsorRole(PerunSession sess, Vo vo, Group group) throws AlreadyAdminException, VoNotExistsException, GroupNotExistsException, PrivilegeException, RoleCannotBeManagedException Adds role SPONSOR for group in a VO.- Parameters:
sess
- perun sessionvo
- virtual organizationgroup
- specific group in VO- Throws:
InternalErrorException
AlreadyAdminException
VoNotExistsException
GroupNotExistsException
PrivilegeException
RoleCannotBeManagedException
-
removeSponsorRole
void removeSponsorRole(PerunSession sess, Vo vo, User user) throws UserNotAdminException, VoNotExistsException, UserNotExistsException, PrivilegeException, RoleCannotBeManagedException Removes role SPONSOR from user in a VO.- Parameters:
sess
- perun sessionvo
- virtual organizationuser
- user in VO for removal of sponsor role- Throws:
InternalErrorException
UserNotAdminException
VoNotExistsException
UserNotExistsException
PrivilegeException
RoleCannotBeManagedException
-
removeSponsorRole
void removeSponsorRole(PerunSession sess, Vo vo, Group group) throws GroupNotAdminException, VoNotExistsException, GroupNotExistsException, PrivilegeException, RoleCannotBeManagedException Removes role SPONSOR from group in a VO.- Parameters:
sess
- perun sessionvo
- virtual organizationgroup
- group in VO for removal of sponsor role- Throws:
InternalErrorException
GroupNotAdminException
VoNotExistsException
GroupNotExistsException
PrivilegeException
RoleCannotBeManagedException
-
setBan
BanOnVo setBan(PerunSession sess, BanOnVo ban) throws PrivilegeException, MemberNotExistsException, BanAlreadyExistsException Set ban for member on his vo.- Parameters:
sess
- sessionban
- ban information- Returns:
- created ban object
- Throws:
PrivilegeException
- insufficient permissionsMemberNotExistsException
- if there is no member with specified idBanAlreadyExistsException
-
removeBan
Remove vo ban with given id.- Parameters:
sess
- sessionbanId
- if of vo ban- Throws:
PrivilegeException
- insufficient permissionsBanNotExistsException
- if there is no ban with specified id
-
removeBanForMember
void removeBanForMember(PerunSession sess, Member member) throws PrivilegeException, BanNotExistsException, MemberNotExistsException Remove vo ban for given member.- Parameters:
sess
- sessionmember
- member- Throws:
PrivilegeException
- insufficient permissionsBanNotExistsException
- if there is no ban for member with given idMemberNotExistsException
- if there is no such member
-
getBanById
Get vo ban with given id.- Parameters:
sess
- sessionbanId
- ban id- Returns:
- found ban
- Throws:
BanNotExistsException
- if there is no such banPrivilegeException
- insufficient permissions
-
getBanForMember
BanOnVo getBanForMember(PerunSession sess, Member member) throws PrivilegeException, MemberNotExistsException Get ban for given member, or null if he is not banned.- Parameters:
sess
- sessionmember
- member- Returns:
- found ban or null if the member is not banned
- Throws:
PrivilegeException
- insufficient permissionsMemberNotExistsException
- if there is no such member
-
getBansForVo
List<BanOnVo> getBansForVo(PerunSession sess, int voId) throws PrivilegeException, VoNotExistsException Get list of all bans for vo with given id.- Parameters:
sess
- sessionvoId
- vo id- Returns:
- vo bans for given vo
- Throws:
PrivilegeException
- insufficient permissionsVoNotExistsException
- if there is no vo with given id
-
updateBan
BanOnVo updateBan(PerunSession sess, BanOnVo banOnVo) throws PrivilegeException, BanNotExistsException, VoNotExistsException Update existing ban (description, validation timestamp)- Parameters:
sess
-banOnVo
- the specific ban- Returns:
- updated ban
- Throws:
InternalErrorException
PrivilegeException
BanNotExistsException
VoNotExistsException
-
convertSponsoredUsers
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.- Parameters:
sess
- sessionvo
- vo where members will be converted- Throws:
PrivilegeException
-
convertSponsoredUsersWithNewSponsor
void convertSponsoredUsersWithNewSponsor(PerunSession sess, Vo vo, User newSponsor) throws PrivilegeException 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.- Parameters:
sess
- sessionvo
- vo where members will be convertednewSponsor
- user, who will be set as a sponsor to the sponsored members- Throws:
PrivilegeException
-
addMemberVo
void addMemberVo(PerunSession sess, Vo vo, Vo memberVo) throws RelationExistsException, PrivilegeException, VoNotExistsException 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.- Parameters:
sess
- sessionvo
- vomemberVo
- new member of the vo- Throws:
RelationExistsException
- if member vo is already member of the voPrivilegeException
- if not authorizedVoNotExistsException
- if any of the vos don't exist
-
removeMemberVo
void removeMemberVo(PerunSession sess, Vo vo, Vo memberVo) throws RelationNotExistsException, PrivilegeException, VoNotExistsException Removes member vo from given vo. Updates memberOrganizations list attribute for those members of parent vo who came from the member vo.- Parameters:
sess
- sessionvo
- vomemberVo
- member vo to be removed- Throws:
RelationNotExistsException
- if member vo is not a member of the voPrivilegeException
- if not authorizedVoNotExistsException
- if any of the vos don't exist
-
getMemberVos
Gets all member organizations of the given vo.- Parameters:
sess
- sessionvoId
- vo id- Returns:
- list of member vos
- Throws:
VoNotExistsException
- if given vo does not existPrivilegeException
- if not authorized
-
getParentVos
List<Vo> getParentVos(PerunSession sess, int memberVoId) throws VoNotExistsException, PrivilegeException Gets all organizations where given vo is direct member.- Parameters:
sess
- sessionmemberVoId
- member vo id- Returns:
- list of direct parent vos
- Throws:
VoNotExistsException
- if given member vo does not existPrivilegeException
- if not authorized
-
getEnrichedBansForVo
List<EnrichedBanOnVo> getEnrichedBansForVo(PerunSession sess, int voId, List<String> attrNames) throws PrivilegeException, AttributeNotExistsException, VoNotExistsException Gets all Enriched Bans for given vo. Attr names specify which attributes should be included in RichMember.- Parameters:
sess
- sessionvoId
- id of voattrNames
- List of attribute names, returns all attributes if empty or null- Returns:
- List of Enriched Bans
- Throws:
PrivilegeException
AttributeNotExistsException
VoNotExistsException
-
getEnrichedBansForUser
List<EnrichedBanOnVo> getEnrichedBansForUser(PerunSession sess, int userId, List<String> attrNames) throws PrivilegeException, UserNotExistsException, AttributeNotExistsException Gets all Enriched Bans for given user.- Parameters:
sess
- sessionuserId
- id of userattrNames
- List of attribute names, returns all attributes if empty or null- Returns:
- List of Enriched Bans
- Throws:
UserNotExistsException
- if user does not existPrivilegeException
AttributeNotExistsException
-