/** * @see org.apache.jackrabbit.core.security.principal.AbstractPrincipalIterator#seekNext() */ @Override protected final Principal seekNext() { while (!entries.isEmpty()) { // first test if current iterator has more elements CheckedIteratorEntry current = entries.get(0); Iterator<? extends Principal> iterator = current.iterator; while (iterator.hasNext()) { Principal chk = iterator.next(); if (current.provider == null || current.provider.canReadPrincipal(session, chk)) { return disguise(chk, current.provider); } } // no more elements in current iterator -> move to next iterator. entries.remove(0); } return null; } }
/** * @see org.apache.jackrabbit.core.security.principal.AbstractPrincipalIterator#seekNext() */ @Override protected final Principal seekNext() { while (!entries.isEmpty()) { // first test if current iterator has more elements CheckedIteratorEntry current = entries.get(0); Iterator<? extends Principal> iterator = current.iterator; while (iterator.hasNext()) { Principal chk = iterator.next(); if (current.provider == null || current.provider.canReadPrincipal(session, chk)) { return disguise(chk, current.provider); } } // no more elements in current iterator -> move to next iterator. entries.remove(0); } return null; } }
/** * @param principalName the name of the principal * @return The principal with the given name or <code>null</code> if none * of the providers knows that principal of if the Session is not allowed * to see it. */ private Principal internalGetPrincipal(String principalName) { checkIsValid(); for (PrincipalProvider provider : providers) { Principal principal = provider.getPrincipal(principalName); if (principal != null && provider.canReadPrincipal(session, principal)) { return disguise(principal, provider); } } // nothing found or not allowed to see it. return null; }
/** * @param principalName the name of the principal * @return The principal with the given name or <code>null</code> if none * of the providers knows that principal of if the Session is not allowed * to see it. */ private Principal internalGetPrincipal(String principalName) { checkIsValid(); for (PrincipalProvider provider : providers) { Principal principal = provider.getPrincipal(principalName); if (principal != null && provider.canReadPrincipal(session, principal)) { return disguise(principal, provider); } } // nothing found or not allowed to see it. return null; }