Class MembersManagerBlImpl
- All Implemented Interfaces:
MembersManagerBl
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canBeMember
(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 keyprotected boolean
canBeMemberInternal
(PerunSession sess, Vo vo, User user, String loa, boolean throwExceptions) More info on https://wiki.metacentrum.cz/wiki/VO_managers%27s_manualboolean
canBeMemberWithReason
(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 keyboolean
canExtendMembership
(PerunSession sess, Member member) Return true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false.boolean
canExtendMembershipWithReason
(PerunSession sess, Member member) Return true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise throws exception.void
checkMemberExists
(PerunSession sess, Member member) void
checkMemberLifecycleIsAlterable
(PerunSession sess, Member member) Throws exception if member is member of hierarchical vo but comes from its member vos.void
checkSponsoredUserData
(PerunSession sess, SponsoredUserData data) Checks, whether the provided data are valid according to the namespace rules, if the namespace is not null.convertMembersToRichMembers
(PerunSession sess, List<Member> members) Converts members to rich members.convertMembersToRichMembersNoUserAttributes
(PerunSession sess, List<RichMember> richMembers) Adds memberAttributes to rich members.convertMembersToRichMembersWithAttributes
(PerunSession sess, Group group, Resource resource, List<RichMember> richMembers, List<AttributeDefinition> attrsDef) Adds userAttributes and memberAttributes to rich members.convertMembersToRichMembersWithAttributes
(PerunSession sess, Group group, List<RichMember> richMembers, List<AttributeDefinition> attrsDef) Adds userAttributes and memberAttributes to rich members.convertMembersToRichMembersWithAttributes
(PerunSession sess, List<RichMember> richMembers) Adds userAttributes and memberAttributes to rich members.convertMembersToRichMembersWithAttributes
(PerunSession sess, List<RichMember> richMembers, Resource resource, List<AttributeDefinition> attrsDef) Adds userAttributes and memberAttributes to rich members.convertMembersToRichMembersWithAttributes
(PerunSession sess, List<RichMember> richMembers, List<AttributeDefinition> attrsDef) Adds userAttributes and memberAttributes to rich members.convertMembersToRichMembersWithAttributesBatch
(PerunSession sess, List<RichMember> richMembers, List<AttributeDefinition> attrsDef) Optimized variant ofconvertMembersToRichMembersWithAttribute
.convertUserToSponsor
(PerunSession sess, User user, Member sponsoredMember) Convert given User to the Sponsor object.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, List<Group> groups) Create new member from user by login and ExtSource.createMember
(PerunSession sess, Vo vo, SpecificUserType specificUserType, Candidate candidate) Creates a new member from candidate returned by the method VosManager.findCandidates which fills Candidate .userExtSource.createMember
(PerunSession sess, Vo vo, SpecificUserType specificUserType, Candidate candidate, List<Group> groups, List<String> overwriteUserAttributes) Creates a new member from candidate returned by the method VosManager.findCandidates which fills Candidate .userExtSource.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 loa, 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 loa, 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.createMemberSync
(PerunSession sess, Vo vo, Candidate candidate) Creates member.createMemberSync
(PerunSession sess, Vo vo, Candidate candidate, List<Group> groups) Creates member.createMemberSync
(PerunSession sess, Vo vo, Candidate candidate, List<Group> groups, List<String> overwriteUserAttributes) Creates member.createServiceMember
(PerunSession sess, Vo vo, Candidate candidate, List<User> owners) Creates a new member from candidate which is prepared for creating service user.createServiceMember
(PerunSession sess, Vo vo, Candidate candidate, List<User> specificUserOwners, List<Group> groups) Creates a new member from candidate which is prepared for creating service user.createSponsoredMember
(PerunSession sess, SponsoredUserData data, Vo vo, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url, Validation validation) Creates a new sponsored member.createSponsoredMembers
(PerunSession sess, Vo vo, String namespace, List<String> names, String email, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url, Validation validation) Creates new sponsored members.createSponsoredMembersFromCSV
(PerunSession sess, Vo vo, String namespace, List<String> data, String header, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url, Validation validation, List<Group> groups) Creates new sponsored members.void
deleteAllMembers
(PerunSession sess, Vo vo) Deletes all VO members.void
deleteMember
(PerunSession sess, Member member) Deletes only member data appropriated by member id.void
deleteMembers
(PerunSession sess, List<Member> members) Delete given members.disableMember
(PerunSession sess, Member member) Disable member.expireMember
(PerunSession sess, Member member) Set member's status to expired.extendExpirationForSponsoredMember
(PerunSession sess, Member sponsoredMember, User sponsorUser) Extends expiration date.void
extendMembership
(PerunSession sess, Member member) Extend member membership using membershipExpirationRules attribute defined at VO.filterOnlyAllowedAttributes
(PerunSession sess, RichMember richMember) For richMember filter all his user and member attributes and remove all which principal has no access to.filterOnlyAllowedAttributes
(PerunSession sess, List<RichMember> richMembers) For list of richMembers filter all their user and member attributes and remove all which principal has no access to.filterOnlyAllowedAttributes
(PerunSession sess, List<RichMember> richMembers, Group group, boolean useContext) For list of richMembers filter all their user and member attributes and remove all which principal has no access to.findCompleteRichMembers
(PerunSession sess, Group group, List<String> attrsNames, String searchString, boolean lookingInParentGroup) Return list of richMembers for specific group by the searchString with attributes 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 attributes 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 attributes 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 attributes specific for list of attrsNames and who have only status which is contain in list of statuses.findCompleteRichMembers
(PerunSession sess, List<String> attrsNames, String searchString) Return list of richMembers by the searchString with attributes specific for list of attrsNames.findCompleteRichMembers
(PerunSession sess, List<String> attrsNames, List<String> allowedStatuses, String searchString) Return list of richMembers by the searchString with attributes specific for list of attrsNames and who have only status which is contain in list of statuses.findMembers
(PerunSession sess, Vo vo, String searchString, boolean onlySponsored) Return list of members VO by specific string.findMembersByName
(PerunSession sess, String searchString) Return list of members by theirs name.findMembersByNameInVo
(PerunSession sess, Vo vo, String searchString) Return list of members by theirs name 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 theirs name or login or email under defined VO.findRichMembers
(PerunSession sess, String searchString, boolean onlySponsored) Return list of rich members by theirs name, id, uuid, login or emailfindRichMembersInVo
(PerunSession sess, Vo vo, String searchString, boolean onlySposnored) Return list of rich members by theirs name, id, uuid, login or email under defined VO.findRichMembersWithAttributes
(PerunSession sess, String searchString) Return list of rich members with attributes by theirs name or login or emailfindRichMembersWithAttributes
(PerunSession sess, String searchString, List<String> attrsNames) Return list of rich members with certain attributes by theirs name or login or email.findRichMembersWithAttributesInGroup
(PerunSession sess, Group group, String searchString) Return list of rich members with attributes by the searchString under defined Group.findRichMembersWithAttributesInGroup
(PerunSession sess, Group group, String searchString, List<String> attrsNames) Return list of rich members with certain attributes by the searchString under defined Group.findRichMembersWithAttributesInParentGroup
(PerunSession sess, Group group, String searchString) Return list of rich members with attributes by the searchString under parent group of defined Group.findRichMembersWithAttributesInVo
(PerunSession sess, Vo vo, String searchString) Return list of rich members with attributes by theirs name or login or email under defined VO.findRichMembersWithAttributesInVo
(PerunSession sess, Vo vo, String searchString, List<String> attrsNames, boolean onlySponsored) Return list of rich members with certain attributes by theirs name or login or email defined VO.getAllMembers
(PerunSession sess) Get all members from all vos.Return all loaded namespaces rules.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 attributes 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 attributes 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 attributes specific for list of attrsNames from the vo.getCompleteRichMembers
(PerunSession sess, Vo vo, List<String> attrsNames, List<String> allowedStatuses) Get all RichMembers with attributes 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 sourcegetMemberByUserExtSources
(PerunSession sess, Vo vo, List<UserExtSource> ueas) Get member by its external sources.getMemberByUserId
(PerunSession sess, Vo vo, int userId) Returns member by his userId.getMembers
(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) Return all VO Members of the User.getMembersByUsers
(PerunSession sess, List<User> users, Vo vo) Convert list of users into the list of members.getMembersByUsersIds
(PerunSession sess, List<Integer> usersIds, Vo vo) Convert list of users' ids into the list of members.getMembersByUserWithStatus
(PerunSession sess, User user, Status status) Return all VO Members of the User, which have specified Status in their VO.int
getMembersCount
(PerunSession sess, Vo vo) Get the VO members count.int
getMembersCount
(PerunSession sess, Vo vo, Status status) Returns number of Vo members with defined status.Gets the membersManagerImpl.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.getNamespaceRules
(String namespace) Get NamespaceRules for the namespace from the LoginNamespacesRulesConfigContainergetNewExtendMembership
(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 potential member of the VO.Gets the perunBl.getRichMember
(PerunSession sess, Member member) Get Member to RichMember with attributes.getRichMembers
(PerunSession sess, Group group) Get rich members for displaying on pages.getRichMembers
(PerunSession sess, Vo vo) Get rich members for displaying on pages.getRichMembers
(PerunSession sess, Vo vo, Status status) Get rich members who have the status, for displaying on pages.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.getRichMembersWithAttributes
(PerunSession sess, Group group, List<Member> members, List<AttributeDefinition> attrsDef) Get RichMembers with Attributes but only with selected attributes from list attrsDef and for specified members.getRichMembersWithAttributes
(PerunSession sess, Vo vo) Get rich members for displaying on pages.getRichMembersWithAttributes
(PerunSession sess, Vo vo, Status status) Get rich members who have the status, for displaying on pages.getRichMembersWithAttributes
(PerunSession sess, Vo vo, List<AttributeDefinition> attrsDef) Get RichMembers with Attributes but only with selected attributes from list attrsDef.getRichMembersWithAttributes
(PerunSession sess, List<String> allowedStatuses, Group group) Get rich members for displaying on pages.getRichMembersWithAttributesByNames
(PerunSession sess, Group group, Resource resource, List<String> attrsNames) Get RichMembers with Attributes but only with selected attributes from list attrsDef for 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 attrsNames 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, User user) Gets list of members that are sponsored by the user in all vos.getSponsoredMembers
(PerunSession sess, Vo vo) Gets list of sponsored members of a VO.getSponsoredMembers
(PerunSession sess, Vo vo, User user) Gets list of members that are sponsored by the user in the vo.getSponsoredRichMembers
(PerunSession sess, Vo vo) Get list of rich members that are sponsored in the VO.getSponsorship
(PerunSession sess, Member sponsoredMember, User sponsor) For the given member and user returns their sponsorship relation object.getSponsorshipsExpiringInRange
(PerunSession sess, LocalDate from, LocalDate to) Returns sponsorship, which have validityTo in range [from, to).getUnifiedMemberGroupStatus
(PerunSession sess, Member member, Resource resource) Returns unified result of MemberGroupStatus for specified member and resource.getUnifiedMemberGroupStatus
(PerunSession sess, User user, Facility facility) Returns unified result of MemberGroupStatus for specified user and facility.boolean
haveStatus
(PerunSession sess, Member member, Status status) Return true if member have specified status.void
insertToMemberGroup
(PerunSession sess, Member member, Vo vo) invalidateMember
(PerunSession sess, Member member) Set member status to invalid.boolean
isMemberAllowed
(PerunSession sess, Member member) Return false if member has status INVALID or DISABLED.manageMembershipExpiration
(PerunSession sess, Member member, boolean setAttributeValue, boolean throwExceptions) More info on https://wiki.metacentrum.cz/wiki/VO_managers%27s_manualvoid
moveMembership
(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.void
removeSponsor
(PerunSession sess, Member sponsoredMember, User sponsorToRemove) Removes a sponsor.retainMembersWithStatus
(PerunSession sess, List<Member> members, Status status) Retain only members with specified status.void
sendAccountActivationLinkEmail
(PerunSession sess, Member member, String namespace, String url, String mailAddress, String language) Send mail to user's preferred email address with link for non-authz account activation.void
sendPasswordResetLinkEmail
(PerunSession sess, Member member, String namespace, String url, String mailAddress, String language) Send mail to user's preferred email address with link for non-authz password reset.void
sendUsernameReminderEmail
(PerunSession sess, Member member, String namespace, String mailAddress, String language) Send mail to user's preferred email address with username for the given namespace.void
setOrganizationsAttributes
(PerunSession sess, Vo vo, Member member) Set memberOrganizations and memberOrganizationsHistory attributes for specific member.void
setPerunBl
(PerunBl perunBl) setSponsoredMember
(PerunSession session, SponsoredUserData data, Vo vo, User userToBeSponsored, User sponsor, LocalDate validityTo, Validation validation) Creates a sponsored membership for the given user.setSponsoredMember
(PerunSession session, Vo vo, User userToBeSponsored, String namespace, String password, User sponsor, Validation validation) Creates a sponsored membership for the given user.setSponsorshipForMember
(PerunSession session, Member sponsoredMember, User sponsor) Transform non-sponsored member to sponsored one with defined sponsorsetSponsorshipForMember
(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.boolean
someAvailableSponsorExistsForMember
(PerunSession sess, Member member) Checks if some vo sponsor who does not already sponsor given member exists.sponsorMember
(PerunSession session, Member sponsoredMember, User sponsor) Links sponsored member and sponsoring user.sponsorMember
(PerunSession session, Member sponsoredMember, User sponsor, LocalDate validityTo) Links sponsored member and sponsoring user.void
suspendMemberTo
(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.void
unsuspendMember
(PerunSession sess, Member member) Remove suspend state from Member - remove date to which member should be considered as suspended in the VO.updateMember
(PerunSession sess, Member member) Update member in underlaying data source.void
updateOrganizationsAttributes
(PerunSession sess, Vo vo, Member member) Update value of memberOrganizations or memberOrganizationsHistory attribute for specific member.void
updateSponsorshipValidity
(PerunSession sess, Member sponsoredMember, User sponsor, LocalDate newValidity) Update the sponsorship of given member for given sponsor.validateMember
(PerunSession sess, Member member) Validate all atributes for member and set member's status to VALID.void
validateMemberAsync
(PerunSession sess, Member member) Validate all attributes for member and then set member's status to VALID.
-
Field Details
-
SPONSORED_MEMBER_REQUIRED_FIELDS
-
SPONSORED_MEMBER_ADDITIONAL_FIELDS
-
-
Constructor Details
-
MembersManagerBlImpl
Constructor.
-
-
Method Details
-
canBeMember
Description copied from interface:MembersManagerBl
Checks if the user can apply membership to the VO, it decides based on extendMembershipRules on the doNotAllowLoa key- Specified by:
canBeMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-user
-loa
-- Returns:
- true if user can be apply for membership to the VO
-
canBeMemberInternal
protected boolean canBeMemberInternal(PerunSession sess, Vo vo, User user, String loa, boolean throwExceptions) throws ExtendMembershipException More info on https://wiki.metacentrum.cz/wiki/VO_managers%27s_manualCheck if the user can apply for VO membership. VO restrictions doesn't apply to service users.
- Parameters:
sess
- sessvo
- VO to apply foruser
- User applying for membershiploa
- level of assurance provided by user's external identitythrowExceptions
- TRUE = throw exceptions / FALSE = return false when user can't be member of VO- Returns:
- True if user can become member of VO / false or exception otherwise.
- Throws:
ExtendMembershipException
- When user can't be member of VO and throwExceptions is set to trueInternalErrorException
-
canBeMemberWithReason
public boolean canBeMemberWithReason(PerunSession sess, Vo vo, User user, String loa) throws ExtendMembershipException Description copied from interface:MembersManagerBl
Checks if the user can apply membership to the VO, it decides based on extendMembershipRules on the doNotAllowLoa key- Specified by:
canBeMemberWithReason
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-user
-loa
-- Returns:
- true if user can be apply for membership to the VO, exception with reason otherwise
- Throws:
ExtendMembershipException
-
canExtendMembership
Description copied from interface:MembersManagerBl
Return true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false.- Specified by:
canExtendMembership
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Returns:
- true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise false
-
canExtendMembershipWithReason
public boolean canExtendMembershipWithReason(PerunSession sess, Member member) throws ExtendMembershipException Description copied from interface:MembersManagerBl
Return true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise throws exception.- Specified by:
canExtendMembershipWithReason
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Returns:
- true if the membership can be extended or if no rules were set for the membershipExpiration, otherwise throws exception with reason
- Throws:
ExtendMembershipException
-
checkMemberExists
- Specified by:
checkMemberExists
in interfaceMembersManagerBl
- Throws:
MemberNotExistsException
-
checkMemberLifecycleIsAlterable
public void checkMemberLifecycleIsAlterable(PerunSession sess, Member member) throws MemberLifecycleAlteringForbiddenException Description copied from interface:MembersManagerBl
Throws exception if member is member of hierarchical vo but comes from its member vos.- Specified by:
checkMemberLifecycleIsAlterable
in interfaceMembersManagerBl
- Parameters:
sess
- sessionmember
- member- Throws:
MemberLifecycleAlteringForbiddenException
- member comes from hierarchical vo
-
checkSponsoredUserData
public void checkSponsoredUserData(PerunSession sess, SponsoredUserData data) throws InvalidSponsoredUserDataException, NamespaceRulesNotExistsException Description copied from interface:MembersManagerBl
Checks, whether the provided data are valid according to the namespace rules, if the namespace is not null.- Specified by:
checkSponsoredUserData
in interfaceMembersManagerBl
- Parameters:
sess
- sessiondata
- data to be checked- Throws:
InvalidSponsoredUserDataException
- if the data are not validNamespaceRulesNotExistsException
- if there are no namespace rules for the given namespace
-
convertMembersToRichMembers
Converts members to rich members. Rich member object contains user, member, userExtSources, userAttributes, memberAttributes. The method returns list of rich members with user and userExtSources filled. UserAttributes and memberAttributes are set to null.- Specified by:
convertMembersToRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-members
-- Returns:
- list of rich members, empty list if empty list of members is passed
- Throws:
InternalErrorException
-
convertMembersToRichMembersNoUserAttributes
public List<RichMember> convertMembersToRichMembersNoUserAttributes(PerunSession sess, List<RichMember> richMembers) Adds memberAttributes to rich members. The method returns list of rich members with memberAttributes filled.- Specified by:
convertMembersToRichMembersNoUserAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-richMembers
-- Returns:
- list of rich members with memberAttributes filled
- Throws:
InternalErrorException
-
convertMembersToRichMembersWithAttributes
public List<RichMember> convertMembersToRichMembersWithAttributes(PerunSession sess, List<RichMember> richMembers) Adds userAttributes and memberAttributes to rich members. The method returns list of rich members with userAttributes and memberAttributes filled.- Specified by:
convertMembersToRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-richMembers
-- Returns:
- list of rich members with userAttributes and memberAttributes filled
- Throws:
InternalErrorException
-
convertMembersToRichMembersWithAttributes
public List<RichMember> convertMembersToRichMembersWithAttributes(PerunSession sess, List<RichMember> richMembers, List<AttributeDefinition> attrsDef) Adds userAttributes and memberAttributes to rich members. Attributes are limited by the list of attributes definitions. The method returns list of rich members with userAttributes and memberAttributes filled.- Specified by:
convertMembersToRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-richMembers
-attrsDef
-- Returns:
- list of rich members with userAttributes and memberAttributes filled
- Throws:
InternalErrorException
-
convertMembersToRichMembersWithAttributes
public List<RichMember> convertMembersToRichMembersWithAttributes(PerunSession sess, List<RichMember> richMembers, Resource resource, List<AttributeDefinition> attrsDef) throws MemberResourceMismatchException Adds userAttributes and memberAttributes to rich members. Specifically adds attributes that are associated with the members and the resource. Attributes are also limited by the list of attributes definitions. Adds member and member-resource attributes to memberAttributes and user and user-facility attributes to userAttributes. The method returns list of rich members with userAttributes and memberAttributes filled.- Specified by:
convertMembersToRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-richMembers
-resource
-attrsDef
-- Returns:
- list of rich members with userAttributes and memberAttributes filled
- Throws:
InternalErrorException
WrongAttributeAssignmentException
MemberResourceMismatchException
-
convertMembersToRichMembersWithAttributes
public List<RichMember> convertMembersToRichMembersWithAttributes(PerunSession sess, Group group, List<RichMember> richMembers, List<AttributeDefinition> attrsDef) throws MemberGroupMismatchException Adds userAttributes and memberAttributes to rich members. Specifically adds attributes that are associated with the members and the group. Attributes are also limited by the list of attributes definitions. Adds member and member-group attributes to memberAttributes and user attributes to userAttributes. The method returns list of rich members with userAttributes and memberAttributes filled.- Parameters:
sess
-group
-richMembers
-attrsDef
-- Returns:
- list of rich members with userAttributes and memberAttributes filled
- Throws:
InternalErrorException
MemberGroupMismatchException
-
convertMembersToRichMembersWithAttributes
public List<RichMember> convertMembersToRichMembersWithAttributes(PerunSession sess, Group group, Resource resource, List<RichMember> richMembers, List<AttributeDefinition> attrsDef) throws MemberResourceMismatchException, GroupResourceMismatchException, MemberGroupMismatchException Adds userAttributes and memberAttributes to rich members. Specifically adds attributes that are associated with the members, the group and the resource. Attributes are also limited by the list of attributes definitions. Adds member, member-group and member-resource attributes to memberAttributes and user and user-facility attributes to userAttributes. The method returns list of rich members with userAttributes and memberAttributes filled.- Parameters:
sess
-group
-resource
-richMembers
-attrsDef
-- Returns:
- list of rich members with userAttributes and memberAttributes filled
- Throws:
InternalErrorException
GroupResourceMismatchException
MemberResourceMismatchException
MemberGroupMismatchException
-
convertMembersToRichMembersWithAttributesBatch
public List<RichMember> convertMembersToRichMembersWithAttributesBatch(PerunSession sess, List<RichMember> richMembers, List<AttributeDefinition> attrsDef) Description copied from interface:MembersManagerBl
Optimized variant ofconvertMembersToRichMembersWithAttribute
. Fetches the def/opt user and member attributes in batch methods. Any missing attributes for each member are added with null values (meaning their value was not present in the db). For other (virt, core, core-managed) attributes the usual convertMembersToRichMembersWithAttribute method is called. The method is supposed to be used when a large amount of def attributes needs to be retrieved efficiently.- Specified by:
convertMembersToRichMembersWithAttributesBatch
in interfaceMembersManagerBl
- Parameters:
sess
-richMembers
-attrsDef
-- Returns:
- list of rich members with userAttributes and memberAttributes filled
-
convertUserToSponsor
Description copied from interface:MembersManagerBl
Convert given User to the Sponsor object. For the sponsor object, there is loaded information about the sponsorship. Also, if the given user is a RichUser, all of its attributes and userExtSources are also set to the sponsor object.- Specified by:
convertUserToSponsor
in interfaceMembersManagerBl
- Parameters:
sess
- sessionuser
- a User or a RichUser objectsponsoredMember
- member, to which the sponsorship information is loaded- Returns:
- Sponsor object created from given user object with addition info about sponsorship for the given member.
-
createMember
public Member createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, String login, Candidate candidate) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates a new member and sets all member's attributes from the candidate. It can be called in synchronous or asynchronous mode 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:
createMember
in interfaceMembersManagerBl
- 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:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
-
createMember
public Member createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, String login, Candidate candidate, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates a new member and sets all member's attributes from the candidate. It can be called in synchronous or asynchronous mode 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:
createMember
in interfaceMembersManagerBl
- 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:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
-
createMember
public Member createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, int loa, String login, Candidate candidate) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates 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:
createMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-extSourceName
- name of the extSourceextSourceType
- type of the extSource (e.g. cz.metacentrum.perun.core.impl.ExtSourceIdp)loa
- level of assurancelogin
- user's login within extSourcecandidate
-- Returns:
- newly created member, who has set all his/her attributes
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
-
createMember
public Member createMember(PerunSession sess, Vo vo, String extSourceName, String extSourceType, int loa, String login, Candidate candidate, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates 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:
createMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-extSourceName
- name of the extSourceextSourceType
- type of the extSource (e.g. cz.metacentrum.perun.core.impl.ExtSourceIdp)loa
- 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:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
-
createMember
public Member createMember(PerunSession sess, Vo vo, Candidate candidate) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates 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:
createMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-candidate
-- Returns:
- newly created members
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
- See Also:
-
createMember
public Member createMember(PerunSession sess, Vo vo, Candidate candidate, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates 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:
createMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-candidate
-groups
- list of groups where member will be added too- Returns:
- newly created members
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
- See Also:
-
createMember
public Member createMember(PerunSession sess, Vo vo, SpecificUserType specificUserType, Candidate candidate) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates 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:
createMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-specificUserType
- (Normal or service or sponsored)candidate
-- Returns:
- newly created members
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
- See Also:
-
createMember
public Member createMember(PerunSession sess, Vo vo, SpecificUserType specificUserType, Candidate candidate, List<Group> groups, List<String> overwriteUserAttributes) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates 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:
createMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-specificUserType
- (Normal or service or sponsored)candidate
-groups
- list of groups where member will be added toooverwriteUserAttributes
- list of user attributes names which will be overwrite instead of merged- Returns:
- newly created members
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
- See Also:
-
createMember
public Member createMember(PerunSession sess, Vo vo, User user) throws AlreadyMemberException, ExtendMembershipException, WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:MembersManagerBl
Creates a new member from user. This method runs asynchronously- Specified by:
createMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-user
-- Returns:
- newly created member
- Throws:
AlreadyMemberException
ExtendMembershipException
WrongAttributeValueException
WrongReferenceAttributeValueException
-
createMember
public Member createMember(PerunSession sess, Vo vo, User user, List<Group> groups) throws AlreadyMemberException, ExtendMembershipException, WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:MembersManagerBl
Creates a new member from user.Also add this member to groups in list. This method runs asynchronously
- Specified by:
createMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-user
-groups
- list of groups where member will be added too- Returns:
- newly created member
- Throws:
AlreadyMemberException
ExtendMembershipException
WrongAttributeValueException
WrongReferenceAttributeValueException
-
createMember
public Member createMember(PerunSession sess, Vo vo, ExtSource extSource, String login, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Create new member from user by login and ExtSource.Also add this member to groups in list. This method runs asynchronously
- Specified by:
createMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-extSource
-login
-groups
- list of groups where member will be added too- Returns:
- newly created member
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
-
createMemberSync
public Member createMemberSync(PerunSession sess, Vo vo, Candidate candidate) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates member. Runs synchronously.- Specified by:
createMemberSync
in interfaceMembersManagerBl
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
- See Also:
-
createMemberSync
public Member createMemberSync(PerunSession sess, Vo vo, Candidate candidate, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates member. Runs synchronously. Add member also to all groups in list.- Specified by:
createMemberSync
in interfaceMembersManagerBl
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
- See Also:
-
createMemberSync
public Member createMemberSync(PerunSession sess, Vo vo, Candidate candidate, List<Group> groups, List<String> overwriteUserAttributes) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates member. Runs synchronously. Add member also to all groups in list.- Specified by:
createMemberSync
in interfaceMembersManagerBl
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
- See Also:
-
createServiceMember
public Member createServiceMember(PerunSession sess, Vo vo, Candidate candidate, List<User> owners) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates a new member from candidate which is prepared for creating service user. In list specificUserOwners can't be service user, only normal users are allowed. This method runs WITHOUT synchronization. If validation is needed, need to call concrete validateMember method (validateMemberAsync recommended).- Specified by:
createServiceMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-candidate
- prepared future specificUserowners
- list of users who own the service (can't be empty or contain specific user)- Returns:
- newly created member (of service User)
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
-
createServiceMember
public Member createServiceMember(PerunSession sess, Vo vo, Candidate candidate, List<User> specificUserOwners, List<Group> groups) throws WrongAttributeValueException, WrongReferenceAttributeValueException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
Creates a new member from candidate which is prepared for creating service user. In list specificUserOwners can't be service user, only normal 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:
createServiceMember
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-candidate
- prepared future specificUserspecificUserOwners
- list of users who own the service user (can't be empty or contain service user)groups
- list of groups where member will be added too- Returns:
- newly created member (of specific User)
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
AlreadyMemberException
ExtendMembershipException
-
createSponsoredMember
public Member createSponsoredMember(PerunSession sess, SponsoredUserData data, Vo vo, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url, Validation validation) throws AlreadyMemberException, LoginNotExistsException, PasswordCreationFailedException, ExtendMembershipException, WrongAttributeValueException, ExtSourceNotExistsException, WrongReferenceAttributeValueException, UserNotInRoleException, InvalidLoginException, AlreadySponsorException, InvalidSponsoredUserDataException, NamespaceRulesNotExistsException, PasswordStrengthException Description copied from interface:MembersManagerBl
Creates a new sponsored member.- Specified by:
createSponsoredMember
in interfaceMembersManagerBl
- Parameters:
sess
- perun sessiondata
- 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 organizationsponsor
- 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 Instancevalidation
- Type of members validation, when using Validation.ASYNC do not call this method in a cycle!- Returns:
- created member
- Throws:
AlreadyMemberException
LoginNotExistsException
PasswordCreationFailedException
ExtendMembershipException
WrongAttributeValueException
ExtSourceNotExistsException
WrongReferenceAttributeValueException
UserNotInRoleException
- if the member is not in required roleAlreadySponsorException
InvalidLoginException
InvalidSponsoredUserDataException
NamespaceRulesNotExistsException
PasswordStrengthException
-
createSponsoredMembers
public List<Map<String,String>> createSponsoredMembers(PerunSession sess, Vo vo, String namespace, List<String> names, String email, User sponsor, LocalDate validityTo, boolean sendActivationLink, String language, String url, Validation validation) Description copied from interface:MembersManagerBl
Creates new sponsored members.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:
createSponsoredMembers
in interfaceMembersManagerBl
- Parameters:
sess
- perun sessionvo
- virtual organization to created sponsored members innamespace
- used for selecting external system in which guest user account will be creatednames
- 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 usersendActivationLink
- 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 Instancevalidation
- Type of members validation, when ASYNC do not call this method in a cycle!- Returns:
- list of maps of name, status, login and password
-
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, Validation validation, List<Group> groups) Description copied from interface:MembersManagerBl
Creates new sponsored members.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:
createSponsoredMembersFromCSV
in interfaceMembersManagerBl
- 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 Instancevalidation
- Type of members validation, when ASYNC do not call this method in a cycle!groups
- groups, to which will be the created users assigned- Returns:
- list of maps of name, status, login and password
-
deleteAllMembers
Description copied from interface:MembersManagerBl
Deletes all VO members.- Specified by:
deleteAllMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-- Throws:
MemberAlreadyRemovedException
-
deleteMember
Description copied from interface:MembersManagerBl
Deletes only member data appropriated by member id.- Specified by:
deleteMember
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Throws:
MemberAlreadyRemovedException
-
deleteMembers
public void deleteMembers(PerunSession sess, List<Member> members) throws MemberAlreadyRemovedException Description copied from interface:MembersManagerBl
Delete given members. It is possible to delete members from multiple vos.- Specified by:
deleteMembers
in interfaceMembersManagerBl
- Parameters:
sess
- sessionmembers
- members that will be deleted- Throws:
MemberAlreadyRemovedException
- if already removed
-
disableMember
Description copied from interface:MembersManagerBl
Disable member.As side effect, on success will change status of the object member.
- Specified by:
disableMember
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Returns:
- member with new status set
- Throws:
MemberNotValidYetException
-
expireMember
public Member expireMember(PerunSession sess, Member member) throws WrongReferenceAttributeValueException, WrongAttributeValueException Description copied from interface:MembersManagerBl
Set member's status to expired. All attributes are validated if was in INVALID or DISABLED state before. If validation ends with error, member keeps his old status.Method runs in nested transaction. As side effect, on success will change status of the object member.
- Specified by:
expireMember
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Returns:
- member with new status set
- Throws:
WrongReferenceAttributeValueException
WrongAttributeValueException
-
extendExpirationForSponsoredMember
public String extendExpirationForSponsoredMember(PerunSession sess, Member sponsoredMember, User sponsorUser) Description copied from interface:MembersManagerBl
Extends expiration date. Sponsored members cannot apply for membership extension, this method allows a sponsor to extend it.- Specified by:
extendExpirationForSponsoredMember
in interfaceMembersManagerBl
- Parameters:
sess
- perun sessionsponsoredMember
- member which is sponsoredsponsorUser
- sponsoring user or null for the caller- Returns:
- new expiration date
-
extendMembership
Description copied from interface:MembersManagerBl
Extend member membership using membershipExpirationRules attribute defined at VO.- Specified by:
extendMembership
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Throws:
ExtendMembershipException
-
filterOnlyAllowedAttributes
Description copied from interface:MembersManagerBl
For richMember filter all his user and member attributes and remove all which principal has no access to.- Specified by:
filterOnlyAllowedAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-richMember
-- Returns:
- richMember with only allowed attributes
-
filterOnlyAllowedAttributes
public List<RichMember> filterOnlyAllowedAttributes(PerunSession sess, List<RichMember> richMembers) Description copied from interface:MembersManagerBl
For list of richMembers filter all their user and member attributes and remove all which principal has no access to.- Specified by:
filterOnlyAllowedAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-richMembers
-- Returns:
- list of richMembers with only allowed attributes
-
filterOnlyAllowedAttributes
public List<RichMember> filterOnlyAllowedAttributes(PerunSession sess, List<RichMember> richMembers, Group group, boolean useContext) Description copied from interface:MembersManagerBl
For list of richMembers filter all their user and member attributes and remove all which principal has no access to.Context means that voId for all members is same (rules can be same for all members in list)
if useContext is true: every attribute is unique in context of friendlyName, which means more attributes for more members have same rules if friendly name is same for all of them (better performance, worse authorization check) if useContext is false: every attribute is unique in context of member, which means every attribute for more members need to be check separately, because for example members can be from different vos (better authorization check, worse performance)
- Specified by:
filterOnlyAllowedAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-richMembers
- list of richMembers for which attributes need to be filteredgroup
-useContext
- true or false means using context or not using context (more above in javadoc)- Returns:
- list of richMembers with only allowed attributes
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames, String searchString, boolean onlySponsored) Description copied from interface:MembersManagerBl
Return list of richMembers for specific vo by the searchString with attributes specific for list of attrsNames. If attrsNames is empty or null return all attributes for specific richMembers.- Specified by:
findCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-attrsNames
-searchString
-onlySponsored
- return only sponsored members- Returns:
- list of founded richMembers with specific attributes from Vo for searchString
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, List<String> attrsNames, String searchString) Description copied from interface:MembersManagerBl
Return list of richMembers by the searchString with attributes specific for list of attrsNames. If attrsNames is empty or null return all attributes for specific richMembers.- Specified by:
findCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-attrsNames
-searchString
-- Returns:
- list of founded richMembers with specific attributes from Vo for searchString
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames, List<String> allowedStatuses, String searchString) Description copied from interface:MembersManagerBl
Return list of richMembers for specific vo by the searchString with attributes 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:
findCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-attrsNames
-allowedStatuses
-searchString
-- Returns:
- list of founded richMembers with specific attributes from Vo for searchString with allowed statuses
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, List<String> attrsNames, List<String> allowedStatuses, String searchString) Description copied from interface:MembersManagerBl
Return list of richMembers by the searchString with attributes 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:
findCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-attrsNames
-allowedStatuses
-searchString
-- Returns:
- list of founded richMembers with specific attributes by searchString with allowed statuses
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, String searchString, boolean lookingInParentGroup) throws ParentGroupNotExistsException Description copied from interface:MembersManagerBl
Return list of richMembers for specific group by the searchString with attributes 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:
findCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-group
-attrsNames
-searchString
-lookingInParentGroup
-- Returns:
- list of founded richMembers with specific attributes from Group for searchString
- Throws:
ParentGroupNotExistsException
-
findCompleteRichMembers
public List<RichMember> findCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, List<String> allowedStatuses, List<String> allowedGroupStatuses, String searchString, boolean lookingInParentGroup) throws ParentGroupNotExistsException Description copied from interface:MembersManagerBl
Return list of richMembers for specific group by the searchString with attributes 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:
findCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-group
-attrsNames
-allowedStatuses
-allowedGroupStatuses
-searchString
-lookingInParentGroup
-- Returns:
- list of founded richMembers with specific attributes from Group for searchString
- Throws:
ParentGroupNotExistsException
-
findMembers
public List<Member> findMembers(PerunSession sess, Vo vo, String searchString, boolean onlySponsored) Description copied from interface:MembersManagerBl
Return list of members VO by specific string. All searches are case insensitive. Looking for searchString in member mail, user preferredMail, logins, name, IDs (user and member) and user UUID. If parameter onlySponsored is true, it will return only sponsored members by searchString. If vo is null, looking for any members in whole Perun. If vo is not null, looking only in specific VO.invalid input: '<'- Specified by:
findMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
- for which searching will be filtered, if null there is no filter for vosearchString
- it will be looking for this search string in the specific parameters in DBonlySponsored
- it will return only sponsored members in vo- Returns:
- all members from specific VO by specific string
-
findMembersByName
Description copied from interface:MembersManagerBl
Return list of members by theirs name.- Specified by:
findMembersByName
in interfaceMembersManagerBl
- Parameters:
sess
-searchString
-- Returns:
- list of members
-
findMembersByNameInVo
Description copied from interface:MembersManagerBl
Return list of members by theirs name under defined VO.- Specified by:
findMembersByNameInVo
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-searchString
-- Returns:
- list of members
-
findMembersInGroup
Description copied from interface:MembersManagerBl
Return list of members by the searchString under defined Group. Search is done in name, email and login.- Specified by:
findMembersInGroup
in interfaceMembersManagerBl
- Parameters:
sess
-group
-searchString
-- Returns:
- list of members
-
findMembersInParentGroup
Description copied from interface:MembersManagerBl
Return list of members by the searchString udner parentGroup of defined Group. Search is done in name, email and login. If the group is top-level group, searching in "members" group of vo in which the group exists.- Specified by:
findMembersInParentGroup
in interfaceMembersManagerBl
- Parameters:
sess
-group
- this group is used to get parent group, we are searching members of the parent groupsearchString
-- Returns:
-
findMembersInVo
Description copied from interface:MembersManagerBl
Return list of members by theirs name or login or email under defined VO.- Specified by:
findMembersInVo
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-searchString
-- Returns:
- list of members
-
findRichMembers
public List<RichMember> findRichMembers(PerunSession sess, String searchString, boolean onlySponsored) Description copied from interface:MembersManagerBl
Return list of rich members by theirs name, id, uuid, login or email- Specified by:
findRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-searchString
-onlySponsored
- return only sponsored members- Returns:
- list of rich members
-
findRichMembersInVo
public List<RichMember> findRichMembersInVo(PerunSession sess, Vo vo, String searchString, boolean onlySposnored) Description copied from interface:MembersManagerBl
Return list of rich members by theirs name, id, uuid, login or email under defined VO.- Specified by:
findRichMembersInVo
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-searchString
-onlySposnored
- return only sponsored members- Returns:
- list of rich members
-
findRichMembersWithAttributes
public List<RichMember> findRichMembersWithAttributes(PerunSession sess, String searchString, List<String> attrsNames) Description copied from interface:MembersManagerBl
Return list of rich members with certain attributes by theirs name or login or email.- Specified by:
findRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
- sessionsearchString
- search stringattrsNames
- list of attribute names that should be found- Returns:
- list of rich members with certain attributes
-
findRichMembersWithAttributes
Description copied from interface:MembersManagerBl
Return list of rich members with attributes by theirs name or login or email- Specified by:
findRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-searchString
-- Returns:
- list of rich members with attributes
-
findRichMembersWithAttributesInGroup
public List<RichMember> findRichMembersWithAttributesInGroup(PerunSession sess, Group group, String searchString, List<String> attrsNames) Description copied from interface:MembersManagerBl
Return list of rich members with certain attributes by the searchString under defined Group. Search is done in name, email and login.- Specified by:
findRichMembersWithAttributesInGroup
in interfaceMembersManagerBl
- Parameters:
sess
- sessiongroup
- groupsearchString
- search stringattrsNames
- list of attributes that should be found- Returns:
- list of rich members with certain attributes
-
findRichMembersWithAttributesInGroup
public List<RichMember> findRichMembersWithAttributesInGroup(PerunSession sess, Group group, String searchString) Description copied from interface:MembersManagerBl
Return list of rich members with attributes by the searchString under defined Group. Search is done in name, email and login.- Specified by:
findRichMembersWithAttributesInGroup
in interfaceMembersManagerBl
- Parameters:
sess
-group
-searchString
-- Returns:
-
findRichMembersWithAttributesInParentGroup
public List<RichMember> findRichMembersWithAttributesInParentGroup(PerunSession sess, Group group, String searchString) Description copied from interface:MembersManagerBl
Return list of rich members with attributes by the searchString under parent group of defined Group. Search is done in name, email and login.- Specified by:
findRichMembersWithAttributesInParentGroup
in interfaceMembersManagerBl
- Parameters:
sess
-group
- this group is used to get parent group, we are searching members of the parent groupsearchString
-- Returns:
-
findRichMembersWithAttributesInVo
public List<RichMember> findRichMembersWithAttributesInVo(PerunSession sess, Vo vo, String searchString, List<String> attrsNames, boolean onlySponsored) Description copied from interface:MembersManagerBl
Return list of rich members with certain attributes by theirs name or login or email defined VO.- Specified by:
findRichMembersWithAttributesInVo
in interfaceMembersManagerBl
- Parameters:
sess
- sessionvo
- vosearchString
- search stringattrsNames
- list of attribute names that should be foundonlySponsored
- return only sponsored members- Returns:
- list of rich members with certain attributes
-
findRichMembersWithAttributesInVo
public List<RichMember> findRichMembersWithAttributesInVo(PerunSession sess, Vo vo, String searchString) Description copied from interface:MembersManagerBl
Return list of rich members with attributes by theirs name or login or email under defined VO.- Specified by:
findRichMembersWithAttributesInVo
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-searchString
-- Returns:
- list of rich members with attributes
-
getAllMembers
Description copied from interface:MembersManagerBl
Get all members from all vos.- Specified by:
getAllMembers
in interfaceMembersManagerBl
- Parameters:
sess
- session- Returns:
- list of all members from all Vos.
-
getAllNamespacesRules
Description copied from interface:MembersManagerBl
Return all loaded namespaces rules.- Specified by:
getAllNamespacesRules
in interfaceMembersManagerBl
- Returns:
- all namespaces rules
-
getCompleteRichMembers
public List<RichMember> getCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames) throws AttributeNotExistsException Description copied from interface:MembersManagerBl
Get all RichMembers with attributes specific for list of attrsNames from the vo. If attrsNames is empty or null return all attributes for specific richMembers.- Specified by:
getCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-attrsNames
-- Returns:
- list of richMembers with specific attributes from Vo
- Throws:
AttributeNotExistsException
-
getCompleteRichMembers
public List<RichMember> getCompleteRichMembers(PerunSession sess, Vo vo, List<String> attrsNames, List<String> allowedStatuses) throws AttributeNotExistsException Description copied from interface:MembersManagerBl
Get all RichMembers with attributes 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:
getCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-attrsNames
-allowedStatuses
-- Returns:
- list of richMembers with specific attributes from Vo
- Throws:
AttributeNotExistsException
-
getCompleteRichMembers
public List<RichMember> getCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, boolean lookingInParentGroup) throws AttributeNotExistsException, ParentGroupNotExistsException Description copied from interface:MembersManagerBl
Get all RichMembers with attributes 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:
getCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-group
-attrsNames
-lookingInParentGroup
-- Returns:
- list of richMembers with specific attributes from group
- Throws:
AttributeNotExistsException
ParentGroupNotExistsException
-
getCompleteRichMembers
public List<RichMember> getCompleteRichMembers(PerunSession sess, Group group, List<String> attrsNames, List<String> allowedStatuses, List<String> allowedGroupStatuses, boolean lookingInParentGroup) throws AttributeNotExistsException, ParentGroupNotExistsException Description copied from interface:MembersManagerBl
Get all RichMembers with attributes 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:
getCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-group
-attrsNames
-allowedStatuses
-allowedGroupStatuses
-lookingInParentGroup
-- Returns:
- list of richMembers with specific attributes from group
- Throws:
AttributeNotExistsException
ParentGroupNotExistsException
-
getCompleteRichMembers
public List<RichMember> getCompleteRichMembers(PerunSession sess, Group group, Resource resource, List<String> attrsNames, List<String> allowedStatuses) throws AttributeNotExistsException, GroupResourceMismatchException Description copied from interface:MembersManagerBl
Get 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:
getCompleteRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-group
-resource
-attrsNames
-allowedStatuses
-- Returns:
- list of richMembers with specific attributes
- Throws:
AttributeNotExistsException
GroupResourceMismatchException
-
getMemberByExtSourceNameAndExtLogin
public Member getMemberByExtSourceNameAndExtLogin(PerunSession sess, Vo vo, String extSourceName, String extLogin) throws ExtSourceNotExistsException, UserExtSourceNotExistsException, MemberNotExistsException, UserNotExistsException Description copied from interface:MembersManagerBl
Get member by extSourceName, extSourceLogin and Vo- Specified by:
getMemberByExtSourceNameAndExtLogin
in interfaceMembersManagerBl
- Parameters:
sess
-vo
- Vo where we are looking for memberextSourceName
- name of extSourceextLogin
- login of user in extSource- Returns:
- member
- Throws:
ExtSourceNotExistsException
UserExtSourceNotExistsException
MemberNotExistsException
UserNotExistsException
-
getMemberById
Description copied from interface:MembersManagerBl
Returns member by his id.- Specified by:
getMemberById
in interfaceMembersManagerBl
- Parameters:
sess
-id
-- Returns:
- member
- Throws:
MemberNotExistsException
-
getMemberByUser
Description copied from interface:MembersManagerBl
Returns member by his user and vo.- Specified by:
getMemberByUser
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-user
-- Returns:
- member
- Throws:
MemberNotExistsException
-
getMemberByUserExtSource
public Member getMemberByUserExtSource(PerunSession sess, Vo vo, UserExtSource uea) throws MemberNotExistsException Description copied from interface:MembersManagerBl
Find member of this Vo by his login in external source- Specified by:
getMemberByUserExtSource
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-uea
-- Returns:
- selected user or throws in case the requested member doesn't exists in this Vo
- Throws:
MemberNotExistsException
-
getMemberByUserExtSources
public Member getMemberByUserExtSources(PerunSession sess, Vo vo, List<UserExtSource> ueas) throws MemberNotExistsException Description copied from interface:MembersManagerBl
Get member by its external sources. If the given sources do not belong to a single member and exception is thrown.- Specified by:
getMemberByUserExtSources
in interfaceMembersManagerBl
- Parameters:
sess
- sessionvo
- voueas
- ues- Returns:
- member
- Throws:
MemberNotExistsException
- member does not exist
-
getMemberByUserId
public Member getMemberByUserId(PerunSession sess, Vo vo, int userId) throws MemberNotExistsException Description copied from interface:MembersManagerBl
Returns member by his userId.- Specified by:
getMemberByUserId
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-userId
-- Returns:
- member
- Throws:
MemberNotExistsException
-
getMemberVo
Description copied from interface:MembersManagerBl
Get the member VO.- Specified by:
getMemberVo
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Returns:
- member's VO
-
getMembers
Description copied from interface:MembersManagerBl
Get all VO members.- Specified by:
getMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-- Returns:
- all members of the VO
-
getMembers
Description copied from interface:MembersManagerBl
Get all VO members who have the status.- Specified by:
getMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-status
- get only members who have this status. If status is null return all members.- Returns:
- all members of the VO
-
getMembersByIds
Description copied from interface:MembersManagerBl
Returns members by their ids.- Specified by:
getMembersByIds
in interfaceMembersManagerBl
- Parameters:
sess
-ids
-- Returns:
- list of members with specified ids
-
getMembersByUser
Description copied from interface:MembersManagerBl
Return all VO Members of the User.- Specified by:
getMembersByUser
in interfaceMembersManagerBl
- Parameters:
sess
-user
-- Returns:
- List of Members
-
getMembersByUserWithStatus
Description copied from interface:MembersManagerBl
Return all VO Members of the User, which have specified Status in their VO.- Specified by:
getMembersByUserWithStatus
in interfaceMembersManagerBl
- Parameters:
sess
-user
-status
-- Returns:
- List of Members
-
getMembersByUsers
Description copied from interface:MembersManagerBl
Convert list of users into the list of members.- Specified by:
getMembersByUsers
in interfaceMembersManagerBl
- Parameters:
sess
-users
-vo
-- Returns:
- list of members
-
getMembersByUsersIds
Description copied from interface:MembersManagerBl
Convert list of users' ids into the list of members.- Specified by:
getMembersByUsersIds
in interfaceMembersManagerBl
- Parameters:
sess
-usersIds
-vo
-- Returns:
- list of members
-
getMembersCount
Description copied from interface:MembersManagerBl
Get the VO members count.- Specified by:
getMembersCount
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-- Returns:
- count of VO members
-
getMembersCount
Description copied from interface:MembersManagerBl
Returns number of Vo members with defined status.- Specified by:
getMembersCount
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-status
-- Returns:
- number of members
-
getMembersManagerImpl
Gets the membersManagerImpl.- Returns:
- The membersManagerImpl.
-
getMembersPage
public Paginated<RichMember> getMembersPage(PerunSession sess, Vo vo, MembersPageQuery query, List<String> attrNames) throws PolicyNotExistsException Description copied from interface:MembersManagerBl
Get page of members from the given vo, with the given attributes.- Specified by:
getMembersPage
in interfaceMembersManagerBl
- Parameters:
sess
- sessionvo
- voquery
- query with page informationattrNames
- attribute names- Returns:
- page of requested rich members
- Throws:
PolicyNotExistsException
-
getMembersPage
public Paginated<RichMember> getMembersPage(PerunSession sess, Vo vo, MembersPageQuery query, List<String> attrNames, String policy) throws PolicyNotExistsException Description copied from interface:MembersManagerBl
Get page of members from the given vo, with the given attributes, based on policy.- Specified by:
getMembersPage
in interfaceMembersManagerBl
- Parameters:
sess
- sessionvo
- voquery
- query with page informationattrNames
- attribute namespolicy
- policy to use- Returns:
- page of requested rich members
- Throws:
PolicyNotExistsException
-
getNamespaceRules
Description copied from interface:MembersManagerBl
Get NamespaceRules for the namespace from the LoginNamespacesRulesConfigContainer- Specified by:
getNamespaceRules
in interfaceMembersManagerBl
- Parameters:
namespace
- for which will be the rules fetched- Returns:
- NamespaceRules for the namespace
- Throws:
NamespaceRulesNotExistsException
- if there are no rules for the namespace
-
getNewExtendMembership
Description copied from interface:MembersManagerBl
Returns the date to which will be extended member's expiration time.- Specified by:
getNewExtendMembership
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Returns:
- date
-
getNewExtendMembership
public Date getNewExtendMembership(PerunSession sess, Vo vo, String loa) throws ExtendMembershipException Description copied from interface:MembersManagerBl
Returns the date to which will be extended potential member of the VO.- Specified by:
getNewExtendMembership
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-loa
-- Returns:
- date
- Throws:
ExtendMembershipException
-
getPerunBl
Gets the perunBl.- Returns:
- The perunBl.
-
getRichMember
Description copied from interface:MembersManagerBl
Get Member to RichMember with attributes.- Specified by:
getRichMember
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Returns:
-
getRichMemberWithAttributes
Description copied from interface:MembersManagerBl
Get Member to RichMember with attributes.- Specified by:
getRichMemberWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Returns:
-
getRichMembers
Description copied from interface:MembersManagerBl
Get rich members for displaying on pages. Rich member object contains user, member, userExtSources.- Specified by:
getRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-- Returns:
- list of rich members on specified page, empty list if there are no user in this VO or in this page
-
getRichMembers
Description copied from interface:MembersManagerBl
Get rich members for displaying on pages. Rich member object contains user, member, userExtSources.- Specified by:
getRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-group
-- Returns:
- list of rich members on specified page, empty list if there are no user in this Group or in this page
-
getRichMembers
Description copied from interface:MembersManagerBl
Get rich members who have the status, for displaying on pages. Rich member object contains user, member, userExtSources.- Specified by:
getRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-status
- get only members who have this status. If status is null return all members.- Returns:
- list of rich members on specified page, empty list if there are no user in this VO or in this page
-
getRichMembersNoUserAttributes
Description copied from interface:MembersManagerBl
Get all rich members of VO. Rich member object contains user, member, userExtSources and member attributes. User attributes aren't included- Specified by:
getRichMembersNoUserAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-- Returns:
- list of rich members with all member attributes
-
getRichMembersWithAttributes
public List<RichMember> getRichMembersWithAttributes(PerunSession sess, Vo vo, List<AttributeDefinition> attrsDef) Description copied from interface:MembersManagerBl
Get RichMembers with Attributes but only with selected attributes from list attrsDef.- Specified by:
getRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-attrsDef
-- Returns:
-
getRichMembersWithAttributes
public List<RichMember> getRichMembersWithAttributes(PerunSession sess, List<String> allowedStatuses, Group group) Description copied from interface:MembersManagerBl
Get rich members for displaying on pages. Rich member object contains user, member, userExtSources, userAttributes, memberAttributes.- Specified by:
getRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-allowedStatuses
-group
-- Returns:
- list of rich members on specified page, empty list if there are no user in this group or in this page
-
getRichMembersWithAttributes
public List<RichMember> getRichMembersWithAttributes(PerunSession sess, Group group, List<AttributeDefinition> attrsDef) Description copied from interface:MembersManagerBl
Get RichMembers with Attributes but only with selected attributes from list attrsDef.- Specified by:
getRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-group
-attrsDef
-- Returns:
-
getRichMembersWithAttributes
public List<RichMember> getRichMembersWithAttributes(PerunSession sess, Group group, List<Member> members, List<AttributeDefinition> attrsDef) Description copied from interface:MembersManagerBl
Get RichMembers with Attributes but only with selected attributes from list attrsDef and for specified members.- Specified by:
getRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-group
-attrsDef
-- Returns:
-
getRichMembersWithAttributes
Description copied from interface:MembersManagerBl
Get rich members for displaying on pages. Rich member object contains user, member, userExtSources, userAttributes, memberAttributes.- Specified by:
getRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-- Returns:
- list of rich members on specified page, empty list if there are no user in this VO or in this page
-
getRichMembersWithAttributes
Description copied from interface:MembersManagerBl
Get rich members who have the status, for displaying on pages. Rich member object contains user, member, userExtSources, userAttributes, memberAttributes.- Specified by:
getRichMembersWithAttributes
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-status
- get only members who have this status. If status is null return all members.- Returns:
- list of rich members on specified page, empty list if there are no user in this VO or in this page
-
getRichMembersWithAttributesByNames
public List<RichMember> getRichMembersWithAttributesByNames(PerunSession sess, Vo vo, List<String> attrsNames) throws AttributeNotExistsException Description copied from interface:MembersManagerBl
Get RichMembers with Attributes but only with selected attributes from list attrsNames for vo.- Specified by:
getRichMembersWithAttributesByNames
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-attrsNames
- list of attrNames for selected attributes- Returns:
- list of RichMembers
- Throws:
AttributeNotExistsException
-
getRichMembersWithAttributesByNames
public List<RichMember> getRichMembersWithAttributesByNames(PerunSession sess, Group group, List<String> attrsNames) throws AttributeNotExistsException Description copied from interface:MembersManagerBl
Get RichMembers with Attributes but only with selected attributes from list attrsDef for group.- Specified by:
getRichMembersWithAttributesByNames
in interfaceMembersManagerBl
- Parameters:
sess
-group
-attrsNames
- list of attrNames for selected attributes- Returns:
- list of RichMembers
- Throws:
AttributeNotExistsException
-
getRichMembersWithAttributesByNames
public List<RichMember> getRichMembersWithAttributesByNames(PerunSession sess, Group group, Resource resource, List<String> attrsNames) throws AttributeNotExistsException, GroupResourceMismatchException Description copied from interface:MembersManagerBl
Get RichMembers with Attributes but only with selected attributes from list attrsDef for group. Get also user-facility (as user attribute in rich member) and member-resource (as member attributes in rich member) attributes by resource.- Specified by:
getRichMembersWithAttributesByNames
in interfaceMembersManagerBl
- Parameters:
sess
-group
-resource
-attrsNames
- list of attrNames for selected attributes- Returns:
- list of RichMembers
- Throws:
AttributeNotExistsException
GroupResourceMismatchException
-
getServiceUserRichMembers
Description copied from interface:MembersManagerBl
Get RichMembers from a VO who are service users.- Specified by:
getServiceUserRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-- Returns:
- List of RichMembers from the VO, who are service users
-
getSponsoredMembers
Description copied from interface:MembersManagerBl
Gets list of members that are sponsored by the user in the vo.- Specified by:
getSponsoredMembers
in interfaceMembersManagerBl
- Parameters:
sess
- perun sessionvo
- virtual organizationuser
- user sponsoring members- Returns:
- list of members sponsored by the user in VO
-
getSponsoredMembers
Description copied from interface:MembersManagerBl
Gets list of members that are sponsored by the user in all vos.- Specified by:
getSponsoredMembers
in interfaceMembersManagerBl
- Parameters:
sess
- perun sessionuser
- user sponsoring members- Returns:
- list of members sponsored by the user in VO
-
getSponsoredMembers
Description copied from interface:MembersManagerBl
Gets list of sponsored members of a VO.- Specified by:
getSponsoredMembers
in interfaceMembersManagerBl
- Parameters:
sess
- sessionvo
- virtual organization from which are the sponsored members chosen- Returns:
- list of members from given vo who are sponsored
-
getSponsoredRichMembers
Description copied from interface:MembersManagerBl
Get list of rich members that are sponsored in the VO.- Specified by:
getSponsoredRichMembers
in interfaceMembersManagerBl
- Parameters:
sess
-vo
-- Returns:
- list of rich members which are sponsored in the given VO
-
getSponsorship
public Sponsorship getSponsorship(PerunSession sess, Member sponsoredMember, User sponsor) throws SponsorshipDoesNotExistException Description copied from interface:MembersManagerBl
For the given member and user returns their sponsorship relation object. If there is no such relation, the SponsorshipDoesNotExistException is thrown.- Specified by:
getSponsorship
in interfaceMembersManagerBl
- Parameters:
sess
- sessionsponsoredMember
- sponsored membersponsor
- sponsor- Returns:
- Sponsorship object
- Throws:
SponsorshipDoesNotExistException
- if there is no sponsorship relation between the given member and user
-
getSponsorshipsExpiringInRange
public List<Sponsorship> getSponsorshipsExpiringInRange(PerunSession sess, LocalDate from, LocalDate to) Description copied from interface:MembersManagerBl
Returns sponsorship, which have validityTo in range [from, to). (from is inclusive, to is exclusive).- Specified by:
getSponsorshipsExpiringInRange
in interfaceMembersManagerBl
- Parameters:
sess
- sessionfrom
- lower validityTo bound (inclusive), use LocalDate.MIN if you don't want to specify the lower boundto
- upper validityTo bound (exclusive), use LocalDate.MAX, if you don't want to specify the upper bound- Returns:
- list of sponsorships which have validityTo set in the given range
-
getUnifiedMemberGroupStatus
public MemberGroupStatus getUnifiedMemberGroupStatus(PerunSession sess, Member member, Resource resource) Description copied from interface:MembersManagerBl
Returns unified result of MemberGroupStatus for specified member and resource.If member is VALID in at least one group assigned to the resource, result is VALID. If member is not VALID in any of groups assigned to the resource, result is EXPIRED. If member is not assigned to the resource at all, result is NULL.
MemberGroupStatus is never related to the members status in a VO as a whole!
- Specified by:
getUnifiedMemberGroupStatus
in interfaceMembersManagerBl
- Parameters:
sess
- PerunSessionmember
- Member to get unified MemberGroupStatusresource
- Resource to get unified MemberGroupStatus- Returns:
- MemberGroupStatus for member unified through all his groups assigned to the resource.
-
getUnifiedMemberGroupStatus
public MemberGroupStatus getUnifiedMemberGroupStatus(PerunSession sess, User user, Facility facility) Description copied from interface:MembersManagerBl
Returns unified result of MemberGroupStatus for specified user and facility.If user is VALID in at least one group assigned to at least one resource on facility, result is VALID. If user is not VALID in any of groups assigned to any of resources, result is EXPIRED. If user is not assigned to the resource at all, result is NULL.
MemberGroupStatus is never related to the members status in any VO!
- Specified by:
getUnifiedMemberGroupStatus
in interfaceMembersManagerBl
- Parameters:
sess
- PerunSessionuser
- User to get unified MemberGroupStatusfacility
- Facility to get unified MemberGroupStatus- Returns:
- MemberGroupStatus for user unified throught all his groups assigned to any of resources of facility.
-
haveStatus
Description copied from interface:MembersManagerBl
Return true if member have specified status.- Specified by:
haveStatus
in interfaceMembersManagerBl
- Parameters:
sess
-member
-status
-- Returns:
- true if member have the specified status false otherwise
-
insertToMemberGroup
public void insertToMemberGroup(PerunSession sess, Member member, Vo vo) throws AlreadyMemberException - Throws:
AlreadyMemberException
-
invalidateMember
Description copied from interface:MembersManagerBl
Set member status to invalid.As side effect it will change status of the object member.
- Specified by:
invalidateMember
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Returns:
- member with new status set
-
isMemberAllowed
Description copied from interface:MembersManagerBl
Return false if member has status INVALID or DISABLED. True in other cases.- Specified by:
isMemberAllowed
in interfaceMembersManagerBl
- Parameters:
sess
-member
- the member- Returns:
- false if member has INVALID or DISABLED status, true in other cases
-
manageMembershipExpiration
protected Pair<Boolean,Date> manageMembershipExpiration(PerunSession sess, Member member, boolean setAttributeValue, boolean throwExceptions) throws ExtendMembershipException More info on https://wiki.metacentrum.cz/wiki/VO_managers%27s_manualIf setAttributeValue is true, then store the membership expiration date into the attribute, otherwise return object pair containing true/false if the member can be extended and date specifying exact date of the new expiration
- Parameters:
sess
- sessmember
- member to check / set membership expirationsetAttributeValue
- TRUE = set new membership expiration date / FALSE = do NOT set new expiration date (just calculate it)throwExceptions
- TRUE = throw exception / FALSE = return false when member can't extend membership- Returns:
- Pair with result in left side (can / can't extend membership) and Date in right side telling new membership expiration date
- Throws:
InternalErrorException
ExtendMembershipException
- When member can't extend membership and throwException is set to true.
-
moveMembership
public void moveMembership(PerunSession sess, Vo vo, User sourceUser, User targetUser) throws MemberNotExistsException, AlreadyMemberException, ExtendMembershipException Description copied from interface:MembersManagerBl
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. 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:
moveMembership
in interfaceMembersManagerBl
- 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:
MemberNotExistsException
- when sourceUser is not member of the VOAlreadyMemberException
- when targetUser is already member of the VOExtendMembershipException
- when the targetUser doesn't have required LOA for the VO
-
removeSponsor
Description copied from interface:MembersManagerBl
Removes a sponsor.- Specified by:
removeSponsor
in interfaceMembersManagerBl
- Parameters:
sess
- perun sessionsponsoredMember
- member which is sponsoredsponsorToRemove
- sponsoring user
-
retainMembersWithStatus
Description copied from interface:MembersManagerBl
Retain only members with specified status.- Specified by:
retainMembersWithStatus
in interfaceMembersManagerBl
- Parameters:
sess
-members
-status
-- Returns:
-
sendAccountActivationLinkEmail
public void sendAccountActivationLinkEmail(PerunSession sess, Member member, String namespace, String url, String mailAddress, String language) Description copied from interface:MembersManagerBl
Send 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:
sendAccountActivationLinkEmail
in interfaceMembersManagerBl
- Parameters:
sess
- PerunSessionmember
- Member to get user to send link mail tonamespace
- Namespace to activate account in (member must have login in)url
- base URL of Perun instancemailAddress
- mail address where email will be sentlanguage
- language of the message
-
sendPasswordResetLinkEmail
public void sendPasswordResetLinkEmail(PerunSession sess, Member member, String namespace, String url, String mailAddress, String language) Description copied from interface:MembersManagerBl
Send 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:
sendPasswordResetLinkEmail
in interfaceMembersManagerBl
- Parameters:
sess
- PerunSessionmember
- Member to get user to send link mail tonamespace
- Namespace to reset password in (member must have login in)url
- base URL of Perun instancemailAddress
- mail address where email will be sentlanguage
- language of the message
-
sendUsernameReminderEmail
public void sendUsernameReminderEmail(PerunSession sess, Member member, String namespace, String mailAddress, String language) Description copied from interface:MembersManagerBl
Send mail to user's preferred email address with username for the given namespace.- Specified by:
sendUsernameReminderEmail
in interfaceMembersManagerBl
- Parameters:
sess
- PerunSessionmember
- Member to get user to send mail tonamespace
- Namespace for username/login (member must have login in this namespace)mailAddress
- mail address where email will be sentlanguage
- language of the message
-
setOrganizationsAttributes
public void setOrganizationsAttributes(PerunSession sess, Vo vo, Member member) throws AttributeNotExistsException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException, WrongAttributeValueException Description copied from interface:MembersManagerBl
Set memberOrganizations and memberOrganizationsHistory attributes for specific member.- Specified by:
setOrganizationsAttributes
in interfaceMembersManagerBl
- Parameters:
sess
- sessionvo
- VOmember
- member- Throws:
AttributeNotExistsException
- if the attribute doesn't exists in the underlying data sourceWrongAttributeAssignmentException
- if attribute is not vo attributeWrongReferenceAttributeValueException
- if attribute which is reference for used attribute has illegal valueWrongAttributeValueException
- if the attribute value is illegal
-
setPerunBl
-
setSponsoredMember
public Member setSponsoredMember(PerunSession session, SponsoredUserData data, Vo vo, User userToBeSponsored, User sponsor, LocalDate validityTo, Validation validation) throws AlreadyMemberException, ExtendMembershipException, UserNotInRoleException, WrongAttributeValueException, WrongReferenceAttributeValueException, LoginNotExistsException, PasswordCreationFailedException, InvalidLoginException, ExtSourceNotExistsException, AlreadySponsorException, InvalidSponsoredUserDataException, NamespaceRulesNotExistsException, PasswordStrengthException Description copied from interface:MembersManagerBl
Creates a sponsored membership for the given user.- Specified by:
setSponsoredMember
in interfaceMembersManagerBl
- Parameters:
session
- perun sessiondata
- data about the user, which are used to create an account in an external system, if neededvo
- virtual organizationuserToBeSponsored
- user, that will be sponsored by sponsorsponsor
- sponsoring uservalidation
- Type of members validation, when using Validation.ASYNC do not call this method in a cycle!- Returns:
- sponsored member
- Throws:
AlreadyMemberException
ExtendMembershipException
UserNotInRoleException
WrongAttributeValueException
WrongReferenceAttributeValueException
LoginNotExistsException
PasswordCreationFailedException
InvalidLoginException
ExtSourceNotExistsException
AlreadySponsorException
PasswordStrengthException
InvalidSponsoredUserDataException
NamespaceRulesNotExistsException
-
setSponsoredMember
public Member setSponsoredMember(PerunSession session, Vo vo, User userToBeSponsored, String namespace, String password, User sponsor, Validation validation) throws AlreadyMemberException, ExtendMembershipException, UserNotInRoleException, WrongAttributeValueException, WrongReferenceAttributeValueException, LoginNotExistsException, PasswordCreationFailedException, InvalidLoginException, ExtSourceNotExistsException, AlreadySponsorException, InvalidSponsoredUserDataException, NamespaceRulesNotExistsException, PasswordStrengthException Description copied from interface:MembersManagerBl
Creates a sponsored membership for the given user.- Specified by:
setSponsoredMember
in interfaceMembersManagerBl
- Parameters:
session
- perun sessionvo
- virtual organizationuserToBeSponsored
- user, that will be sponsored by sponsornamespace
- used for selecting external system in which guest user account will be createdpassword
- passwordsponsor
- sponsoring uservalidation
- Type of members validation, when using Validation.ASYNC do not call this method in a cycle!- Returns:
- sponsored member
- Throws:
AlreadyMemberException
ExtendMembershipException
UserNotInRoleException
WrongAttributeValueException
WrongReferenceAttributeValueException
LoginNotExistsException
PasswordCreationFailedException
InvalidLoginException
ExtSourceNotExistsException
AlreadySponsorException
PasswordStrengthException
InvalidSponsoredUserDataException
NamespaceRulesNotExistsException
-
setSponsorshipForMember
public Member setSponsorshipForMember(PerunSession session, Member sponsoredMember, User sponsor, LocalDate validityTo) throws AlreadySponsoredMemberException, UserNotInRoleException, AlreadySponsorException Description copied from interface:MembersManagerBl
Transform non-sponsored member to sponsored one with defined sponsor- Specified by:
setSponsorshipForMember
in interfaceMembersManagerBl
- Parameters:
session
- perun sessionsponsoredMember
- member who will be set as sponsored onesponsor
- new sponsor of this membervalidityTo
- the last day when the sponsorship is active- Returns:
- sponsored member
- Throws:
AlreadySponsoredMemberException
- if member was already flagged as sponsoredUserNotInRoleException
- if sponsor has not right role in the member's VOAlreadySponsorException
- sponsoredMember is already sponsored by User and his sponsorship is still active
-
setSponsorshipForMember
public Member setSponsorshipForMember(PerunSession session, Member sponsoredMember, User sponsor) throws AlreadySponsoredMemberException, UserNotInRoleException, AlreadySponsorException Description copied from interface:MembersManagerBl
Transform non-sponsored member to sponsored one with defined sponsor- Specified by:
setSponsorshipForMember
in interfaceMembersManagerBl
- Parameters:
session
- perun sessionsponsoredMember
- member who will be set as sponsored onesponsor
- new sponsor of this member- Returns:
- sponsored member
- Throws:
AlreadySponsoredMemberException
- if member was already flagged as sponsoredUserNotInRoleException
- if sponsor has not right role in the member's VOAlreadySponsorException
- sponsoredMember is already sponsored by User and his sponsorship is still active
-
setStatus
public Member setStatus(PerunSession sess, Member member, Status status) throws WrongAttributeValueException, WrongReferenceAttributeValueException, MemberNotValidYetException Description copied from interface:MembersManagerBl
Set status of the member to specified status.- Specified by:
setStatus
in interfaceMembersManagerBl
- Parameters:
sess
-member
-status
- new status- Returns:
- member with status set
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
MemberNotValidYetException
-
sponsorMember
public Member sponsorMember(PerunSession session, Member sponsoredMember, User sponsor) throws MemberNotSponsoredException, AlreadySponsorException, UserNotInRoleException Description copied from interface:MembersManagerBl
Links sponsored member and sponsoring user.- Specified by:
sponsorMember
in interfaceMembersManagerBl
- Parameters:
session
- perun sessionsponsoredMember
- member which is sponsoredsponsor
- sponsoring user- Returns:
- member
- Throws:
MemberNotSponsoredException
AlreadySponsorException
UserNotInRoleException
-
sponsorMember
public Member sponsorMember(PerunSession session, Member sponsoredMember, User sponsor, LocalDate validityTo) throws MemberNotSponsoredException, AlreadySponsorException, UserNotInRoleException Description copied from interface:MembersManagerBl
Links sponsored member and sponsoring user.- Specified by:
sponsorMember
in interfaceMembersManagerBl
- Parameters:
session
- perun sessionsponsoredMember
- member which is sponsoredsponsor
- sponsoring uservalidityTo
- last day when the sponsorship is active (null means the sponsorship will last forever)- Returns:
- member
- Throws:
MemberNotSponsoredException
AlreadySponsorException
UserNotInRoleException
-
suspendMemberTo
public void suspendMemberTo(PerunSession sess, Member member, Date suspendedTo) throws BanAlreadyExistsException Description copied from interface:MembersManagerBl
Set date to which will be member suspended in his VO.For almost unlimited time please use time in the far future.
- Specified by:
suspendMemberTo
in interfaceMembersManagerBl
- 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:
BanAlreadyExistsException
-
unsetSponsorshipForMember
public Member unsetSponsorshipForMember(PerunSession session, Member sponsoredMember) throws MemberNotSponsoredException Description copied from interface:MembersManagerBl
Transform sponsored member to non-sponsored one. Delete all his sponsors.- Specified by:
unsetSponsorshipForMember
in interfaceMembersManagerBl
- Parameters:
session
- perun sessionsponsoredMember
- member which who be unset from sponsoring- Returns:
- non-sponsored member
- Throws:
MemberNotSponsoredException
- If member was not set as sponsored before calling this method.
-
unsuspendMember
Description copied from interface:MembersManagerBl
Remove suspend state from Member - remove date to which member should be considered as suspended in the VO.WARNING: this method will always succeed if member exists, because it will set date for suspension to null
- Specified by:
unsuspendMember
in interfaceMembersManagerBl
- Parameters:
sess
-member
- member for which the suspend state will be removed
-
updateMember
public Member updateMember(PerunSession sess, Member member) throws WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:MembersManagerBl
Update member in underlaying data source. Member is find by id. Other java attributes are updated.- Specified by:
updateMember
in interfaceMembersManagerBl
- Parameters:
sess
-member
- member who have set new java attributes.- Returns:
- updated member
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
-
updateOrganizationsAttributes
public void updateOrganizationsAttributes(PerunSession sess, Vo vo, Member member) throws WrongAttributeAssignmentException, AttributeNotExistsException, WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:MembersManagerBl
Update value of memberOrganizations or memberOrganizationsHistory attribute for specific member.- Specified by:
updateOrganizationsAttributes
in interfaceMembersManagerBl
- Parameters:
sess
- sessionvo
- VOmember
- member- Throws:
WrongAttributeAssignmentException
- if attribute is not vo attributeAttributeNotExistsException
- if the attribute doesn't exists in the underlying data sourceWrongAttributeValueException
- if the attribute value is illegalWrongReferenceAttributeValueException
- if attribute which is reference for used attribute has illegal value
-
updateSponsorshipValidity
public void updateSponsorshipValidity(PerunSession sess, Member sponsoredMember, User sponsor, LocalDate newValidity) throws SponsorshipDoesNotExistException Description copied from interface:MembersManagerBl
Update the sponsorship of given member for given sponsor.- Specified by:
updateSponsorshipValidity
in interfaceMembersManagerBl
- Parameters:
sess
- sessionsponsoredMember
- sponsored membersponsor
- sponsornewValidity
- new validity, can be set to null never expire- Throws:
SponsorshipDoesNotExistException
- if the given user is not sponsor of the given member
-
validateMember
public Member validateMember(PerunSession sess, Member member) throws WrongAttributeValueException, WrongReferenceAttributeValueException Description copied from interface:MembersManagerBl
Validate all atributes for member and set member's status to VALID. This method runs synchronously.Method runs in nested transaction. As side effect, on success will change status of the object member.
- Specified by:
validateMember
in interfaceMembersManagerBl
- Parameters:
sess
-member
-- Returns:
- membet with new status set
- Throws:
WrongAttributeValueException
WrongReferenceAttributeValueException
-
validateMemberAsync
Description copied from interface:MembersManagerBl
Validate all attributes for member and then set member's status to VALID. This method runs asynchronously. If validation ends with error, member keeps his status.- Specified by:
validateMemberAsync
in interfaceMembersManagerBl
- Parameters:
sess
-member
-
-
someAvailableSponsorExistsForMember
Description copied from interface:MembersManagerBl
Checks if some vo sponsor who does not already sponsor given member exists.- Specified by:
someAvailableSponsorExistsForMember
in interfaceMembersManagerBl
- Parameters:
sess
- perun sessionmember
- member- Returns:
- true if available sponsor exists, false otherwise
-
getAvailableSponsorsForMember
Description copied from interface:MembersManagerBl
Returns all available sponsors for given member.- Specified by:
getAvailableSponsorsForMember
in interfaceMembersManagerBl
- Parameters:
sess
- perun sessionmember
- member- Returns:
- list of available sponsors
-