Interface VosManagerImplApi
- All Known Implementing Classes:
VosManagerImpl
public interface VosManagerImplApi
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:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMemberVo
(PerunSession sess, Vo vo, Vo memberVo) Adds new relationship between vo and a member vo.void
checkVoExists
(PerunSession perunSession, Vo vo) Check if vo exists in underlaying data source.void
createApplicationForm
(PerunSession sess, Vo vo) Creates empty application form definition for VO when VO is createdcreateVo
(PerunSession perunSession, Vo vo) Create new VO.deleteVo
(PerunSession perunSession, Vo vo) Delete VO.getAdminGroups
(PerunSession sess, Vo vo) Deprecated.getAdminGroups
(PerunSession sess, Vo vo, String role) Get list of group administrators of the given VO for specific role.getAdmins
(PerunSession sess, Vo vo) Deprecated.getAdmins
(PerunSession sess, Vo vo, String role) 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 or NULL if there is no ban.getBansForUser
(PerunSession sess, int userId) Gets all rich bans for given user.getBansForVo
(PerunSession sess, int voId) Get list of all bans for vo with given id.getDirectAdmins
(PerunSession perunSession, Vo vo) Deprecated.getDirectAdmins
(PerunSession sess, Vo vo, String role) Get list of direct user administrators of specific vo for specific role.getMemberVos
(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.getVoApplicationIds
(PerunSession sess, Vo vo) Return list of IDs of all applications, which belongs to VO.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).getVos
(PerunSession perunSession) Get list of all Vos.getVosByIds
(PerunSession perunSession, List<Integer> ids) Gets VOs by their ids.int
getVosCount
(PerunSession perunSession) Get count of all vos.boolean
hasEmbeddedGroupsItemInForm
(PerunSession sess, int voId) Returns true, if there is a vo with given id which has application form with the EMBEDDED_GROUP_APPLICATION item in it.boolean
isMemberBanned
(PerunSession sess, int memberId) Information if there is a ban for member with given id.void
removeBan
(PerunSession sess, int banId) Removes ban with given id.void
removeMemberVo
(PerunSession sess, Vo vo, Vo memberVo) Removes member vo from given vo.setBan
(PerunSession sess, BanOnVo banOnVo) Set given ban.updateBan
(PerunSession sess, BanOnVo banOnVo) Update ban information.updateVo
(PerunSession perunSession, Vo vo) Updates VO.boolean
voExists
(PerunSession perunSession, Vo vo) Check if vo exists in underlaying data source.
-
Method Details
-
addMemberVo
Adds new relationship between vo and a member vo.- Parameters:
sess
- sessionvo
- vomemberVo
- new member of the vo- Throws:
RelationExistsException
- if member vo is already member of the vo
-
checkVoExists
Check if vo exists in underlaying data source.- Parameters:
perunSession
-vo
-- Throws:
InternalErrorException
VoNotExistsException
-
createApplicationForm
Creates empty application form definition for VO when VO is created- Parameters:
sess
-vo
-- Throws:
InternalErrorException
-
createVo
Create new VO.- Parameters:
perunSession
-vo
-- Returns:
- newly created VO
- Throws:
VoExistsException
InternalErrorException
-
deleteVo
Delete VO.- Parameters:
perunSession
-vo
-- Returns:
- deleted VO
- Throws:
InternalErrorException
-
getAdminGroups
Get list of group administrators of the given VO for specific role.- Parameters:
sess
-vo
-- Returns:
- List of groups, who are administrators of the Vo with specific role. Returns empty list if there is no such authorized group.
- Throws:
InternalErrorException
-
getAdminGroups
Deprecated.Get list of group administrators of the given VO.- Parameters:
sess
-vo
-- Returns:
- List of groups, who are administrators of the Vo. Returns empty list if there is no VO group admin.
- Throws:
InternalErrorException
-
getAdmins
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.- Parameters:
sess
-vo
-role
-- Returns:
- List of users who are administrators of the vo with specific role. Empty list if there is no such administrator
- Throws:
InternalErrorException
-
getAdmins
Deprecated.Get list of Vo administrators. If some group is administrator of the VO, all members are included in the list.- Parameters:
sess
-vo
-- Returns:
- List of users, who are administrators of the Vo. Returns empty list if there is no VO admin.
- Throws:
InternalErrorException
-
getBanById
Get ban by its id.- Parameters:
sess
- sessionbanId
- ban id- Returns:
- ban object
- Throws:
BanNotExistsException
- if ban with given id is not found
-
getBanForMember
Get ban for given member or NULL if there is no ban.- Parameters:
sess
- sessionmemberId
- member id- Returns:
- ban object or NULL
-
getBansForUser
Gets all rich bans for given user.- Parameters:
sess
- sessionuserId
- user id- Returns:
-
getBansForVo
Get list of all bans for vo with given id.- Parameters:
sess
- sessionvoId
- vo id- Returns:
- list of bans for given vo
-
getDirectAdmins
Get list of direct user administrators of specific vo for specific role. 'Direct' means, there aren't included users, who are members of group administrators, in the returned list.- Parameters:
sess
-vo
-role
-- Returns:
- List of direct users who are administrators of the vo with specific role. Empty list if there is no such administrator
- Throws:
InternalErrorException
-
getDirectAdmins
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
-
getMemberVos
Gets all member organizations of the given vo.- Parameters:
sess
- sessionvoId
- vo id- Returns:
- list of member vos
-
getParentVos
Gets all organizations where given vo is direct member.- Parameters:
sess
- sessionmemberVoId
- member vo id- Returns:
- list of direct parent vos
-
getVoApplicationIds
Return list of IDs of all applications, which belongs to VO.- Parameters:
sess
-vo
-- Returns:
- list of all vo applications ids
- Throws:
InternalErrorException
-
getVoById
Finds existing VO by id.- Parameters:
perunSession
-id
- id of the VO you are looking for- Returns:
- found VO
- Throws:
VoNotExistsException
InternalErrorException
-
getVoByShortName
Find existing VO by short name (short name is unique).- Parameters:
perunSession
-shortName
-- Returns:
- vo
- Throws:
VoNotExistsException
InternalErrorException
-
getVos
Get list of all Vos.- Parameters:
perunSession
-- Returns:
- List of VOs
- Throws:
InternalErrorException
-
getVosByIds
Gets VOs by their ids. Silently skips non-existing VOs.- Parameters:
perunSession
-ids
-- Returns:
- List of VOs with specified ids
- Throws:
InternalErrorException
-
getVosCount
Get count of all vos.- Parameters:
perunSession
-- Returns:
- count of all vos
- Throws:
InternalErrorException
-
hasEmbeddedGroupsItemInForm
Returns true, if there is a vo with given id which has application form with the EMBEDDED_GROUP_APPLICATION item in it.- Parameters:
sess
- sessionvoId
- vo id- Returns:
- true, if there is a vo with given id which has application form with the EMBEDDED_GROUP_APPLICATION item in it, false otherwise
-
isMemberBanned
Information if there is a ban for member with given id.- Parameters:
sess
- sessionmemberId
- member id- Returns:
- true, if member with given id is banned, false otherwise
-
removeBan
Removes ban with given id.- Parameters:
sess
- sessionbanId
- ban id- Throws:
BanNotExistsException
- if there is no ban with given id
-
removeMemberVo
Removes member vo from given vo.- Parameters:
sess
- sessionvo
- vomemberVo
- vo to be removed- Throws:
RelationNotExistsException
- if member vo is not a member of the vo
-
setBan
Set given ban.- Parameters:
sess
- sessionbanOnVo
- ban information, memberId, voId, validity and description are needed- Returns:
- created ban object
-
updateBan
Update ban information. Only description and validity are updated.- Parameters:
sess
- sessionbanOnVo
- updated ban- Returns:
- updated ban object
-
updateVo
Updates VO.- Parameters:
perunSession
-vo
-- Returns:
- returns updated VO
- Throws:
InternalErrorException
-
voExists
Check if vo exists in underlaying data source.- Parameters:
perunSession
-vo
-- Returns:
- true if vo exists in underlaying data source, false otherwise
- Throws:
InternalErrorException
-