public Validator getRootValidator(NodeState before, NodeState after) {
Tree treeBefore = new ReadOnlyTree(before);
NodeUtil rootBefore = new NodeUtil(treeBefore);
NodeUtil rootAfter = new NodeUtil(new ReadOnlyTree(after));
PrivilegeDefinitionReader reader = securityProvider.getPrivilegeConfiguration().getPrivilegeDefinitionReader(treeBefore);
Map<String, PrivilegeDefinition> privilegeDefinitions = reader.readDefinitions();
AccessControlConfiguration acConfig = securityProvider.getAccessControlConfiguration();
RestrictionProvider restrictionProvider = acConfig.getRestrictionProvider(NamePathMapper.DEFAULT);
ReadOnlyNodeTypeManager ntMgr = ReadOnlyNodeTypeManager.getInstance(before);