PropertyState getPrivilegeBitsProperty() { return privilegeBits.asPropertyState(REP_PRIVILEGE_BITS); }
PropertyState getPrivilegeBitsProperty() { return privilegeBits.asPropertyState(REP_PRIVILEGE_BITS); }
protected PropertyState getPrivilegeBitsProperty() { return privilegeBits.asPropertyState(REP_PRIVILEGE_BITS); }
/** * Write this instance as property to the specified tree. * * @param tree The target tree. */ public void writeTo(@Nonnull Tree tree) { String name = (REP_PRIVILEGES.equals(tree.getName())) ? REP_NEXT : REP_BITS; tree.setProperty(asPropertyState(name)); }
/** * Write this instance as property to the specified tree. * * @param tree The target tree. */ public void writeTo(@NotNull Tree tree) { String name = (REP_PRIVILEGES.equals(tree.getName())) ? REP_NEXT : REP_BITS; tree.setProperty(asPropertyState(name)); }
@Test public void testGetInstanceFromTreeCustomPriv() { PrivilegeBits next = PrivilegeBits.NEXT_AFTER_BUILT_INS; Tree tmp = Mockito.mock(Tree.class); when(tmp.getName()).thenReturn("tmpPrivilege"); when(tmp.getProperty(REP_BITS)).thenReturn(next.asPropertyState(REP_BITS)); assertEquals(next, PrivilegeBits.getInstance(tmp)); }
PrivilegeBits bits = PrivilegeBits.getInstance(after.getProperty(REP_BITS)); PrivilegeBits all = PrivilegeBits.getInstance(jcrAll.getProperty(REP_BITS)); jcrAll.setProperty(PrivilegeBits.getInstance(all).add(bits).asPropertyState(REP_BITS));
PrivilegeBits bits = PrivilegeBits.getInstance(after.getProperty(REP_BITS)); PrivilegeBits all = PrivilegeBits.getInstance(jcrAll.getProperty(REP_BITS)); jcrAll.setProperty(PrivilegeBits.getInstance(all).add(bits).asPropertyState(REP_BITS));
PrivilegeBits bits = PrivilegeBits.getInstance(after.getProperty(REP_BITS)); PrivilegeBits all = PrivilegeBits.getInstance(jcrAll.getProperty(REP_BITS)); jcrAll.setProperty(PrivilegeBits.getInstance(all).add(bits).asPropertyState(REP_BITS));