Package cz.metacentrum.perun.core.entry
Class VosManagerEntry
java.lang.Object
cz.metacentrum.perun.core.entry.VosManagerEntry
- All Implemented Interfaces:
VosManager
VosManager entry logic
- Author:
- Michal Prochazka michalp@ics.muni.cz, Slavek Licehammer glory@ics.muni.cz
-
Field Summary
Fields inherited from interface cz.metacentrum.perun.core.api.VosManager
MEMBERS_GROUP, MEMBERS_GROUP_DESCRIPTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdmin(PerunSession sess, Vo vo, Group group) Add a group administrator to the VO.voidaddAdmin(PerunSession sess, Vo vo, User user) Add a user administrator to the VO.voidaddMemberVo(PerunSession sess, Vo vo, Vo memberVo) Adds new relationship between vo and a member vo.voidaddSponsorRole(PerunSession sess, Vo vo, Group group) Adds role SPONSOR for group in a VO.voidaddSponsorRole(PerunSession sess, Vo vo, User user) Adds role SPONSOR for user in a VO.voidconvertSponsoredUsers(PerunSession sess, Vo vo) For the given vo, creates sponsored members for each sponsored user who is a member of the given vo.voidconvertSponsoredUsersWithNewSponsor(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 sess, Vo vo) Create new VO.voiddeleteVo(PerunSession sess, Vo vo) Delete VO.voiddeleteVo(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, 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.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.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 sess, Vo vo) Deprecated.getDirectRichAdminsWithSpecificAttributes(PerunSession sess, 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 sess, int id) Finds existing vo by and id and returns corresponding EnrichedVogetEnrichedVos(PerunSession sess) 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.Gets the perunBl for this instance.getRichAdmins(PerunSession sess, 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 sess, Vo vo) Deprecated.getRichAdminsWithSpecificAttributes(PerunSession sess, 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 Vos by Access Righs: If User is: - PERUNADMIN : get all Vos - VoAdmin : Vo where user is Admin - GroupAdmin: Vo where user is GroupAdmingetVosByIds(PerunSession sess, List<Integer> ids) Finds existing VOs by ids.intgetVosCount(PerunSession sess) Get count of all vos.voidremoveAdmin(PerunSession sess, Vo vo, Group group) Removes a group administrator from the VO.voidremoveAdmin(PerunSession sess, Vo vo, User user) Removes a user administrator from the VO.voidremoveBan(PerunSession sess, int banId) Remove vo ban with given id.voidremoveBanForMember(PerunSession sess, Member member) Remove vo ban for given member.voidremoveMemberVo(PerunSession sess, Vo vo, Vo memberVo) Removes member vo from given vo.voidremoveSponsorRole(PerunSession sess, Vo vo, Group group) Removes role SPONSOR from group in a VO.voidremoveSponsorRole(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.voidsetPerunBl(PerunBl perunBl) Sets the perunBl for this instance.voidsetVosManagerBl(VosManagerBl vosManagerBl) Sets the vosManagerBl for this instance.updateBan(PerunSession sess, BanOnVo banOnVo) Update existing ban (description, validation timestamp)updateVo(PerunSession sess, Vo vo) Updates VO.
-
Constructor Details
-
VosManagerEntry
Constructor. -
VosManagerEntry
public VosManagerEntry()
-
-
Method Details
-
addAdmin
public void addAdmin(PerunSession sess, Vo vo, User user) throws PrivilegeException, AlreadyAdminException, VoNotExistsException, UserNotExistsException, RoleCannotBeManagedException, RoleCannotBeSetException Description copied from interface:VosManagerAdd a user administrator to the VO.- Specified by:
addAdminin interfaceVosManager- Parameters:
sess-vo-user- user who will became an VO administrator- Throws:
PrivilegeExceptionAlreadyAdminExceptionVoNotExistsExceptionUserNotExistsExceptionRoleCannotBeManagedExceptionRoleCannotBeSetException
-
addAdmin
public void addAdmin(PerunSession sess, Vo vo, Group group) throws PrivilegeException, AlreadyAdminException, VoNotExistsException, GroupNotExistsException, RoleCannotBeManagedException, RoleCannotBeSetException Description copied from interface:VosManagerAdd a group administrator to the VO.- Specified by:
addAdminin interfaceVosManager- Parameters:
sess-vo-group- that will become a VO administrator- Throws:
PrivilegeExceptionAlreadyAdminExceptionVoNotExistsExceptionGroupNotExistsExceptionRoleCannotBeManagedExceptionRoleCannotBeSetException
-
addMemberVo
public void addMemberVo(PerunSession sess, Vo vo, Vo memberVo) throws RelationExistsException, PrivilegeException, VoNotExistsException Description copied from interface:VosManagerAdds 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:
addMemberVoin interfaceVosManager- 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
-
addSponsorRole
public void addSponsorRole(PerunSession sess, Vo vo, User user) throws AlreadyAdminException, VoNotExistsException, UserNotExistsException, PrivilegeException, RoleCannotBeManagedException, RoleCannotBeSetException Adds role SPONSOR for user in a VO.- Specified by:
addSponsorRolein interfaceVosManager- Parameters:
sess- perun sessionvo- virtual organizationuser- specific user in VO- Throws:
AlreadyAdminExceptionVoNotExistsExceptionUserNotExistsExceptionPrivilegeExceptionRoleCannotBeManagedExceptionRoleCannotBeSetException
-
addSponsorRole
public void addSponsorRole(PerunSession sess, Vo vo, Group group) throws AlreadyAdminException, VoNotExistsException, GroupNotExistsException, PrivilegeException, RoleCannotBeManagedException, RoleCannotBeSetException Adds role SPONSOR for group in a VO.- Specified by:
addSponsorRolein interfaceVosManager- Parameters:
sess- perun sessionvo- virtual organizationgroup- specific group in VO- Throws:
AlreadyAdminExceptionVoNotExistsExceptionGroupNotExistsExceptionPrivilegeExceptionRoleCannotBeManagedExceptionRoleCannotBeSetException
-
convertSponsoredUsers
Description copied from interface:VosManagerFor 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:
convertSponsoredUsersin interfaceVosManager- Parameters:
sess- sessionvo- vo where members will be converted- Throws:
PrivilegeException
-
convertSponsoredUsersWithNewSponsor
public void convertSponsoredUsersWithNewSponsor(PerunSession sess, Vo vo, User newSponsor) throws PrivilegeException Description copied from interface:VosManagerFor 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:
convertSponsoredUsersWithNewSponsorin interfaceVosManager- Parameters:
sess- sessionvo- vo where members will be convertednewSponsor- user, who will be set as a sponsor to the sponsored members- Throws:
PrivilegeException
-
createVo
Description copied from interface:VosManagerCreate new VO.- Specified by:
createVoin interfaceVosManager- Parameters:
sess-vo- vo object with prefilled voShortName and voName- Returns:
- newly created VO
- Throws:
VoExistsExceptionPrivilegeException
-
deleteVo
Description copied from interface:VosManagerDelete VO.- Specified by:
deleteVoin interfaceVosManager- Parameters:
sess-vo-- Throws:
VoNotExistsExceptionPrivilegeException
-
deleteVo
public void deleteVo(PerunSession sess, Vo vo, boolean forceDelete) throws VoNotExistsException, PrivilegeException Description copied from interface:VosManagerDelete VO.- Specified by:
deleteVoin interfaceVosManager- Parameters:
sess-vo-forceDelete- force the deletion of the VO, regardless there are any existing entities associated with the VO (they will be deleted)- Throws:
VoNotExistsExceptionPrivilegeException
-
findCandidates
public List<Candidate> findCandidates(PerunSession sess, Vo vo, String searchString, int maxNumOfResults) throws VoNotExistsException, PrivilegeException Description copied from interface:VosManagerFinds users, who can join the Vo.- Specified by:
findCandidatesin interfaceVosManager- 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
- Throws:
VoNotExistsExceptionPrivilegeException
-
findCandidates
public List<Candidate> findCandidates(PerunSession sess, Vo vo, String searchString) throws VoNotExistsException, PrivilegeException Description copied from interface:VosManagerFinds users, who can join the Vo.- Specified by:
findCandidatesin interfaceVosManager- 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
- Throws:
VoNotExistsExceptionPrivilegeException
-
findCandidates
public List<Candidate> findCandidates(PerunSession sess, Group group, String searchString) throws GroupNotExistsException, PrivilegeException Description copied from interface:VosManagerFinds users, who can join the group in Vo.- Specified by:
findCandidatesin interfaceVosManager- 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:
GroupNotExistsExceptionPrivilegeException
-
getAdminGroups
public List<Group> getAdminGroups(PerunSession perunSession, Vo vo, String role) throws PrivilegeException, VoNotExistsException, RoleNotSupportedException Description copied from interface:VosManagerGet list of group administrators of the given VO.Supported roles: VOOBSERVER, TOPGROUPCREATOR, VOADMIN, SPONSOR
- Specified by:
getAdminGroupsin interfaceVosManager- 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:
PrivilegeExceptionVoNotExistsExceptionRoleNotSupportedException
-
getAdminGroups
@Deprecated public List<Group> getAdminGroups(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Deprecated.Description copied from interface:VosManagerGet list of group administrators of the given VO.- Specified by:
getAdminGroupsin interfaceVosManager- Parameters:
sess-vo-- Returns:
- List of groups, who are administrators of the Vo. Returns empty list if there is no VO group admin.
- Throws:
PrivilegeExceptionVoNotExistsException
-
getAdmins
public List<User> getAdmins(PerunSession perunSession, Vo vo, String role, boolean onlyDirectAdmins) throws PrivilegeException, VoNotExistsException, RoleNotSupportedException Description copied from interface:VosManagerGet 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:
getAdminsin interfaceVosManager- 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:
PrivilegeExceptionVoNotExistsExceptionRoleNotSupportedException
-
getAdmins
@Deprecated public List<User> getAdmins(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Deprecated.Description copied from interface:VosManagerGet list of Vo administrators. If some group is administrator of the VO, all members are included in the list.- Specified by:
getAdminsin interfaceVosManager- Parameters:
sess-vo-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
- Throws:
PrivilegeExceptionVoNotExistsException
-
getAllVos
Description copied from interface:VosManagerGet list of Vos without any privilege.- Specified by:
getAllVosin interfaceVosManager- Parameters:
perunSession-- Returns:
- List of VOs or empty ArrayList
- Throws:
PrivilegeException
-
getBanById
public BanOnVo getBanById(PerunSession sess, int banId) throws BanNotExistsException, PrivilegeException Description copied from interface:VosManagerGet vo ban with given id.- Specified by:
getBanByIdin interfaceVosManager- Parameters:
sess- sessionbanId- ban id- Returns:
- found ban
- Throws:
BanNotExistsException- if there is no such banPrivilegeException- insufficient permissions
-
getBanForMember
public BanOnVo getBanForMember(PerunSession sess, Member member) throws PrivilegeException, MemberNotExistsException Description copied from interface:VosManagerGet ban for given member, or null if he is not banned.- Specified by:
getBanForMemberin interfaceVosManager- 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
public List<BanOnVo> getBansForVo(PerunSession sess, int voId) throws PrivilegeException, VoNotExistsException Description copied from interface:VosManagerGet list of all bans for vo with given id.- Specified by:
getBansForVoin interfaceVosManager- Parameters:
sess- sessionvoId- vo id- Returns:
- vo bans for given vo
- Throws:
PrivilegeException- insufficient permissionsVoNotExistsException- if there is no vo with given id
-
getCompleteCandidates
public List<MemberCandidate> getCompleteCandidates(PerunSession sess, Vo vo, List<String> attrNames, String searchString) throws VoNotExistsException, PrivilegeException Description copied from interface:VosManagerFinds MemberCandidates who can join the Vo.- Specified by:
getCompleteCandidatesin interfaceVosManager- 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:
VoNotExistsException- when vo does not existPrivilegeException- privilege exception
-
getCompleteCandidates
public List<MemberCandidate> getCompleteCandidates(PerunSession sess, Group group, List<String> attrNames, String searchString) throws GroupNotExistsException, PrivilegeException Description copied from interface:VosManagerFinds MemberCandidates who can join the Group.- Specified by:
getCompleteCandidatesin interfaceVosManager- 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:
GroupNotExistsException- when group does not existPrivilegeException- privilege exception
-
getDirectAdmins
@Deprecated public List<User> getDirectAdmins(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Deprecated.Description copied from interface:VosManagerGets 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:
getDirectAdminsin interfaceVosManager- Parameters:
sess-vo-- Throws:
PrivilegeExceptionVoNotExistsException
-
getDirectRichAdminsWithSpecificAttributes
@Deprecated public List<RichUser> getDirectRichAdminsWithSpecificAttributes(PerunSession sess, Vo vo, List<String> specificAttributes) throws PrivilegeException, VoNotExistsException Deprecated.Description copied from interface:VosManagerGet 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:
getDirectRichAdminsWithSpecificAttributesin interfaceVosManager- Parameters:
sess-vo-specificAttributes-- Returns:
- list of RichUsers with specific attributes.
- Throws:
PrivilegeExceptionVoNotExistsException
-
getEnrichedBansForUser
public List<EnrichedBanOnVo> getEnrichedBansForUser(PerunSession sess, int userId, List<String> attrNames) throws PrivilegeException, UserNotExistsException, AttributeNotExistsException Description copied from interface:VosManagerGets all Enriched Bans for given user.- Specified by:
getEnrichedBansForUserin interfaceVosManager- 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 existPrivilegeExceptionAttributeNotExistsException
-
getEnrichedBansForVo
public List<EnrichedBanOnVo> getEnrichedBansForVo(PerunSession sess, int voId, List<String> attrNames) throws PrivilegeException, AttributeNotExistsException, VoNotExistsException Description copied from interface:VosManagerGets all Enriched Bans for given vo. Attr names specify which attributes should be included in RichMember.- Specified by:
getEnrichedBansForVoin interfaceVosManager- Parameters:
sess- sessionvoId- id of voattrNames- List of attribute names, returns all attributes if empty or null- Returns:
- List of Enriched Bans
- Throws:
PrivilegeExceptionAttributeNotExistsExceptionVoNotExistsException
-
getEnrichedVoById
public EnrichedVo getEnrichedVoById(PerunSession sess, int id) throws VoNotExistsException, PrivilegeException Description copied from interface:VosManagerFinds existing vo by and id and returns corresponding EnrichedVo- Specified by:
getEnrichedVoByIdin interfaceVosManager- Parameters:
sess-id-- Returns:
- EnrichedVO object of requested VO, which contains its member and parent VOs
- Throws:
VoNotExistsExceptionPrivilegeException
-
getEnrichedVos
Description copied from interface:VosManagerGet list of EnrichedVos of all the VOs the user has access to- Specified by:
getEnrichedVosin interfaceVosManager- Parameters:
sess-- Returns:
- List of EnrichedVos or empty list
- Throws:
PrivilegeException
-
getMemberVos
public List<Vo> getMemberVos(PerunSession sess, int voId) throws PrivilegeException, VoNotExistsException Description copied from interface:VosManagerGets all member organizations of the given vo.- Specified by:
getMemberVosin interfaceVosManager- Parameters:
sess- sessionvoId- vo id- Returns:
- list of member vos
- Throws:
PrivilegeException- if not authorizedVoNotExistsException- if given vo does not exist
-
getParentVos
public List<Vo> getParentVos(PerunSession sess, int memberVoId) throws PrivilegeException, VoNotExistsException Description copied from interface:VosManagerGets all organizations where given vo is direct member.- Specified by:
getParentVosin interfaceVosManager- Parameters:
sess- sessionmemberVoId- member vo id- Returns:
- list of direct parent vos
- Throws:
PrivilegeException- if not authorizedVoNotExistsException- if given member vo does not exist
-
getPerunBl
Gets the perunBl for this instance.- Returns:
- The perunBl.
-
getRichAdmins
public List<RichUser> getRichAdmins(PerunSession perunSession, Vo vo, String role, List<String> specificAttributes, boolean allUserAttributes, boolean onlyDirectAdmins) throws PrivilegeException, VoNotExistsException, UserNotExistsException, RoleNotSupportedException Description copied from interface:VosManagerGet 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.
- Specified by:
getRichAdminsin interfaceVosManager- 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:
PrivilegeExceptionVoNotExistsExceptionUserNotExistsExceptionRoleNotSupportedException
-
getRichAdmins
@Deprecated public List<RichUser> getRichAdmins(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Deprecated.Description copied from interface:VosManagerGet list of Vo administrators like RichUsers without attributes.- Specified by:
getRichAdminsin interfaceVosManager- Parameters:
sess-vo-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
- Throws:
PrivilegeExceptionVoNotExistsException
-
getRichAdminsWithAttributes
@Deprecated public List<RichUser> getRichAdminsWithAttributes(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException, UserNotExistsException Deprecated.Description copied from interface:VosManagerGet list of Vo administrators like RichUsers with attributes.- Specified by:
getRichAdminsWithAttributesin interfaceVosManager- Parameters:
sess-vo-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
- Throws:
PrivilegeExceptionVoNotExistsExceptionUserNotExistsException
-
getRichAdminsWithSpecificAttributes
@Deprecated public List<RichUser> getRichAdminsWithSpecificAttributes(PerunSession sess, Vo vo, List<String> specificAttributes) throws PrivilegeException, VoNotExistsException Deprecated.Description copied from interface:VosManagerGet 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:
getRichAdminsWithSpecificAttributesin interfaceVosManager- Parameters:
sess-vo-specificAttributes-- Returns:
- list of RichUsers with specific attributes.
- Throws:
PrivilegeExceptionVoNotExistsException
-
getVoById
Description copied from interface:VosManagerFinds existing VO by id.- Specified by:
getVoByIdin interfaceVosManager- Parameters:
sess-id-- Returns:
- VO with requested id or throws VoNotExistsException if the VO with specified id doesn't exist
- Throws:
VoNotExistsExceptionPrivilegeException
-
getVoByShortName
public Vo getVoByShortName(PerunSession sess, String shortName) throws VoNotExistsException, PrivilegeException Description copied from interface:VosManagerFind existing VO by short name (short name is unique).- Specified by:
getVoByShortNamein interfaceVosManager- Parameters:
sess-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:
VoNotExistsExceptionPrivilegeException
-
getVoMembersCountsByStatus
public Map<Status,Integer> getVoMembersCountsByStatus(PerunSession sess, Vo vo) throws VoNotExistsException, PrivilegeException Description copied from interface:VosManagerReturns number of vo members by their status.- Specified by:
getVoMembersCountsByStatusin interfaceVosManager- 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
-
getVos
Description copied from interface:VosManagerGet 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- Specified by:
getVosin interfaceVosManager- Parameters:
sess-- Returns:
- List of VOs or empty ArrayList
- Throws:
PrivilegeException
-
getVosByIds
Description copied from interface:VosManagerFinds existing VOs by ids.- Specified by:
getVosByIdsin interfaceVosManager- Parameters:
sess-ids-- Returns:
- VOs with requested ids
- Throws:
PrivilegeException
-
getVosCount
Description copied from interface:VosManagerGet count of all vos.- Specified by:
getVosCountin interfaceVosManager- Parameters:
sess- PerunSession- Returns:
- count of all vos
-
removeAdmin
public void removeAdmin(PerunSession sess, Vo vo, User user) throws PrivilegeException, VoNotExistsException, UserNotAdminException, UserNotExistsException, RoleCannotBeManagedException Description copied from interface:VosManagerRemoves a user administrator from the VO.- Specified by:
removeAdminin interfaceVosManager- Parameters:
sess-vo-user- user who will lose an VO administrator role- Throws:
PrivilegeExceptionVoNotExistsExceptionUserNotAdminExceptionUserNotExistsExceptionRoleCannotBeManagedException
-
removeAdmin
public void removeAdmin(PerunSession sess, Vo vo, Group group) throws PrivilegeException, VoNotExistsException, GroupNotAdminException, GroupNotExistsException, RoleCannotBeManagedException Description copied from interface:VosManagerRemoves a group administrator from the VO.- Specified by:
removeAdminin interfaceVosManager- Parameters:
sess-vo-group- group that will lose a VO administrator role- Throws:
PrivilegeExceptionVoNotExistsExceptionGroupNotAdminExceptionGroupNotExistsExceptionRoleCannotBeManagedException
-
removeBan
public void removeBan(PerunSession sess, int banId) throws PrivilegeException, BanNotExistsException Description copied from interface:VosManagerRemove vo ban with given id.- Specified by:
removeBanin interfaceVosManager- Parameters:
sess- sessionbanId- if of vo ban- Throws:
PrivilegeException- insufficient permissionsBanNotExistsException- if there is no ban with specified id
-
removeBanForMember
public void removeBanForMember(PerunSession sess, Member member) throws PrivilegeException, BanNotExistsException, MemberNotExistsException Description copied from interface:VosManagerRemove vo ban for given member.- Specified by:
removeBanForMemberin interfaceVosManager- Parameters:
sess- sessionmember- member- Throws:
PrivilegeException- insufficient permissionsBanNotExistsException- if there is no ban for member with given idMemberNotExistsException- if there is no such member
-
removeMemberVo
public void removeMemberVo(PerunSession sess, Vo vo, Vo memberVo) throws RelationNotExistsException, PrivilegeException, VoNotExistsException Description copied from interface:VosManagerRemoves member vo from given vo. Updates memberOrganizations list attribute for those members of parent vo who came from the member vo.- Specified by:
removeMemberVoin interfaceVosManager- 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
-
removeSponsorRole
public void removeSponsorRole(PerunSession sess, Vo vo, User user) throws UserNotAdminException, VoNotExistsException, UserNotExistsException, PrivilegeException, RoleCannotBeManagedException Removes role SPONSOR from user in a VO.- Specified by:
removeSponsorRolein interfaceVosManager- Parameters:
sess- perun sessionvo- virtual organizationuser- user in VO for removal of sponsor role- Throws:
UserNotAdminExceptionVoNotExistsExceptionUserNotExistsExceptionPrivilegeExceptionRoleCannotBeManagedException
-
removeSponsorRole
public void removeSponsorRole(PerunSession sess, Vo vo, Group group) throws GroupNotAdminException, VoNotExistsException, GroupNotExistsException, PrivilegeException, RoleCannotBeManagedException Removes role SPONSOR from group in a VO.- Specified by:
removeSponsorRolein interfaceVosManager- Parameters:
sess- perun sessionvo- virtual organizationgroup- group in VO for removal of sponsor role- Throws:
GroupNotAdminExceptionVoNotExistsExceptionGroupNotExistsExceptionPrivilegeExceptionRoleCannotBeManagedException
-
setBan
public BanOnVo setBan(PerunSession sess, BanOnVo ban) throws PrivilegeException, MemberNotExistsException, BanAlreadyExistsException Description copied from interface:VosManagerSet ban for member on his vo.- Specified by:
setBanin interfaceVosManager- Parameters:
sess- sessionban- ban information- Returns:
- created ban object
- Throws:
PrivilegeException- insufficient permissionsMemberNotExistsException- if there is no member with specified idBanAlreadyExistsException
-
setPerunBl
Sets the perunBl for this instance.- Parameters:
perunBl- The perunBl.
-
setVosManagerBl
Sets the vosManagerBl for this instance.- Parameters:
vosManagerBl- The vosManagerBl.
-
updateBan
public BanOnVo updateBan(PerunSession sess, BanOnVo banOnVo) throws PrivilegeException, BanNotExistsException, VoNotExistsException Description copied from interface:VosManagerUpdate existing ban (description, validation timestamp)- Specified by:
updateBanin interfaceVosManager- Parameters:
sess-banOnVo- the specific ban- Returns:
- updated ban
- Throws:
PrivilegeExceptionBanNotExistsExceptionVoNotExistsException
-
updateVo
Description copied from interface:VosManagerUpdates VO.- Specified by:
updateVoin interfaceVosManager- Parameters:
sess-vo-- Returns:
- returns updated VO
- Throws:
VoNotExistsExceptionPrivilegeException
-