ACE implements JackrabbitAccessControlEntry { @NotNull @Override public String[] getRestrictionNames() { return Collections2.transform(restrictions, new Function<Restriction, String>() { @Override public String apply(Restriction restriction) { return getJcrName(restriction); } }).toArray(new String[restrictions.size()]); } ACE(Principal principal, PrivilegeBits privilegeBits,
               boolean isAllow, Set<Restriction> restrictions, NamePathMapper namePathMapper); @NotNull PrivilegeBits getPrivilegeBits(); @NotNull Set<Restriction> getRestrictions(); @NotNull @Override Principal getPrincipal(); @Override boolean isAllow(); @NotNull @Override String[] getRestrictionNames(); @Nullable @Override Value getRestriction(@NotNull String restrictionName); @Nullable @Override Value[] getRestrictions(@NotNull String restrictionName); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testGetRestrictionNames() throws Exception { String[] restrictionNames = createEntry().getRestrictionNames(); assertNotNull(restrictionNames); assertEquals(0, restrictionNames.length); Restriction globRestr = createRestriction(AccessControlConstants.REP_GLOB, globValue); Restriction nameRestr = createRestriction(AccessControlConstants.REP_NT_NAMES, nameValues); restrictionNames = createEntry(globRestr).getRestrictionNames(); assertEquals(1, restrictionNames.length); restrictionNames = createEntry(globRestr, nameRestr).getRestrictionNames(); assertEquals(2, restrictionNames.length); }