/** @inheritDoc */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append("::uid="); sb.append(getUid()); Person person = findPerson(); if (person != null) { sb.append(" authId="); sb.append(person.getAuthId()); } return sb.toString(); }
/** * Sets the person to associate with this member. * * @param person */ void setPerson(Person person) { if (person == null) { throw new IllegalArgumentException(); } this.person = person; setUid(person.getUid()); }
/** @inheritDoc */ public FilterResult checkEligibility(Person person, FilterChain filterChain) throws Exception { if (!Collections.disjoint(person.getGroupMemberships(), eligibleGroupMemberships)) { return new FilterResult(true, "has membership in eligible group"); } else { return filterChain.checkEligibility(person); } }