Package org.apache.jackrabbit.commons.iterator

Examples of org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter


                Value[] members = node.getProperty(P_MEMBERS).getValues();

                if (includeIndirect) {
                    return includeIndirect(toAuthorizables(members, type), type);
                } else {
                    return new RangeIteratorAdapter(toAuthorizables(members, type), members.length);
                }
            } else {
                return Iterators.empty();
            }
        }
View Full Code Here


     * Creates an iterator for the given collection of {@code Principal}s.
     *
     * @param collection collection of {@link Principal} objects.
     */
    public PrincipalIteratorAdapter(Collection<? extends Principal> collection) {
        super(new RangeIteratorAdapter(collection));
    }
View Full Code Here

            String everyonePath = ((GroupImpl) everyoneGroup).getTree().getPath();
            oakPaths = Iterators.concat(oakPaths, ImmutableSet.of(everyonePath).iterator());
        }
        if (oakPaths.hasNext()) {
            AuthorizableIterator groups = AuthorizableIterator.create(oakPaths, userManager, AuthorizableType.GROUP);
            return new RangeIteratorAdapter(groups, groups.getSize());
        } else {
            return RangeIteratorAdapter.EMPTY;
        }
    }
View Full Code Here

            );
        } else {
            Iterator<String> oakPaths = getMembershipProvider().getMembers(getTree(), AuthorizableType.AUTHORIZABLE, includeInherited);
            if (oakPaths.hasNext()) {
                AuthorizableIterator iterator = AuthorizableIterator.create(oakPaths, userMgr, AuthorizableType.AUTHORIZABLE);
                return new RangeIteratorAdapter(iterator, iterator.getSize());
            } else {
                return RangeIteratorAdapter.EMPTY;
            }
        }
    }
View Full Code Here

            public Name[] getColumnNames() {
                return new Name[] {};
            }

            public RangeIterator getRows() {
                return new RangeIteratorAdapter(EmptyIterator.INSTANCE);
            }
        };
    }
View Full Code Here

     * Creates an adapter for the given {@link java.util.Iterator} of principals.
     *
     * @param iterator iterator of {@link java.security.Principal}s
     */
    public PrincipalIteratorAdapter(Iterator<? extends Principal> iterator) {
        super(new RangeIteratorAdapter(iterator));
    }
View Full Code Here

        MembershipProvider mMgr = getMembershipProvider();
        Iterator<String> oakPaths = mMgr.getMembership(getTree(), includeInherited);
        if (oakPaths.hasNext()) {
            AuthorizableIterator groups = AuthorizableIterator.create(oakPaths, userManager, AuthorizableType.GROUP);
            return new RangeIteratorAdapter(groups, groups.getSize());
        } else {
            return RangeIteratorAdapter.EMPTY;
        }
    }
View Full Code Here

        Iterator<String> it = groupPaths.iterator();
        if (includeInherited && it.hasNext()) {
            return getAllMembership(groupPaths.iterator());
        } else {
            return new RangeIteratorAdapter(it, groupPaths.size());
        }
    }
View Full Code Here

        Iterator it = memberPaths.iterator();
        if (includeInherited && it.hasNext()) {
            return getAllMembers(it, authorizableType);
        } else {
            return new RangeIteratorAdapter(it, Iterables.size(memberPaths));
        }
    }
View Full Code Here

                groups.add(group);
            } catch (RepositoryException e) {
                // group node doesn't exist or cannot be read -> ignore.
            }
        }
        return new RangeIteratorAdapter(groups.iterator(), groups.size());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.