@Test public void testCreateCacheBelowPersistedProfile() throws Exception { try { Tree node = getAuthorizableTree(getTestUser()); Tree child = TreeUtil.addChild(node, "profile", NodeTypeConstants.NT_OAK_UNSTRUCTURED); root.commit(); TreeUtil.addChild(child, CacheConstants.REP_CACHE, CacheConstants.NT_REP_CACHE).setProperty(CacheConstants.REP_EXPIRATION, 23L, Type.LONG); root.commit(CacheValidatorProvider.asCommitAttributes()); fail("Creating rep:cache node below a user or group must fail."); } catch (CommitFailedException e) { assertTrue(e.isConstraintViolation()); assertEquals(34, e.getCode()); } }
static Map<String, Object> asCommitAttributes() { return Collections.singletonMap(CommitMarker.KEY, CommitMarker.INSTANCE); }
CacheValidatorProvider extends ValidatorProvider implements CacheConstants { static Map<String, Object> asCommitAttributes() { return Collections.singletonMap(CommitMarker.KEY, CommitMarker.INSTANCE); } }
CacheValidatorProvider extends ValidatorProvider implements CacheConstants { static Map<String, Object> asCommitAttributes() { return Collections.singletonMap(CommitMarker.KEY, CommitMarker.INSTANCE); } CacheValidatorProvider(@NotNull Set<Principal> principals, @NotNull TreeProvider treeProvider); }
CacheValidatorProvider extends ValidatorProvider implements CacheConstants { static Map<String, Object> asCommitAttributes() { return Collections.singletonMap(CommitMarker.KEY, CommitMarker.INSTANCE); } CacheValidatorProvider(@NotNull Set<Principal> principals, @NotNull TreeProvider treeProvider);  }
CacheValidatorProvider extends ValidatorProvider implements CacheConstants { static Map<String, Object> asCommitAttributes() { return Collections.singletonMap(CommitMarker.KEY, CommitMarker.INSTANCE); } CacheValidatorProvider(@NotNull Set<Principal> principals, @NotNull TreeProvider treeProvider);   }