Class MembersManagerEntry
- All Implemented Interfaces:
MembersManager
- Author:
- Slavek Licehammer glory@ics.muni.cz
-
Field Summary
Fields inherited from interface cz.metacentrum.perun.core.api.MembersManager
MEMBERSHIP_EXPIRATION_ATTRIBUTE_NAME, MEMBERSHIP_EXPIRATION_RULES_ATTRIBUTE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMemberCandidates(PerunSession sess, Vo vo, List<MemberCandidate> candidates) Add member candidates.voidaddMemberCandidates(PerunSession sess, Vo vo, List<MemberCandidate> candidates, Group group) Add member candidates to Group.booleancanBeMember(PerunSession sess, Vo vo, User user, String loa) Checks if the user can apply membership to the VO, it decides based on extendMembershipRules on the doNotAllowLoa keybooleancanBeMemberWithReason(PerunSession sess, Vo vo, User user, String loa) Checks if the user can apply membership to the VO, it decides based on extendMembershipRules on the doNotAllowLoa keybooleancanExtendMembership(PerunSession sess, Member member) Return true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false.booleancanExtendMembershipWithReason(PerunSession sess, Member member) Return true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise throws exception.voidcopySponsoredMembers(PerunSession session, List<Member> sponsored, User copyFrom, User copyTo, boolean copyValidity, LocalDate validityTo) Set another user (copyTo) as sponsor of sponsored members of user (copyFrom).createMember(PerunSession sess, Vo vo, Candidate candidate) Creates a new member from candidate returned by the method VosManager.findCandidates which fills Candidate .userExtSource.createMember(PerunSession sess, Vo vo, Candidate candidate, List<Group> groups) Creates a new member from candidate returned by the method VosManager.findCandidates which fills Candidate .userExtSource.createMember(PerunSession sess, Vo vo, ExtSource extSource, String login) Create new member from user by login and ExtSource.createMember(PerunSession sess, Vo vo, ExtSource extSource, String login, List<Group> groups) Create new member from user by login and ExtSource.createMember(PerunSession sess, Vo vo, User user) Creates a new member from user.createMember(PerunSession sess, Vo vo, User user, List<Group> groups) Creates a new member from user.createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, int extSourceLoa, String login, Candidate candidate) Creates a new member and sets all member's attributes from the candidate.createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, int extSourceLoa, String login, Candidate candidate, List<Group> groups) Creates a new member and sets all member's attributes from the candidate.createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, String login, Candidate candidate) Creates a new member and sets all member's attributes from the candidate.createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, String login, Candidate candidate, List<Group> groups) Creates a new member and sets all member's attributes from the candidate.createSpecificMember(PerunSession sess, Vo vo, Candidate candidate, List<User> specificUserOwners, SpecificUserType specificUserType) Creates a new member from candidate which is prepared for creating specific User In list specificUserOwners can't be specific user, only normal users and sponsored users are allowed.createSpecificMember(PerunSession sess, Vo vo, Candidate candidate, List<User> specificUserOwners, SpecificUserType specificUserType, List<Group> groups) Creates a new member from candidate which is prepared for creating specificUser In list specificUserOwners can't be specific user, only normal users and sponsored users are allowed.createSponsoredMember(PerunSession session, SponsoredUserData data, Vo vo, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url) Creates a new sponsored Member and its User.createSponsoredMembers(PerunSession session, Vo vo, String namespace, List<String> names, String email, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url) Creates new sponsored Members (with random generated passwords).createSponsoredMembersFromCSV(PerunSession sess, Vo vo, String namespace, List<String> data, String header, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url, List<Group> groups) Creates new sponsored members using input from CSV file.voiddeleteAllMembers(PerunSession sess, Vo vo) Deletes all VO members.voiddeleteMember(PerunSession sess, Member member) Deletes only member data appropriated by member id.voiddeleteMembers(PerunSession sess, List<Member> members) Delete given members.extendExpirationForSponsoredMember(PerunSession sess, Member sponsoredMember, User sponsorUser) Extends expiration date.voidextendMembership(PerunSession sess, Member member) Extend member membership using membershipExpirationRules attribute defined at VO.findCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, String searchString, boolean lookingInParentGroup) Return list of richMembers for specific group by the searchString with attrs specific for list of attrsNames.findCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, List<String> allowedStatuses, List<String> allowedGroupStatuses, String searchString, boolean lookingInParentGroup) Return list of richMembers for specific group by the searchString with attrs specific for list of attrsNames and who have only status which is contain in lists of statuses.findCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames, String searchString, boolean onlySponsored) Return list of richMembers for specific vo by the searchString with attrs specific for list of attrsNames.findCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames, List<String> allowedStatuses, String searchString) Return list of richMembers for specific vo by the searchString with attrs specific for list of attrsNames and who have only status which is contain in list of statuses.findCompleteRichMembers(PerunSession sess, List<String> attrsNames, List<String> allowedStatuses, String searchString) Return list of richMembers from Perun by searchString with attrs specific for list of attrsNames and who have only status which is contain in list of statuses.findMembersByName(PerunSession sess, String searchString) Return list of members by the searchStringfindMembersByNameInVo(PerunSession sess, Vo vo, String searchString) Return list of members by the searchString under defined VO.findMembersInGroup(PerunSession sess, Group group, String searchString) Return list of members by the searchString under defined Group.findMembersInParentGroup(PerunSession sess, Group group, String searchString) Return list of members by the searchString udner parentGroup of defined Group.findMembersInVo(PerunSession sess, Vo vo, String searchString) Return list of members by the searchString under defined VO.findRichMembersInVo(PerunSession sess, Vo vo, String searchString) Return list of rich members by the searchString under defined VO.findRichMembersWithAttributesInGroup(PerunSession sess, Group group, String searchString) Return list of rich members with attributes by the searchString under defined Group.findRichMembersWithAttributesInParentGroup(PerunSession sess, Group group, String searchString) Return list of rich with attributes members by the searchString under parent group of defined Group.findRichMembersWithAttributesInVo(PerunSession sess, Vo vo, String searchString) Return list of rich members with attributes by the searchString under defined VO.getAllMembers(PerunSession sess) Get all members from all vos.Return all loaded namespaces rules.getAllSponsoredMembers(PerunSession sess, Vo vo) Gets list of all sponsored members of a VO.getAllSponsoredMembersAndTheirSponsors(PerunSession sess, Vo vo, List<String> attrNames) Gets list of VO's all sponsored members with sponsors.getAvailableSponsorsForMember(PerunSession sess, Member member) Returns all available sponsors for given member.getCompleteRichMembers(PerunSession sess, Group group, Resource resource, List<String> attrsNames, List<String> allowedStatuses) Get all RichMembers with attributes specific for list of attrNames.getCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, boolean lookingInParentGroup) Get all RichMembers with attrs specific for list of attrsNames from the group.getCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, List<String> allowedStatuses, List<String> allowedGroupStatuses, boolean lookingInParentGroup) Get all RichMembers with attrs specific for list of attrsNames from the group and have only status which is contain in lists of statuses.getCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames) Get all RichMembers with attrs specific for list of attrsNames from the vo.getCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames, List<String> allowedStatuses) Get all RichMembers with attrs specific for list of attrsNames from the vo and have only status which is contain in list of statuses.getMemberByExtSourceNameAndExtLogin(PerunSession sess, Vo vo, String extSourceName, String extLogin) Get member by extSourceName, extSourceLogin and VogetMemberById(PerunSession sess, int id) Returns member by his id.getMemberByUser(PerunSession sess, Vo vo, User user) Returns member by his user and vo.getMemberByUserExtSource(PerunSession sess, Vo vo, UserExtSource uea) Find member of this Vo by his login in external sourcegetMembers(PerunSession sess, Vo vo) Get all VO members.getMembers(PerunSession sess, Vo vo, Status status) Get all VO members who have the status.getMembersByIds(PerunSession sess, List<Integer> ids) Returns members by their ids.getMembersByUser(PerunSession sess, User user) Returns members by his user.intgetMembersCount(PerunSession sess, Vo vo) Get the VO members count.intgetMembersCount(PerunSession sess, Vo vo, Status status) Get the VO members count with defined status.Gets the membersManagerBl for this instance.getMembersPage(PerunSession sess, Vo vo, MembersPageQuery query, List<String> attrNames) Get page of members from the given vo, with the given attributes.getMembersPage(PerunSession sess, Vo vo, MembersPageQuery query, List<String> attrNames, String policy) Get page of members from the given vo, with the given attributes, based on policy.getMemberVo(PerunSession sess, Member member) Get the member VO.getNewExtendMembership(PerunSession sess, Member member) Returns the date to which will be extended member's expiration time.getNewExtendMembership(PerunSession sess, Vo vo, String loa) Returns the date to which will be extended member's expiration time.getRichMemberById(PerunSession sess, int id) Get richMember without attribute by id of membergetRichMembers(PerunSession sess, Group group) Get all rich members of Group.getRichMembers(PerunSession sess, Vo vo) Get all rich members of VO.getRichMembers(PerunSession sess, Vo vo, Status status) Get all rich members of VO with specified status.getRichMembersByIds(PerunSession sess, List<Integer> ids, List<String> attrNames) Returns rich members by their IDs with specific attributes.getRichMembersNoUserAttributes(PerunSession sess, Vo vo) Get all rich members of VO.getRichMembersWithAttributes(PerunSession sess, Group group, List<AttributeDefinition> attrsDef) Get RichMembers with Attributes but only with selected attributes from list attrsDef for group.getRichMembersWithAttributes(PerunSession sess, Vo vo) Get all rich members of VO.getRichMembersWithAttributes(PerunSession sess, Vo vo, Status status) Get all rich members of VO with specified status.getRichMembersWithAttributes(PerunSession sess, Vo vo, List<AttributeDefinition> attrsDef) Get RichMembers with Attributes but only with selected attributes from list attrsDef for vo.getRichMembersWithAttributes(PerunSession sess, List<String> allowedStatuses, Group group) Get all rich members with allowed statuses from specific group.getRichMembersWithAttributesByNames(PerunSession sess, Group group, List<String> attrsNames) Get RichMembers with Attributes but only with selected attributes from list attrsDef for group.getRichMembersWithAttributesByNames(PerunSession sess, Vo vo, List<String> attrsNames) Get RichMembers with Attributes but only with selected attributes from list attrsDef for vo.getRichMemberWithAttributes(PerunSession sess, Member member) Get Member to RichMember with attributes.getServiceUserRichMembers(PerunSession sess, Vo vo) Get RichMembers from a VO who are service users.getSponsoredMembers(PerunSession sess, Vo vo) Gets list of sponsored members of a VO.getSponsoredMembers(PerunSession sess, Vo vo, User user) Gets list of members of a VO sponsored by the given user.getSponsoredMembers(PerunSession sess, Vo vo, User user, List<String> attrNames) Get all sponsored RichMembers with attributes by list of attribute names for specific User and Vo.getSponsoredMembersAndTheirSponsors(PerunSession sess, Vo vo, List<String> attrNames) Gets list of sponsored members with sponsors.voidmoveMembership(PerunSession sess, Vo vo, User sourceUser, User targetUser) Moves membership in VO from source user to target user - moves the source user's memberships in non-synchronized groups, member related attributes, bans and sponsorships in the VO.voidremoveSponsor(PerunSession sess, Member sponsoredMember, User sponsorToRemove) Removes the sponsor.voidremoveSponsors(PerunSession sess, Member sponsoredMember, List<User> sponsorsToRemove) Removes the sponsors from member.voidsendAccountActivationLinkEmail(PerunSession sess, Member member, String namespace, String url, String mailAttributeUrn, String language) Send mail to user's preferred email address with link for non-authz account activation.voidsendPasswordResetLinkEmail(PerunSession sess, Member member, String namespace, String url, String mailAttributeUrn, String language) Send mail to user's preferred email address with link for non-authz password reset.voidsendUsernameReminderEmail(PerunSession sess, Member member, String namespace, String mailAttributeUrn, String language) Send mail to user's preferred email address with reminder of the username in the given namespace.voidsetMembersManagerBl(MembersManagerBl membersManagerBl) Sets the membersManagerBl for this instance.voidsetPerunBl(PerunBl perunBl) Sets the perunBl for this instance.setSponsoredMember(PerunSession session, Vo vo, User userToBeSponsored, String namespace, String password, String login, User sponsor, LocalDate validityTo) Creates a sponsored membership for the given user.setSponsorshipForMember(PerunSession session, Member sponsoredMember, User sponsor, LocalDate validityTo) Transform non-sponsored member to sponsored one with defined sponsorsetStatus(PerunSession sess, Member member, Status status) Set status of the member to specified status.booleansomeAvailableSponsorExistsForMember(PerunSession sess, Member member) Checks if some vo sponsor who does not already sponsor given member exists.sponsorMember(PerunSession session, Member sponsored, User sponsor, LocalDate validityTo) Assigns a new sponsor to an existing member.voidsponsorMembers(PerunSession session, List<Member> sponsored, User sponsor, LocalDate validityTo) Assigns a new sponsor to existing members.voidsuspendMemberTo(PerunSession sess, Member member, Date suspendedTo) Set date to which will be member suspended in his VO.unsetSponsorshipForMember(PerunSession session, Member sponsoredMember) Transform sponsored member to non-sponsored one.voidunsuspendMember(PerunSession sess, Member member) Remove suspend state from Member - remove date to which member should be considered as suspended in the VO.voidupdateSponsorshipValidity(PerunSession sess, Member sponsoredMember, User sponsor, LocalDate newValidity) Update the sponsorship of given member for given sponsor.validateMemberAsync(PerunSession sess, Member member) Validate all attributes for member and set member's status to VALID.
-
Constructor Details
-
MembersManagerEntry
Constructor. -
MembersManagerEntry
public MembersManagerEntry()
-
-
Method Details
-
addMemberCandidates
public void addMemberCandidates(PerunSession sess, Vo vo, List<MemberCandidate> candidates) throws PrivilegeException, GroupNotExistsException, UserNotExistsException, WrongReferenceAttributeValueException, AlreadyMemberException, WrongAttributeValueException, ExtendMembershipException, VoNotExistsException Description copied from interface:MembersManagerAdd member candidates.- Specified by:
addMemberCandidatesin interfaceMembersManager- Parameters:
sess- Perun sessionvo- vocandidates- Listlist of member candidates - Throws:
PrivilegeException- insufficient permissionsGroupNotExistsException- group does not existUserNotExistsException- user does not existWrongReferenceAttributeValueException- attribute value is illegalAlreadyMemberException- candidate is already memberWrongAttributeValueException- attribute value is illegalExtendMembershipException- reason why user can't extend membershipVoNotExistsException- vo does not exist
-
addMemberCandidates
public void addMemberCandidates(PerunSession sess, Vo vo, List<MemberCandidate> candidates, Group group) throws PrivilegeException, ExternallyManagedException, MemberNotExistsException, GroupNotExistsException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException, AttributeNotExistsException, AlreadyMemberException, WrongAttributeValueException, UserNotExistsException, ExtendMembershipException, VoNotExistsException Description copied from interface:MembersManagerAdd member candidates to Group.- Specified by:
addMemberCandidatesin interfaceMembersManager- Parameters:
sess- Perun sessionvo- vocandidates- Listlist of member candidates group- group- Throws:
PrivilegeException- insufficient permissionsExternallyManagedException- group is externally managedMemberNotExistsException- member does not existGroupNotExistsException- group does not existWrongReferenceAttributeValueException- attribute value is illegalWrongAttributeAssignmentException- attribute does not belong to appropriate entityAttributeNotExistsException- attribute does not existAlreadyMemberException- candidate is already memberWrongAttributeValueException- attribute value is illegalUserNotExistsException- user does not existExtendMembershipException- reason why user can't extend membershipVoNotExistsException- vo does not exist
-
canBeMember
public boolean canBeMember(PerunSession sess, Vo vo, User user, String loa) throws VoNotExistsException, PrivilegeException Description copied from interface:MembersManagerChecks if the user can apply membership to the VO, it decides based on extendMembershipRules on the doNotAllowLoa key- Specified by:
canBeMemberin interfaceMembersManager- Parameters:
sess-vo-user-loa-- Returns:
- true if user can be apply for membership to the VO
- Throws:
VoNotExistsExceptionPrivilegeException
-
canBeMemberWithReason
public boolean canBeMemberWithReason(PerunSession sess, Vo vo, User user, String loa) throws VoNotExistsException, ExtendMembershipException, PrivilegeException Description copied from interface:MembersManagerChecks if the user can apply membership to the VO, it decides based on extendMembershipRules on the doNotAllowLoa key- Specified by:
canBeMemberWithReasonin interfaceMembersManager- Parameters:
sess-vo-user-loa-- Returns:
- true if user can be apply for membership to the VO
- Throws:
VoNotExistsExceptionExtendMembershipExceptionPrivilegeException
-
canExtendMembership
public boolean canExtendMembership(PerunSession sess, Member member) throws PrivilegeException, MemberNotExistsException Description copied from interface:MembersManagerReturn true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false.- Specified by:
canExtendMembershipin interfaceMembersManager- Parameters:
sess-member-- Returns:
- true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false.
- Throws:
PrivilegeExceptionMemberNotExistsException
-
canExtendMembershipWithReason
public boolean canExtendMembershipWithReason(PerunSession sess, Member member) throws PrivilegeException, MemberNotExistsException, ExtendMembershipException Description copied from interface:MembersManagerReturn true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise throws exception.- Specified by:
canExtendMembershipWithReasonin interfaceMembersManager- Parameters:
sess-member-- Returns:
- true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false
- Throws:
PrivilegeExceptionMemberNotExistsExceptionExtendMembershipException
-
copySponsoredMembers
public void copySponsoredMembers(PerunSession session, List<Member> sponsored, User copyFrom, User copyTo, boolean copyValidity, LocalDate validityTo) throws SponsorshipDoesNotExistException, UserNotInRoleException, PrivilegeException, MemberNotSponsoredException Description copied from interface:MembersManagerSet another user (copyTo) as sponsor of sponsored members of user (copyFrom). If the copyValidity flag is set to true, also set the validity to the same value as the existing sponsorship. Otherwise set validity to the value of validityTo (set to never if null).- Specified by:
copySponsoredMembersin interfaceMembersManager- Parameters:
session-sponsored- members to add new sponsor tocopyFrom- already existing sponsor of the memberscopyTo- new user to sponsor the memberscopyValidity- whether to copy validityvalidityTo- last day when the sponsorship is active (null means the sponsorship will last forever)- Throws:
SponsorshipDoesNotExistExceptionUserNotInRoleExceptionPrivilegeExceptionMemberNotSponsoredException
-
createMember
public Member createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, String login, Candidate candidate) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, PrivilegeException, ExtendMembershipException, GroupNotExistsException Description copied from interface:MembersManagerCreates a new member and sets all member's attributes from the candidate. Also stores the associated user if doesn't exist. This method is used by the registrar. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).- Specified by:
createMemberin interfaceMembersManager- Parameters:
sess-vo-extSourceName- name of the extSourceextSourceType- type of the extSource (e.g. cz.metacentrum.perun.core.impl.ExtSourceIdp)login- user's login within extSourcecandidate-- Returns:
- newly created member, who has set all his/her attributes
- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueExceptionAlreadyMemberExceptionPrivilegeExceptionExtendMembershipExceptionGroupNotExistsException
-
createMember
public Member createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, String login, Candidate candidate, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, PrivilegeException, ExtendMembershipException, GroupNotExistsException Description copied from interface:MembersManagerCreates a new member and sets all member's attributes from the candidate. Also stores the associated user if doesn't exist. This method is used by the registrar.Also add this member to groups in list. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).
- Specified by:
createMemberin interfaceMembersManager- Parameters:
sess-vo-extSourceName- name of the extSourceextSourceType- type of the extSource (e.g. cz.metacentrum.perun.core.impl.ExtSourceIdp)login- user's login within extSourcecandidate-groups- list of groups where member will be added too- Returns:
- newly created member, who has set all his/her attributes
- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueExceptionAlreadyMemberExceptionPrivilegeExceptionExtendMembershipExceptionGroupNotExistsException
-
createMember
public Member createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, int extSourceLoa, String login, Candidate candidate) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, PrivilegeException, ExtendMembershipException, GroupNotExistsException Description copied from interface:MembersManagerCreates a new member and sets all member's attributes from the candidate. Also stores the associated user if doesn't exist. This method is used by the registrar. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).- Specified by:
createMemberin interfaceMembersManager- Parameters:
sess-vo-extSourceName- name of the extSourceextSourceType- type of the extSource (e.g. cz.metacentrum.perun.core.impl.ExtSourceIdp)extSourceLoa- level of assurancelogin- user's login within extSourcecandidate-- Returns:
- newly created member, who has set all his/her attributes
- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueExceptionAlreadyMemberExceptionPrivilegeExceptionExtendMembershipExceptionGroupNotExistsException
-
createMember
public Member createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, int extSourceLoa, String login, Candidate candidate, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, PrivilegeException, ExtendMembershipException, GroupNotExistsException Description copied from interface:MembersManagerCreates a new member and sets all member's attributes from the candidate. Also stores the associated user if doesn't exist. This method is used by the registrar.Also add this member to groups in list. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).
- Specified by:
createMemberin interfaceMembersManager- Parameters:
sess-vo-extSourceName- name of the extSourceextSourceType- type of the extSource (e.g. cz.metacentrum.perun.core.impl.ExtSourceIdp)extSourceLoa- level of assurancelogin- user's login within extSourcecandidate-groups- list of groups where member will be added too- Returns:
- newly created member, who has set all his/her attributes
- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueExceptionAlreadyMemberExceptionPrivilegeExceptionExtendMembershipExceptionGroupNotExistsException
-
createMember
public Member createMember(PerunSession sess, Vo vo, Candidate candidate) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, VoNotExistsException, PrivilegeException, ExtendMembershipException, GroupNotExistsException Description copied from interface:MembersManagerCreates a new member from candidate returned by the method VosManager.findCandidates which fills Candidate .userExtSource. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).- Specified by:
createMemberin interfaceMembersManager- Parameters:
sess-vo-candidate-- Returns:
- newly created members
- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueExceptionAlreadyMemberExceptionVoNotExistsExceptionPrivilegeExceptionExtendMembershipExceptionGroupNotExistsException
-
createMember
public Member createMember(PerunSession sess, Vo vo, Candidate candidate, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, VoNotExistsException, PrivilegeException, ExtendMembershipException, GroupNotExistsException Description copied from interface:MembersManagerCreates a new member from candidate returned by the method VosManager.findCandidates which fills Candidate .userExtSource.Also add this member to groups in list. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).
- Specified by:
createMemberin interfaceMembersManager- Parameters:
sess-vo-candidate-groups- list of groups where member will be added too- Returns:
- newly created members
- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueExceptionAlreadyMemberExceptionVoNotExistsExceptionPrivilegeExceptionExtendMembershipExceptionGroupNotExistsException
-
createMember
public Member createMember(PerunSession sess, Vo vo, User user) throws AlreadyMemberException, WrongAttributeValueException, WrongReferenceAttributeValueException, VoNotExistsException, UserNotExistsException, PrivilegeException, ExtendMembershipException, GroupNotExistsException Description copied from interface:MembersManagerCreates a new member from user. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).- Specified by:
createMemberin interfaceMembersManager- Parameters:
sess-vo-user-- Returns:
- newly created member
- Throws:
AlreadyMemberExceptionWrongAttributeValueExceptionWrongReferenceAttributeValueExceptionVoNotExistsExceptionUserNotExistsExceptionPrivilegeExceptionExtendMembershipExceptionGroupNotExistsException
-
createMember
public Member createMember(PerunSession sess, Vo vo, User user, List<Group> groups) throws AlreadyMemberException, WrongAttributeValueException, WrongReferenceAttributeValueException, VoNotExistsException, UserNotExistsException, PrivilegeException, ExtendMembershipException, GroupNotExistsException Description copied from interface:MembersManagerCreates a new member from user.Also add this member to groups in list. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).
- Specified by:
createMemberin interfaceMembersManager- Parameters:
sess-vo-user-groups- list of groups where member will be added too- Returns:
- newly created member
- Throws:
AlreadyMemberExceptionWrongAttributeValueExceptionWrongReferenceAttributeValueExceptionVoNotExistsExceptionUserNotExistsExceptionPrivilegeExceptionExtendMembershipExceptionGroupNotExistsException
-
createMember
public Member createMember(PerunSession sess, Vo vo, ExtSource extSource, String login) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException, VoNotExistsException, ExtSourceNotExistsException, PrivilegeException, GroupNotExistsException Description copied from interface:MembersManagerCreate new member from user by login and ExtSource. This method validates member asynchronously- Specified by:
createMemberin interfaceMembersManager- Parameters:
sess-vo-extSource-login-- Returns:
- newly created member
- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueExceptionAlreadyMemberExceptionExtendMembershipExceptionVoNotExistsExceptionExtSourceNotExistsExceptionPrivilegeExceptionGroupNotExistsException
-
createMember
public Member createMember(PerunSession sess, Vo vo, ExtSource extSource, String login, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException, VoNotExistsException, ExtSourceNotExistsException, PrivilegeException, GroupNotExistsException Description copied from interface:MembersManagerCreate new member from user by login and ExtSource.Also add this member to groups in list. This method validates member asynchronously
- Specified by:
createMemberin interfaceMembersManager- Parameters:
sess-vo-extSource-login-groups-- Returns:
- newly created member
- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueExceptionAlreadyMemberExceptionExtendMembershipExceptionVoNotExistsExceptionExtSourceNotExistsExceptionPrivilegeExceptionGroupNotExistsException
-
createSpecificMember
public Member createSpecificMember(PerunSession sess, Vo vo, Candidate candidate, List<User> specificUserOwners, SpecificUserType specificUserType) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, VoNotExistsException, PrivilegeException, UserNotExistsException, ExtendMembershipException, GroupNotExistsException Description copied from interface:MembersManagerCreates a new member from candidate which is prepared for creating specific User In list specificUserOwners can't be specific user, only normal users and sponsored users are allowed. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).- Specified by:
createSpecificMemberin interfaceMembersManager- Parameters:
sess-vo-candidate- prepared future specificUserspecificUserOwners- list of users who own specificUser (can't be empty or contain specificUser)specificUserType- type of specific user (service)- Returns:
- newly created member (of specificUser)
- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueExceptionAlreadyMemberExceptionVoNotExistsExceptionPrivilegeExceptionUserNotExistsExceptionExtendMembershipExceptionGroupNotExistsException
-
createSpecificMember
public Member createSpecificMember(PerunSession sess, Vo vo, Candidate candidate, List<User> specificUserOwners, SpecificUserType specificUserType, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, VoNotExistsException, PrivilegeException, UserNotExistsException, ExtendMembershipException, GroupNotExistsException Description copied from interface:MembersManagerCreates a new member from candidate which is prepared for creating specificUser In list specificUserOwners can't be specific user, only normal users and sponsored users are allowed.Also add this member to groups in list. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).
- Specified by:
createSpecificMemberin interfaceMembersManager- Parameters:
sess-vo-candidate- prepared future specificUserspecificUserOwners- list of users who own specificUser (can't be empty or contain specificUser)specificUserType- type of specific user (service)groups- list of groups where member will be added too- Returns:
- newly created member (of specific User)
- Throws:
WrongAttributeValueExceptionWrongReferenceAttributeValueExceptionAlreadyMemberExceptionVoNotExistsExceptionPrivilegeExceptionUserNotExistsExceptionExtendMembershipExceptionGroupNotExistsException
-
createSponsoredMember
public RichMember createSponsoredMember(PerunSession session, SponsoredUserData data, Vo vo, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url) throws PrivilegeException, AlreadyMemberException, LoginNotExistsException, PasswordCreationFailedException, ExtendMembershipException, WrongAttributeValueException, ExtSourceNotExistsException, WrongReferenceAttributeValueException, UserNotInRoleException, PasswordStrengthException, InvalidLoginException, AlreadySponsorException, InvalidSponsoredUserDataException, NamespaceRulesNotExistsException Description copied from interface:MembersManagerCreates a new sponsored Member and its User.- Specified by:
createSponsoredMemberin interfaceMembersManager- Parameters:
session- actordata- about the user that should be created, required fields depend on the provided namespace. However, it has to contain either `guestName`, or `firstName` and `lastName`. Also, if you want to create an external account, specify the `namespace` field.vo- virtual organization for the membersponsor- sponsoring user or null for the callervalidityTo- last day when the sponsorship is active (null means the sponsorship will last forever)sendActivationLink- if true link for manual activation of account will be send to the email be careful when using with empty (no-reply) emaillanguage- language of the activation email (e.g. "en", "cs"). Use english if null.url- base URL of Perun Instance- Returns:
- new Member in the Vo
- Throws:
PrivilegeException- if not REGISTRAR or VOADMINAlreadyMemberExceptionLoginNotExistsExceptionPasswordCreationFailedExceptionExtendMembershipExceptionWrongAttributeValueExceptionExtSourceNotExistsExceptionWrongReferenceAttributeValueExceptionUserNotInRoleExceptionAlreadySponsorExceptionPasswordStrengthExceptionInvalidLoginExceptionInvalidSponsoredUserDataExceptionNamespaceRulesNotExistsException
-
createSponsoredMembers
public List<Map<String,String>> createSponsoredMembers(PerunSession session, Vo vo, String namespace, List<String> names, String email, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url) throws PrivilegeException Description copied from interface:MembersManagerCreates new sponsored Members (with random generated passwords).Since there may be error while creating some of the members and we cannot simply rollback the transaction and start over, exceptions during member creation are not thrown and the returned list has this structure:
[{"name" -> name, "status" -> "OK" or "Error...", "login" -> login, "password" -> password}]
Each list element represents member as map containing keys "name", "status", "login" and "password". "status" has as its value either "OK" or message of exception which was thrown during creation of the member. "name" contains full entry as received (e.g. first name; last name; email), "login" contains login (e.g. učo) if status is OK, "password" contains password if status is OK.
- Specified by:
createSponsoredMembersin interfaceMembersManager- Parameters:
session- perun sessionvo- vo for membersnamespace- namespace for selecting password modulenames- names of members to create, single name should have the format {firstName};{lastName} to be parsed wellemail- (optional) preferred email that will be set to the created user. If no email is provided, "no-reply@muni.cz" is used.sponsor- sponsoring user or null for the callervalidityTo- last day when the sponsorship is active (null means the sponsorship will last forever)sendActivationLink- if true link for manual activation of every created sponsored member account will be send to the email, be careful when using with empty (no-reply) emaillanguage- language of the activation email (e.g. "en", "cs"). Use english if null.url- base URL of Perun Instance- Returns:
- list of maps of name, status, login and password
- Throws:
PrivilegeException
-
createSponsoredMembersFromCSV
public List<Map<String,String>> createSponsoredMembersFromCSV(PerunSession sess, Vo vo, String namespace, List<String> data, String header, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url, List<Group> groups) throws PrivilegeException Description copied from interface:MembersManagerCreates new sponsored members using input from CSV file.Since there may be error while creating some of the members and we cannot simply rollback the transaction and start over, exceptions during member creation are not thrown and the returned list has this structure:
[{"name" -> name, "status" -> "OK" or "Error...", "login" -> login, "password" -> password}]
Each list element represents member as map containing keys "name", "status", "login" and "password". "status" has as its value either "OK" or message of exception which was thrown during creation of the member. "name" contains full entry as received (e.g. first name; last name; email), "login" contains login (e.g. učo) if status is OK, "password" contains password if status is OK.
- Specified by:
createSponsoredMembersFromCSVin interfaceMembersManager- Parameters:
sess- perun sessionvo- virtual organization to created sponsored members innamespace- used for selecting external system in which guest user account will be createddata- csv file values separated by semicolon ';' charactersheader- header to the given csv data, it should represent columns for the given data. Required values are - firstname, lastname, urn:perun:user:attribute-def:def:preferredMail Optional values are - urn:perun:user:attribute-def:def:note The order of the items doesn't matter.sponsor- sponsoring usersendActivationLink- if true link for manual activation of every created sponsored member account will be send to email which was set for him, be careful when using no-reply emailslanguage- language of the activation email (e.g. "en", "cs"). Use english if null.url- base URL of Perun Instancegroups- groups, to which will be the created users assigned- Returns:
- list of maps of name, status, login and password
- Throws:
PrivilegeException- insufficient permissions
-
deleteAllMembers
public void deleteAllMembers(PerunSession sess, Vo vo) throws VoNotExistsException, PrivilegeException, MemberAlreadyRemovedException, MemberLifecycleAlteringForbiddenException Description copied from interface:MembersManagerDeletes all VO members.- Specified by:
deleteAllMembersin interfaceMembersManager- Parameters:
sess-vo-- Throws:
VoNotExistsExceptionPrivilegeExceptionMemberAlreadyRemovedExceptionMemberLifecycleAlteringForbiddenException- if some member comes from hierarchical member vo and cannot be altered in parent vo
-
deleteMember
public void deleteMember(PerunSession sess, Member member) throws MemberNotExistsException, PrivilegeException, MemberAlreadyRemovedException, MemberLifecycleAlteringForbiddenException Description copied from interface:MembersManagerDeletes only member data appropriated by member id.- Specified by:
deleteMemberin interfaceMembersManager- Parameters:
sess-member-- Throws:
MemberNotExistsExceptionPrivilegeExceptionMemberAlreadyRemovedExceptionMemberLifecycleAlteringForbiddenException- if member comes from hierarchical member vo and cannot be altered in parent vo
-
deleteMembers
public void deleteMembers(PerunSession sess, List<Member> members) throws MemberNotExistsException, PrivilegeException, MemberAlreadyRemovedException, MemberLifecycleAlteringForbiddenException Description copied from interface:MembersManagerDelete given members. It is possible to delete members from multiple vos.- Specified by:
deleteMembersin interfaceMembersManager- Parameters:
sess- sessionmembers- members that will be deleted- Throws:
MemberNotExistsException- if any member doesn't existPrivilegeException- insufficient permissionsMemberAlreadyRemovedException- if already removedMemberLifecycleAlteringForbiddenException- if some member comes from hierarchical member vo and cannot be altered in parent vo
-
extendExpirationForSponsoredMember
public String extendExpirationForSponsoredMember(PerunSession sess, Member sponsoredMember, User sponsorUser) throws PrivilegeException, MemberNotExistsException, UserNotExistsException Description copied from interface:MembersManagerExtends expiration date. Sponsored members cannot apply for membership extension, this method allows a sponsor to extend it.- Specified by:
extendExpirationForSponsoredMemberin interfaceMembersManager- Parameters:
sess- actorsponsoredMember- existing member that is sponsoredsponsorUser- sponsoring user or null for the caller- Returns:
- new expiration date
- Throws:
PrivilegeException- if not REGISTRAR or VOADMINMemberNotExistsExceptionUserNotExistsException
-
extendMembership
public void extendMembership(PerunSession sess, Member member) throws PrivilegeException, MemberNotExistsException, ExtendMembershipException Description copied from interface:MembersManagerExtend member membership using membershipExpirationRules attribute defined at VO.- Specified by:
extendMembershipin interfaceMembersManager- Parameters:
sess-member-- Throws:
PrivilegeExceptionMemberNotExistsExceptionExtendMembershipException
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames, String searchString, boolean onlySponsored) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerReturn list of richMembers for specific vo by the searchString with attrs specific for list of attrsNames. If attrsNames is empty or null return all attributes for specific richMembers.- Specified by:
findCompleteRichMembersin interfaceMembersManager- Parameters:
sess-vo-attrsNames-searchString-onlySponsored- return only sponsored members- Returns:
- list of founded richMembers with specific attributes from Vo for searchString
- Throws:
PrivilegeExceptionVoNotExistsException
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames, List<String> allowedStatuses, String searchString) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerReturn list of richMembers for specific vo by the searchString with attrs specific for list of attrsNames and who have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses.- Specified by:
findCompleteRichMembersin interfaceMembersManager- Parameters:
sess-vo-attrsNames-allowedStatuses-searchString-- Returns:
- list of founded richMembers with specific attributes from Vo for searchString with allowed statuses
- Throws:
PrivilegeExceptionVoNotExistsException
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, List<String> attrsNames, List<String> allowedStatuses, String searchString) throws PrivilegeException Description copied from interface:MembersManagerReturn list of richMembers from Perun by searchString with attrs specific for list of attrsNames and who have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses.- Specified by:
findCompleteRichMembersin interfaceMembersManager- Parameters:
sess-attrsNames-allowedStatuses-searchString-- Returns:
- list of founded richMembers with specific attributes by searchString with allowed statuses
- Throws:
PrivilegeException
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, String searchString, boolean lookingInParentGroup) throws PrivilegeException, GroupNotExistsException, ParentGroupNotExistsException Description copied from interface:MembersManagerReturn list of richMembers for specific group by the searchString with attrs specific for list of attrsNames. If attrsNames is empty or null return all attributes for specific richMembers.If lookingInParentGroup is true, find all these richMembers only for parentGroup of this group. If this group is top level group, so find richMembers from members group.
- Specified by:
findCompleteRichMembersin interfaceMembersManager- Parameters:
sess-group-attrsNames-searchString-lookingInParentGroup-- Returns:
- list of founded richMembers with specific attributes from Group for searchString
- Throws:
PrivilegeExceptionGroupNotExistsExceptionParentGroupNotExistsException
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, List<String> allowedStatuses, List<String> allowedGroupStatuses, String searchString, boolean lookingInParentGroup) throws PrivilegeException, GroupNotExistsException, ParentGroupNotExistsException Description copied from interface:MembersManagerReturn list of richMembers for specific group by the searchString with attrs specific for list of attrsNames and who have only status which is contain in lists of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses or listOfGroupStatuses is empty or null, return all possible statuses.If lookingInParentGroup is true, find all these richMembers only for parentGroup of this group. If this group is top level group, so find richMembers from members group.
- Specified by:
findCompleteRichMembersin interfaceMembersManager- Parameters:
sess-group-attrsNames-allowedStatuses-allowedGroupStatuses-searchString-lookingInParentGroup-- Returns:
- list of founded richMembers with specific attributes from Group for searchString
- Throws:
PrivilegeExceptionGroupNotExistsExceptionParentGroupNotExistsException
-
findMembersByName
public List<Member> findMembersByName(PerunSession sess, String searchString) throws PrivilegeException Description copied from interface:MembersManagerReturn list of members by the searchString- Specified by:
findMembersByNamein interfaceMembersManager- Parameters:
sess-searchString-- Returns:
- list of members
- Throws:
PrivilegeException
-
findMembersByNameInVo
public List<Member> findMembersByNameInVo(PerunSession sess, Vo vo, String searchString) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerReturn list of members by the searchString under defined VO.- Specified by:
findMembersByNameInVoin interfaceMembersManager- Parameters:
sess-vo-searchString-- Returns:
- list of members
- Throws:
PrivilegeExceptionVoNotExistsException
-
findMembersInGroup
public List<Member> findMembersInGroup(PerunSession sess, Group group, String searchString) throws PrivilegeException, GroupNotExistsException Description copied from interface:MembersManagerReturn list of members by the searchString under defined Group. Search is done in name, email and login.- Specified by:
findMembersInGroupin interfaceMembersManager- Parameters:
sess-group-searchString-- Returns:
- list of members
- Throws:
PrivilegeExceptionGroupNotExistsException
-
findMembersInParentGroup
public List<Member> findMembersInParentGroup(PerunSession sess, Group group, String searchString) throws PrivilegeException, GroupNotExistsException, ParentGroupNotExistsException Description copied from interface:MembersManagerReturn list of members by the searchString udner parentGroup of defined Group. Search is done in name, email and login.- Specified by:
findMembersInParentGroupin interfaceMembersManager- Parameters:
sess-group- this group is used to get parent group, we are searching members of the parent groupsearchString-- Returns:
- Throws:
PrivilegeExceptionGroupNotExistsExceptionParentGroupNotExistsException
-
findMembersInVo
public List<Member> findMembersInVo(PerunSession sess, Vo vo, String searchString) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerReturn list of members by the searchString under defined VO. Search is done in name, email and login.- Specified by:
findMembersInVoin interfaceMembersManager- Parameters:
sess-vo-searchString-- Returns:
- list of members
- Throws:
PrivilegeExceptionVoNotExistsException
-
findRichMembersInVo
public List<RichMember> findRichMembersInVo(PerunSession sess, Vo vo, String searchString) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerReturn list of rich members by the searchString under defined VO. Search is done in name, email and login.- Specified by:
findRichMembersInVoin interfaceMembersManager- Parameters:
sess-vo-searchString-- Returns:
- list of rich members
- Throws:
PrivilegeExceptionVoNotExistsException
-
findRichMembersWithAttributesInGroup
public List<RichMember> findRichMembersWithAttributesInGroup(PerunSession sess, Group group, String searchString) throws PrivilegeException, GroupNotExistsException Description copied from interface:MembersManagerReturn list of rich members with attributes by the searchString under defined Group. Search is done in name, email and login.- Specified by:
findRichMembersWithAttributesInGroupin interfaceMembersManager- Parameters:
sess-group- this group is used to get parent group, we are searching members of the parent groupsearchString-- Returns:
- Throws:
PrivilegeExceptionGroupNotExistsException- is thrown if group or parent group of this group not exists.
-
findRichMembersWithAttributesInParentGroup
public List<RichMember> findRichMembersWithAttributesInParentGroup(PerunSession sess, Group group, String searchString) throws PrivilegeException, GroupNotExistsException Description copied from interface:MembersManagerReturn list of rich with attributes members by the searchString under parent group of defined Group. Search is done in name, email and login.- Specified by:
findRichMembersWithAttributesInParentGroupin interfaceMembersManager- Parameters:
sess-group-searchString-- Returns:
- Throws:
PrivilegeExceptionGroupNotExistsException- is thrown if group or parent group of this group not exists.
-
findRichMembersWithAttributesInVo
public List<RichMember> findRichMembersWithAttributesInVo(PerunSession sess, Vo vo, String searchString) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerReturn list of rich members with attributes by the searchString under defined VO. Search is done in name, email and login.- Specified by:
findRichMembersWithAttributesInVoin interfaceMembersManager- Parameters:
sess-vo-searchString-- Returns:
- list of rich members with attributes
- Throws:
PrivilegeExceptionVoNotExistsException
-
getAllMembers
Description copied from interface:MembersManagerGet all members from all vos.- Specified by:
getAllMembersin interfaceMembersManager- Parameters:
sess- session- Returns:
- list of all members from all Vos.
- Throws:
PrivilegeException
-
getAllNamespacesRules
Description copied from interface:MembersManagerReturn all loaded namespaces rules.- Specified by:
getAllNamespacesRulesin interfaceMembersManager- Returns:
- all namespaces rules
-
getAllSponsoredMembers
public List<RichMember> getAllSponsoredMembers(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGets list of all sponsored members of a VO.- Specified by:
getAllSponsoredMembersin interfaceMembersManager- Parameters:
sess- perun sessionvo- virtual organization from which are the sponsored members chosen- Returns:
- list of members from given VO who are sponsored
- Throws:
PrivilegeException- insufficient permissionsVoNotExistsException
-
getAllSponsoredMembersAndTheirSponsors
public List<MemberWithSponsors> getAllSponsoredMembersAndTheirSponsors(PerunSession sess, Vo vo, List<String> attrNames) throws VoNotExistsException, PrivilegeException, AttributeNotExistsException Description copied from interface:MembersManagerGets list of VO's all sponsored members with sponsors.- Specified by:
getAllSponsoredMembersAndTheirSponsorsin interfaceMembersManager- Parameters:
sess- sessionvo- virtual organization from which are the sponsored members chosenattrNames- list of attrNames for selected attributes- Returns:
- list of members with sponsors
- Throws:
VoNotExistsException- if given VO does not existPrivilegeException- if not VOADMIN, VOOBSERVER, PERUNOBSERVER or SPONSORAttributeNotExistsException
-
getCompleteRichMembers
public List<RichMember> getCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames) throws PrivilegeException, VoNotExistsException, AttributeNotExistsException Description copied from interface:MembersManagerGet all RichMembers with attrs specific for list of attrsNames from the vo. If attrsNames is empty or null return all attributes for specific richMembers.- Specified by:
getCompleteRichMembersin interfaceMembersManager- Parameters:
sess-vo-attrsNames-- Returns:
- list of richMembers with specific attributes from Vo
- Throws:
PrivilegeExceptionVoNotExistsExceptionAttributeNotExistsException
-
getCompleteRichMembers
public List<RichMember> getCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames, List<String> allowedStatuses) throws PrivilegeException, VoNotExistsException, AttributeNotExistsException Description copied from interface:MembersManagerGet all RichMembers with attrs specific for list of attrsNames from the vo and have only status which is contain in list of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses is empty or null, return all possible statuses.- Specified by:
getCompleteRichMembersin interfaceMembersManager- Parameters:
sess-vo-attrsNames-allowedStatuses-- Returns:
- list of richMembers with specific attributes from Vo
- Throws:
PrivilegeExceptionVoNotExistsExceptionAttributeNotExistsException
-
getCompleteRichMembers
public List<RichMember> getCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, boolean lookingInParentGroup) throws PrivilegeException, ParentGroupNotExistsException, GroupNotExistsException, AttributeNotExistsException Description copied from interface:MembersManagerGet all RichMembers with attrs specific for list of attrsNames from the group. If attrsNames is empty or null return all attributes for specific richMembers.If lookingInParentGroup is true, get all these richMembers only for parentGroup of this group. If this group is top level group, so get richMembers from members group.
- Specified by:
getCompleteRichMembersin interfaceMembersManager- Parameters:
sess-group-attrsNames-lookingInParentGroup-- Returns:
- list of richMembers with specific attributes from Group
- Throws:
PrivilegeExceptionGroupNotExistsExceptionAttributeNotExistsExceptionParentGroupNotExistsException
-
getCompleteRichMembers
public List<RichMember> getCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, List<String> allowedStatuses, List<String> allowedGroupStatuses, boolean lookingInParentGroup) throws PrivilegeException, ParentGroupNotExistsException, GroupNotExistsException, AttributeNotExistsException Description copied from interface:MembersManagerGet all RichMembers with attrs specific for list of attrsNames from the group and have only status which is contain in lists of statuses. If attrsNames is empty or null return all attributes for specific richMembers. If listOfStatuses or listOfGroupStatuses is empty or null, return all possible statuses.If lookingInParentGroup is true, get all these richMembers only for parentGroup of this group. If this group is top level group, so get richMembers from members group.
- Specified by:
getCompleteRichMembersin interfaceMembersManager- Parameters:
sess-group-attrsNames-allowedStatuses-allowedGroupStatuses-lookingInParentGroup-- Returns:
- list of richMembers with specific attributes from group
- Throws:
PrivilegeExceptionGroupNotExistsExceptionAttributeNotExistsExceptionParentGroupNotExistsException
-
getCompleteRichMembers
public List<RichMember> getCompleteRichMembers(PerunSession sess, Group group, Resource resource, List<String> attrsNames, List<String> allowedStatuses) throws AttributeNotExistsException, GroupNotExistsException, ResourceNotExistsException, PrivilegeException, GroupResourceMismatchException Description copied from interface:MembersManagerGet all RichMembers with attributes specific for list of attrNames. Attributes are defined by member (user) and resource (facility) objects. It returns also user-facility (in userAttributes of RichMember) and member-resource (in memberAttributes of RichMember) attributes. Members are defined by group and are filtered by list of allowed statuses.- Specified by:
getCompleteRichMembersin interfaceMembersManager- Parameters:
sess-group-resource-attrsNames-allowedStatuses-- Returns:
- list of richMembers with specific attributes
- Throws:
AttributeNotExistsExceptionGroupNotExistsExceptionResourceNotExistsExceptionPrivilegeExceptionGroupResourceMismatchException
-
getMemberByExtSourceNameAndExtLogin
public Member getMemberByExtSourceNameAndExtLogin(PerunSession sess, Vo vo, String extSourceName, String extLogin) throws ExtSourceNotExistsException, UserExtSourceNotExistsException, MemberNotExistsException, UserNotExistsException, VoNotExistsException, PrivilegeException Description copied from interface:MembersManagerGet member by extSourceName, extSourceLogin and Vo- Specified by:
getMemberByExtSourceNameAndExtLoginin interfaceMembersManager- Parameters:
sess-vo- Vo where we are looking for memberextSourceName- name of extSourceextLogin- login of user in extSource- Returns:
- member
- Throws:
ExtSourceNotExistsExceptionUserExtSourceNotExistsExceptionMemberNotExistsExceptionUserNotExistsExceptionVoNotExistsExceptionPrivilegeException
-
getMemberById
public Member getMemberById(PerunSession sess, int id) throws MemberNotExistsException, PrivilegeException Description copied from interface:MembersManagerReturns member by his id.- Specified by:
getMemberByIdin interfaceMembersManager- Parameters:
sess-id-- Returns:
- member
- Throws:
MemberNotExistsExceptionPrivilegeException
-
getMemberByUser
public Member getMemberByUser(PerunSession sess, Vo vo, User user) throws MemberNotExistsException, PrivilegeException, VoNotExistsException, UserNotExistsException Description copied from interface:MembersManagerReturns member by his user and vo.- Specified by:
getMemberByUserin interfaceMembersManager- Parameters:
sess-vo-user-- Returns:
- member
- Throws:
MemberNotExistsExceptionPrivilegeExceptionVoNotExistsExceptionUserNotExistsException
-
getMemberByUserExtSource
public Member getMemberByUserExtSource(PerunSession sess, Vo vo, UserExtSource uea) throws VoNotExistsException, MemberNotExistsException, PrivilegeException Description copied from interface:MembersManagerFind member of this Vo by his login in external source- Specified by:
getMemberByUserExtSourcein interfaceMembersManager- Parameters:
sess-vo-uea-- Returns:
- selected user or throws MemberNotExistsException in case the requested member doesn't exists in this Vo
- Throws:
VoNotExistsExceptionMemberNotExistsExceptionPrivilegeException
-
getMemberVo
Description copied from interface:MembersManagerGet the member VO.- Specified by:
getMemberVoin interfaceMembersManager- Parameters:
sess-member-- Returns:
- member's VO
- Throws:
MemberNotExistsException
-
getMembers
public List<Member> getMembers(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet all VO members.- Specified by:
getMembersin interfaceMembersManager- Parameters:
sess-vo-- Returns:
- all members of the VO
- Throws:
PrivilegeExceptionVoNotExistsException
-
getMembers
public List<Member> getMembers(PerunSession sess, Vo vo, Status status) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet all VO members who have the status.- Specified by:
getMembersin interfaceMembersManager- Parameters:
sess-vo-status- get only members who have this status- Returns:
- all members of the VO
- Throws:
PrivilegeExceptionVoNotExistsException
-
getMembersByIds
Description copied from interface:MembersManagerReturns members by their ids.- Specified by:
getMembersByIdsin interfaceMembersManager- Parameters:
sess-ids-- Returns:
- list of members with specified ids
- Throws:
PrivilegeException
-
getMembersByUser
public List<Member> getMembersByUser(PerunSession sess, User user) throws PrivilegeException, UserNotExistsException Description copied from interface:MembersManagerReturns members by his user.- Specified by:
getMembersByUserin interfaceMembersManager- Parameters:
sess-user-- Returns:
- member
- Throws:
PrivilegeExceptionUserNotExistsException
-
getMembersCount
public int getMembersCount(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet the VO members count.- Specified by:
getMembersCountin interfaceMembersManager- Parameters:
sess-vo-- Returns:
- count of VO members
- Throws:
PrivilegeExceptionVoNotExistsException
-
getMembersCount
public int getMembersCount(PerunSession sess, Vo vo, Status status) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet the VO members count with defined status.- Specified by:
getMembersCountin interfaceMembersManager- Parameters:
sess-vo-status-- Returns:
- count of VO members
- Throws:
PrivilegeExceptionVoNotExistsException
-
getMembersManagerBl
Gets the membersManagerBl for this instance.- Returns:
- The membersManagerBl.
-
getMembersPage
public Paginated<RichMember> getMembersPage(PerunSession sess, Vo vo, MembersPageQuery query, List<String> attrNames) throws VoNotExistsException, PrivilegeException, GroupNotExistsException, PolicyNotExistsException Description copied from interface:MembersManagerGet page of members from the given vo, with the given attributes.- Specified by:
getMembersPagein interfaceMembersManager- Parameters:
sess- sessionvo- voquery- query with page informationattrNames- attribute names- Returns:
- page of requested rich members
- Throws:
VoNotExistsException- if there is no such voPrivilegeException- insufficient permissionGroupNotExistsException- if there is no such query groupPolicyNotExistsException
-
getMembersPage
public Paginated<RichMember> getMembersPage(PerunSession sess, Vo vo, MembersPageQuery query, List<String> attrNames, String policy) throws VoNotExistsException, PrivilegeException, GroupNotExistsException, PolicyNotExistsException Description copied from interface:MembersManagerGet page of members from the given vo, with the given attributes, based on policy.- Specified by:
getMembersPagein interfaceMembersManager- Parameters:
sess- sessionvo- voquery- query with page informationattrNames- attribute namespolicy- policy to use- Returns:
- page of requested rich members
- Throws:
VoNotExistsException- if there is no such voPrivilegeException- insufficient permissionGroupNotExistsException- if there is no such query groupPolicyNotExistsException
-
getNewExtendMembership
public Date getNewExtendMembership(PerunSession sess, Member member) throws MemberNotExistsException Description copied from interface:MembersManagerReturns the date to which will be extended member's expiration time.- Specified by:
getNewExtendMembershipin interfaceMembersManager- Parameters:
sess-member-- Returns:
- date
- Throws:
MemberNotExistsException
-
getNewExtendMembership
public Date getNewExtendMembership(PerunSession sess, Vo vo, String loa) throws VoNotExistsException, ExtendMembershipException Description copied from interface:MembersManagerReturns the date to which will be extended member's expiration time.- Specified by:
getNewExtendMembershipin interfaceMembersManager- Parameters:
sess-vo-loa-- Returns:
- date
- Throws:
VoNotExistsExceptionExtendMembershipException
-
getPerunBl
-
getRichMemberById
public RichMember getRichMemberById(PerunSession sess, int id) throws PrivilegeException, MemberNotExistsException Description copied from interface:MembersManagerGet richMember without attribute by id of member- Specified by:
getRichMemberByIdin interfaceMembersManager- Parameters:
sess-id- of member- Returns:
- richMember without attributes (only with user)
- Throws:
PrivilegeException- if user has no rights to get this richMemberMemberNotExistsException- if member not exists
-
getRichMemberWithAttributes
public RichMember getRichMemberWithAttributes(PerunSession sess, Member member) throws PrivilegeException, MemberNotExistsException Description copied from interface:MembersManagerGet Member to RichMember with attributes.- Specified by:
getRichMemberWithAttributesin interfaceMembersManager- Parameters:
sess-member-- Returns:
- Throws:
PrivilegeExceptionMemberNotExistsException
-
getRichMembers
public List<RichMember> getRichMembers(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet all rich members of VO. Rich member object contains user, member, userExtSources.- Specified by:
getRichMembersin interfaceMembersManager- Parameters:
sess-vo-- Returns:
- list of rich members, empty list if there are no members in VO
- Throws:
PrivilegeExceptionVoNotExistsException
-
getRichMembers
public List<RichMember> getRichMembers(PerunSession sess, Group group) throws PrivilegeException, GroupNotExistsException Description copied from interface:MembersManagerGet all rich members of Group. Rich member object contains user, member, userExtSources.- Specified by:
getRichMembersin interfaceMembersManager- Parameters:
sess-group-- Returns:
- list of rich members, empty list if there are no members in Group
- Throws:
PrivilegeExceptionGroupNotExistsException
-
getRichMembers
public List<RichMember> getRichMembers(PerunSession sess, Vo vo, Status status) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet all rich members of VO with specified status. Rich member object contains user, member, userExtSources.- Specified by:
getRichMembersin interfaceMembersManager- Parameters:
sess-vo-status- get only members who have this status- Returns:
- list of rich members, empty list if there are no members in VO with specified status
- Throws:
PrivilegeExceptionVoNotExistsException
-
getRichMembersByIds
public List<RichMember> getRichMembersByIds(PerunSession sess, List<Integer> ids, List<String> attrNames) throws PrivilegeException, AttributeNotExistsException Description copied from interface:MembersManagerReturns rich members by their IDs with specific attributes.- Specified by:
getRichMembersByIdsin interfaceMembersManager- Parameters:
sess- Perun sessionids- Listlist of members IDs attrNames- ListAttribute names. If the list is null or empty, no attributes will be provided. - Returns:
- List
RichMembers with specified IDs and attributes - Throws:
PrivilegeExceptionAttributeNotExistsException
-
getRichMembersNoUserAttributes
public List<RichMember> getRichMembersNoUserAttributes(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet all rich members of VO. Rich member object contains user, member, userExtSources and member attributes. User attributes aren't included- Specified by:
getRichMembersNoUserAttributesin interfaceMembersManager- Parameters:
sess-vo-- Returns:
- list of rich members with all member attributes
- Throws:
PrivilegeExceptionVoNotExistsException
-
getRichMembersWithAttributes
public List<RichMember> getRichMembersWithAttributes(PerunSession sess, Vo vo, List<AttributeDefinition> attrsDef) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet RichMembers with Attributes but only with selected attributes from list attrsDef for vo.- Specified by:
getRichMembersWithAttributesin interfaceMembersManager- Parameters:
sess-vo-attrsDef- list of attrDefs only for selected attributes- Returns:
- list of richmembers
- Throws:
PrivilegeExceptionVoNotExistsException
-
getRichMembersWithAttributes
public List<RichMember> getRichMembersWithAttributes(PerunSession sess, List<String> allowedStatuses, Group group) throws PrivilegeException, GroupNotExistsException Description copied from interface:MembersManagerGet all rich members with allowed statuses from specific group. Rich member object contains user, member, userExtSources and member/user attributes.- Specified by:
getRichMembersWithAttributesin interfaceMembersManager- Parameters:
sess-allowedStatuses- only allowed statusesgroup- to get richMembers from- Returns:
- list of rich members with all member/user attributes, empty list if there are no members in group
- Throws:
PrivilegeExceptionGroupNotExistsException
-
getRichMembersWithAttributes
public List<RichMember> getRichMembersWithAttributes(PerunSession sess, Group group, List<AttributeDefinition> attrsDef) throws PrivilegeException, GroupNotExistsException Description copied from interface:MembersManagerGet RichMembers with Attributes but only with selected attributes from list attrsDef for group.- Specified by:
getRichMembersWithAttributesin interfaceMembersManager- Parameters:
sess-group-attrsDef-- Returns:
- Throws:
PrivilegeExceptionGroupNotExistsException
-
getRichMembersWithAttributes
public List<RichMember> getRichMembersWithAttributes(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet all rich members of VO. Rich member object contains user, member, userExtSources and member/user attributes.- Specified by:
getRichMembersWithAttributesin interfaceMembersManager- Parameters:
sess-vo-- Returns:
- list of rich members with all member/user attributes, empty list if there are no members in VO
- Throws:
PrivilegeExceptionVoNotExistsException
-
getRichMembersWithAttributes
public List<RichMember> getRichMembersWithAttributes(PerunSession sess, Vo vo, Status status) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet all rich members of VO with specified status. Rich member object contains user, member, userExtSources and member/user attributes.- Specified by:
getRichMembersWithAttributesin interfaceMembersManager- Parameters:
sess-vo-status-- Returns:
- list of rich members with all member/user attributes, empty list if there are no members in VO with specified status
- Throws:
PrivilegeExceptionVoNotExistsException
-
getRichMembersWithAttributesByNames
public List<RichMember> getRichMembersWithAttributesByNames(PerunSession sess, Vo vo, List<String> attrsNames) throws PrivilegeException, VoNotExistsException, AttributeNotExistsException Description copied from interface:MembersManagerGet RichMembers with Attributes but only with selected attributes from list attrsDef for vo.- Specified by:
getRichMembersWithAttributesByNamesin interfaceMembersManager- Parameters:
sess-vo-attrsNames- list of attrNames for selected attributes- Returns:
- list of richmembers
- Throws:
PrivilegeExceptionVoNotExistsExceptionAttributeNotExistsException
-
getRichMembersWithAttributesByNames
public List<RichMember> getRichMembersWithAttributesByNames(PerunSession sess, Group group, List<String> attrsNames) throws PrivilegeException, GroupNotExistsException, AttributeNotExistsException Description copied from interface:MembersManagerGet RichMembers with Attributes but only with selected attributes from list attrsDef for group.- Specified by:
getRichMembersWithAttributesByNamesin interfaceMembersManager- Parameters:
sess-group-attrsNames- list of attrNames for selected attributes- Returns:
- list of richmembers
- Throws:
PrivilegeExceptionGroupNotExistsExceptionAttributeNotExistsException
-
getServiceUserRichMembers
public List<RichMember> getServiceUserRichMembers(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGet RichMembers from a VO who are service users.- Specified by:
getServiceUserRichMembersin interfaceMembersManager- Parameters:
sess-vo-- Returns:
- List of RichMembers from the VO, who are service users
- Throws:
PrivilegeExceptionVoNotExistsException
-
getSponsoredMembers
public List<RichMember> getSponsoredMembers(PerunSession sess, Vo vo, User user, List<String> attrNames) throws AttributeNotExistsException, PrivilegeException, VoNotExistsException, UserNotExistsException Description copied from interface:MembersManagerGet all sponsored RichMembers with attributes by list of attribute names for specific User and Vo.- Specified by:
getSponsoredMembersin interfaceMembersManager- Parameters:
sess-vo- to specify Member for Useruser- to specify Member for UserattrNames- list of attrNames - if empty, return richMembers without attributes- Returns:
- list of sponsored rich members with attributes from the list
- Throws:
AttributeNotExistsException- if any attributeDefinition can't be found by one of attribute namesPrivilegeException- if user in session is not allowed to call this methodVoNotExistsException- if Vo not exists in PerunUserNotExistsException- if User not exists in Perun
-
getSponsoredMembers
public List<RichMember> getSponsoredMembers(PerunSession sess, Vo vo, User user) throws PrivilegeException, VoNotExistsException, UserNotExistsException Description copied from interface:MembersManagerGets list of members of a VO sponsored by the given user.- Specified by:
getSponsoredMembersin interfaceMembersManager- Parameters:
sess- actorvo- virtual organization from which are the sponsored members chosenuser- user of system- Returns:
- list of members from given VO who are sponsored by the given user.
- Throws:
PrivilegeException- if not REGISTRAR or VOADMINVoNotExistsExceptionUserNotExistsException
-
getSponsoredMembers
public List<RichMember> getSponsoredMembers(PerunSession sess, Vo vo) throws PrivilegeException, VoNotExistsException Description copied from interface:MembersManagerGets list of sponsored members of a VO.- Specified by:
getSponsoredMembersin interfaceMembersManager- Parameters:
sess- actorvo- virtual organization from which are the sponsored members chosen- Returns:
- list of members from given VO who are sponsored
- Throws:
PrivilegeException- if not REGISTRAR or VOADMINVoNotExistsException
-
getSponsoredMembersAndTheirSponsors
public List<MemberWithSponsors> getSponsoredMembersAndTheirSponsors(PerunSession sess, Vo vo, List<String> attrNames) throws VoNotExistsException, PrivilegeException, AttributeNotExistsException Description copied from interface:MembersManagerGets list of sponsored members with sponsors.- Specified by:
getSponsoredMembersAndTheirSponsorsin interfaceMembersManager- Parameters:
sess- sessionvo- virtual organization from which are the sponsored members chosenattrNames- list of attrNames for selected attributes- Returns:
- list of members with sponsors
- Throws:
VoNotExistsException- if given VO does not existPrivilegeException- if not VOADMIN, VOOBSERVER, PERUNOBSERVER or SPONSORAttributeNotExistsException
-
moveMembership
public void moveMembership(PerunSession sess, Vo vo, User sourceUser, User targetUser) throws UserNotExistsException, VoNotExistsException, PrivilegeException, ExtendMembershipException, MemberNotExistsException, AlreadyMemberException Description copied from interface:MembersManagerMoves membership in VO from source user to target user - moves the source user's memberships in non-synchronized groups, member related attributes, bans and sponsorships in the VO. Removes the source user's member object. If VO is member of any hierarchical parent VO, user's membership is moved in parent VOs also. If VO is parent of any hierarchical member VO, user's membership is not moved in member VOs.- Specified by:
moveMembershipin interfaceMembersManager- Parameters:
sess- sessionvo- the VO in which the membership should be movedsourceUser- the user to move membership fromtargetUser- the user to move membership to- Throws:
UserNotExistsException- if there is no such userVoNotExistsException- if there is no such VOPrivilegeException- insufficient permissionsExtendMembershipException- when targetUser doesn't have required LOA for the VOMemberNotExistsException- when sourceUser is not member of the VOAlreadyMemberException- when targetUser is already member of the VO
-
removeSponsor
public void removeSponsor(PerunSession sess, Member sponsoredMember, User sponsorToRemove) throws PrivilegeException Description copied from interface:MembersManagerRemoves the sponsor.- Specified by:
removeSponsorin interfaceMembersManager- Parameters:
sess- actorsponsoredMember- existing member that is sponsoredsponsorToRemove- sponsoring user for removal- Throws:
PrivilegeException- if not REGISTRAR or VOADMIN
-
removeSponsors
public void removeSponsors(PerunSession sess, Member sponsoredMember, List<User> sponsorsToRemove) throws PrivilegeException Description copied from interface:MembersManagerRemoves the sponsors from member.- Specified by:
removeSponsorsin interfaceMembersManager- Parameters:
sess- actorsponsoredMember- existing member that is sponsoredsponsorsToRemove- sponsoring users for removal- Throws:
PrivilegeException- if not REGISTRAR or VOADMIN
-
sendAccountActivationLinkEmail
public void sendAccountActivationLinkEmail(PerunSession sess, Member member, String namespace, String url, String mailAttributeUrn, String language) throws PrivilegeException, MemberNotExistsException, AttributeNotExistsException, NotificationMemberMailNotExistsException Description copied from interface:MembersManagerSend mail to user's preferred email address with link for non-authz account activation. Correct authz information is stored in link's URL.- Specified by:
sendAccountActivationLinkEmailin interfaceMembersManager- Parameters:
sess- PerunSessionmember- Member to get user to send link mail tonamespace- namespace to activate account in (member must have login in it)url- base URL of Perun instancemailAttributeUrn- urn of the attribute with stored maillanguage- language of the message- Throws:
PrivilegeException- If not VO admin of memberMemberNotExistsException- If member not existsNotificationMemberMailNotExistsException- If the attribute with stored mail is not filled.AttributeNotExistsException
-
sendPasswordResetLinkEmail
public void sendPasswordResetLinkEmail(PerunSession sess, Member member, String namespace, String url, String mailAttributeUrn, String language) throws PrivilegeException, MemberNotExistsException, AttributeNotExistsException, NotificationMemberMailNotExistsException Description copied from interface:MembersManagerSend mail to user's preferred email address with link for non-authz password reset. Correct authz information is stored in link's URL.- Specified by:
sendPasswordResetLinkEmailin interfaceMembersManager- Parameters:
sess- PerunSessionmember- Member to get user to send link mail tonamespace- namespace to change password in (member must have login in it)url- base URL of Perun instancemailAttributeUrn- urn of the attribute with stored maillanguage- language of the message- Throws:
PrivilegeException- If not VO admin of memberMemberNotExistsException- If member not existsNotificationMemberMailNotExistsException- If the attribute with stored mail is not filled.AttributeNotExistsException
-
sendUsernameReminderEmail
public void sendUsernameReminderEmail(PerunSession sess, Member member, String namespace, String mailAttributeUrn, String language) throws PrivilegeException, MemberNotExistsException, AttributeNotExistsException, NotificationMemberMailNotExistsException Description copied from interface:MembersManagerSend mail to user's preferred email address with reminder of the username in the given namespace.- Specified by:
sendUsernameReminderEmailin interfaceMembersManager- Parameters:
sess- PerunSessionmember- Member to get user to send link mail tonamespace- namespace to change password in (member must have login in it)mailAttributeUrn- urn of the attribute with stored maillanguage- language of the message- Throws:
PrivilegeException- If not VO admin of memberMemberNotExistsException- If member not existsNotificationMemberMailNotExistsException- If the attribute with stored mail is not filled.AttributeNotExistsException
-
setMembersManagerBl
Sets the membersManagerBl for this instance.- Parameters:
membersManagerBl- The membersManagerBl.
-
setPerunBl
Sets the perunBl for this instance.- Parameters:
perunBl- The perunBl.
-
setSponsoredMember
public RichMember setSponsoredMember(PerunSession session, Vo vo, User userToBeSponsored, String namespace, String password, String login, User sponsor, LocalDate validityTo) throws PrivilegeException, AlreadyMemberException, LoginNotExistsException, PasswordCreationFailedException, ExtendMembershipException, WrongAttributeValueException, ExtSourceNotExistsException, WrongReferenceAttributeValueException, UserNotInRoleException, PasswordStrengthException, InvalidLoginException, AlreadySponsorException, InvalidSponsoredUserDataException, NamespaceRulesNotExistsException Description copied from interface:MembersManagerCreates a sponsored membership for the given user.- Specified by:
setSponsoredMemberin interfaceMembersManager- Parameters:
session- actorvo- virtual organization for the memberuserToBeSponsored- user, that will be sponsored by sponsornamespace- namespace for selecting password modulepassword- passwordlogin- loginsponsor- sponsoring user or null for the callervalidityTo- last day when the sponsorship is active (null means the sponsorship will last forever)- Returns:
- sponsored member
- Throws:
PrivilegeExceptionAlreadyMemberExceptionLoginNotExistsExceptionPasswordCreationFailedExceptionExtendMembershipExceptionWrongAttributeValueExceptionExtSourceNotExistsExceptionWrongReferenceAttributeValueExceptionUserNotInRoleExceptionPasswordStrengthExceptionInvalidLoginExceptionAlreadySponsorExceptionInvalidSponsoredUserDataExceptionNamespaceRulesNotExistsException
-
setSponsorshipForMember
public RichMember setSponsorshipForMember(PerunSession session, Member sponsoredMember, User sponsor, LocalDate validityTo) throws MemberNotExistsException, AlreadySponsoredMemberException, UserNotInRoleException, PrivilegeException, AlreadySponsorException Description copied from interface:MembersManagerTransform non-sponsored member to sponsored one with defined sponsor- Specified by:
setSponsorshipForMemberin interfaceMembersManager- Parameters:
session- perun sessionsponsoredMember- member who will be set as sponsored onesponsor- new sponsor of this membervalidityTo- last day when the sponsorship is active (null means the sponsorship will last forever)- Returns:
- sponsored member
- Throws:
MemberNotExistsException- if member with defined id not exists in system PerunAlreadySponsoredMemberException- if member is already sponsoredUserNotInRoleException- if sponsor hasn't right role in the same voPrivilegeException- if not PerunAdminAlreadySponsorException- sponsoredMember is already sponsored by User and his sponsorship is still active
-
setStatus
public Member setStatus(PerunSession sess, Member member, Status status) throws PrivilegeException, MemberNotExistsException, WrongAttributeValueException, WrongReferenceAttributeValueException, MemberNotValidYetException, MemberLifecycleAlteringForbiddenException Description copied from interface:MembersManagerSet status of the member to specified status.- Specified by:
setStatusin interfaceMembersManager- Parameters:
sess-member-status- new status- Returns:
- member with status set
- Throws:
PrivilegeExceptionMemberNotExistsExceptionWrongAttributeValueExceptionWrongReferenceAttributeValueExceptionMemberNotValidYetExceptionMemberLifecycleAlteringForbiddenException- if member comes from hierarchical member vo and cannot be altered in parent vo
-
sponsorMember
public RichMember sponsorMember(PerunSession session, Member sponsored, User sponsor, LocalDate validityTo) throws PrivilegeException, MemberNotSponsoredException, AlreadySponsorException, UserNotInRoleException Description copied from interface:MembersManagerAssigns a new sponsor to an existing member.- Specified by:
sponsorMemberin interfaceMembersManager- Parameters:
session- actorsponsored- existing member that needs sponsoringsponsor- sponsoring user or null for the callervalidityTo- last day when the sponsorship is active (null means the sponsorship will last forever)- Returns:
- existing Member
- Throws:
PrivilegeExceptionMemberNotSponsoredExceptionAlreadySponsorExceptionUserNotInRoleException
-
sponsorMembers
public void sponsorMembers(PerunSession session, List<Member> sponsored, User sponsor, LocalDate validityTo) throws PrivilegeException, MemberNotSponsoredException, AlreadySponsorException, UserNotInRoleException Description copied from interface:MembersManagerAssigns a new sponsor to existing members. If some members are non-sponsored, turn them into sponsored and assign the sponsor.- Specified by:
sponsorMembersin interfaceMembersManager- Parameters:
session- actorsponsored- existing members that needs sponsoringsponsor- sponsoring user or null for the callervalidityTo- last day when the sponsorship is active (null means the sponsorship will last forever)- Throws:
PrivilegeExceptionMemberNotSponsoredExceptionAlreadySponsorExceptionUserNotInRoleException
-
someAvailableSponsorExistsForMember
public boolean someAvailableSponsorExistsForMember(PerunSession sess, Member member) throws MemberNotExistsException, PrivilegeException Description copied from interface:MembersManagerChecks if some vo sponsor who does not already sponsor given member exists.- Specified by:
someAvailableSponsorExistsForMemberin interfaceMembersManager- Parameters:
sess- perun sessionmember- member- Returns:
- true if available sponsor exists, false otherwise
- Throws:
MemberNotExistsException- when member does not existPrivilegeException- insufficient permissions
-
getAvailableSponsorsForMember
public List<User> getAvailableSponsorsForMember(PerunSession sess, Member member) throws MemberNotExistsException, PrivilegeException Description copied from interface:MembersManagerReturns all available sponsors for given member.- Specified by:
getAvailableSponsorsForMemberin interfaceMembersManager- Parameters:
sess- perun sessionmember- member- Returns:
- list of available sponsors
- Throws:
MemberNotExistsException- when member does not existPrivilegeException- insufficient permissions
-
suspendMemberTo
public void suspendMemberTo(PerunSession sess, Member member, Date suspendedTo) throws MemberNotExistsException, PrivilegeException, BanAlreadyExistsException Description copied from interface:MembersManagerSet date to which will be member suspended in his VO.For almost unlimited time please use time in the far future.
- Specified by:
suspendMemberToin interfaceMembersManager- Parameters:
sess-member- member who will be suspendedsuspendedTo- date to which will be member suspended (after this date, he will not be affected by suspension any more)- Throws:
MemberNotExistsException- if member not exists in PerunPrivilegeExceptionBanAlreadyExistsException
-
unsetSponsorshipForMember
public RichMember unsetSponsorshipForMember(PerunSession session, Member sponsoredMember) throws MemberNotExistsException, MemberNotSponsoredException, PrivilegeException Description copied from interface:MembersManagerTransform sponsored member to non-sponsored one. Delete all his sponsors.- Specified by:
unsetSponsorshipForMemberin interfaceMembersManager- Parameters:
session- perun sessionsponsoredMember- member who will be unset from sponsoring- Returns:
- non-sponsored member
- Throws:
MemberNotExistsException- if member with defined id not exists in system PerunMemberNotSponsoredException- if member is not sponsored yetPrivilegeException- if not PerunAdmin
-
unsuspendMember
public void unsuspendMember(PerunSession sess, Member member) throws MemberNotExistsException, MemberNotSuspendedException, PrivilegeException Description copied from interface:MembersManagerRemove suspend state from Member - remove date to which member should be considered as suspended in the VO.WARNING: this will remove the date even if it is in the past (so member is no longer considered as suspended)
- Specified by:
unsuspendMemberin interfaceMembersManager- Parameters:
sess-member- member for which the suspend state will be removed- Throws:
MemberNotExistsExceptionMemberNotSuspendedException- if member has not set date to which should be considered as suspendedPrivilegeException
-
updateSponsorshipValidity
public void updateSponsorshipValidity(PerunSession sess, Member sponsoredMember, User sponsor, LocalDate newValidity) throws PrivilegeException, SponsorshipDoesNotExistException, MemberNotExistsException, UserNotExistsException Description copied from interface:MembersManagerUpdate the sponsorship of given member for given sponsor.- Specified by:
updateSponsorshipValidityin interfaceMembersManager- Parameters:
sess- sessionsponsoredMember- sponsored membersponsor- sponsornewValidity- new validity, can be set to null never expire- Throws:
PrivilegeException- insufficient permissionsSponsorshipDoesNotExistException- if the given user is not sponsor of the given memberMemberNotExistsException- if there is no such memberUserNotExistsException- if there is no such user
-
validateMemberAsync
public Member validateMemberAsync(PerunSession sess, Member member) throws PrivilegeException, MemberNotExistsException Description copied from interface:MembersManagerValidate all attributes for member and set member's status to VALID. This method runs asynchronously. It immediately return member with ORIGINAL status and after asynchronous validation successfully finishes it switch member's status to VALID. If validation ends with error, member keeps his status.- Specified by:
validateMemberAsyncin interfaceMembersManager- Parameters:
sess-member-- Returns:
- member with new status set
- Throws:
PrivilegeExceptionMemberNotExistsException
-