@Test(expected = RepositoryException.class) public void testSetPropertyOtherUser() throws Exception { emptyProperties.setProperty("../" + PathUtils.getName(user2.getPath()) + "/prop", vf.createValue("newValue")); }
@Override public void setProperty(@NotNull String relPath, @Nullable Value value) throws RepositoryException { if (value == null) { removeProperty(relPath); } else { String oakPath = getOakPath(relPath); String name = Text.getName(oakPath); PropertyState propertyState = PropertyStates.createProperty(name, value); String intermediate = (oakPath.equals(name)) ? null : Text.getRelativeParent(oakPath, 1); Tree parent = getOrCreateTargetTree(intermediate); checkProtectedProperty(parent, propertyState); parent.setProperty(propertyState); } }
AuthorizablePropertiesImpl implements AuthorizableProperties { @Override public void setProperty(@NotNull String relPath, @Nullable Value value) throws RepositoryException { if (value == null) { removeProperty(relPath); } else { String oakPath = getOakPath(relPath); String name = Text.getName(oakPath); PropertyState propertyState = PropertyStates.createProperty(name, value); String intermediate = (oakPath.equals(name)) ? null : Text.getRelativeParent(oakPath, 1); Tree parent = getOrCreateTargetTree(intermediate); checkProtectedProperty(parent, propertyState); parent.setProperty(propertyState); } } }
AuthorizablePropertiesImpl implements AuthorizableProperties { @Override public void setProperty(@NotNull String relPath, @Nullable Value value) throws RepositoryException { if (value == null) { removeProperty(relPath); } else { String oakPath = getOakPath(relPath); String name = Text.getName(oakPath); PropertyState propertyState = PropertyStates.createProperty(name, value); String intermediate = (oakPath.equals(name)) ? null : Text.getRelativeParent(oakPath, 1); Tree parent = getOrCreateTargetTree(intermediate); checkProtectedProperty(parent, propertyState); parent.setProperty(propertyState); } } AuthorizablePropertiesImpl(@NotNull AuthorizableImpl authorizable,
                               @NotNull PartialValueFactory valueFactory); }
AuthorizablePropertiesImpl implements AuthorizableProperties { @Override public void setProperty(@NotNull String relPath, @Nullable Value value) throws RepositoryException { if (value == null) { removeProperty(relPath); } else { String oakPath = getOakPath(relPath); String name = Text.getName(oakPath); PropertyState propertyState = PropertyStates.createProperty(name, value); String intermediate = (oakPath.equals(name)) ? null : Text.getRelativeParent(oakPath, 1); Tree parent = getOrCreateTargetTree(intermediate); checkProtectedProperty(parent, propertyState); parent.setProperty(propertyState); } } AuthorizablePropertiesImpl(@NotNull AuthorizableImpl authorizable,
                               @NotNull PartialValueFactory valueFactory); @NotNull @Override Iterator<String> getNames(@NotNull String relPath); @Override boolean hasProperty(@NotNull String relPath); @Override Value[] getProperty(@NotNull String relPath); @Override void setProperty(@NotNull String relPath, @Nullable Value value); @Override void setProperty(@NotNull String relPath, @Nullable Value[] values); @Override boolean removeProperty(@NotNull String relPath); }
AuthorizablePropertiesImpl implements AuthorizableProperties { @Override public void setProperty(@NotNull String relPath, @Nullable Value value) throws RepositoryException { if (value == null) { removeProperty(relPath); } else { String oakPath = getOakPath(relPath); String name = Text.getName(oakPath); PropertyState propertyState = PropertyStates.createProperty(name, value); String intermediate = (oakPath.equals(name)) ? null : Text.getRelativeParent(oakPath, 1); Tree parent = getOrCreateTargetTree(intermediate); checkProtectedProperty(parent, propertyState); parent.setProperty(propertyState); } } AuthorizablePropertiesImpl(@NotNull AuthorizableImpl authorizable,
                               @NotNull PartialValueFactory valueFactory); @NotNull @Override Iterator<String> getNames(@NotNull String relPath); @Override boolean hasProperty(@NotNull String relPath); @Override Value[] getProperty(@NotNull String relPath); @Override void setProperty(@NotNull String relPath, @Nullable Value value); @Override void setProperty(@NotNull String relPath, @Nullable Value[] values); @Override boolean removeProperty(@NotNull String relPath);  }