@NotNull @Override public NodeDefinition getDefinition(@NotNull Tree parent, @NotNull String nodeName) throws RepositoryException { checkNotNull(parent); checkNotNull(nodeName); EffectiveNodeType effective = getEffectiveNodeType(parent); return effective.getNodeDefinition(nodeName, null); }
@Nonnull @Override public NodeDefinition getDefinition(@Nonnull Tree parent, @Nonnull String nodeName) throws RepositoryException { checkNotNull(parent); checkNotNull(nodeName); EffectiveNodeType effective = getEffectiveNodeType(parent); return effective.getNodeDefinition(nodeName, null); }
@NotNull @Override public NodeDefinition getDefinition(@NotNull Tree parent, @NotNull String nodeName) throws RepositoryException { checkNotNull(parent); checkNotNull(nodeName); EffectiveNodeType effective = getEffectiveNodeType(parent); return effective.getNodeDefinition(nodeName, null); }
@NotNull @Override public NodeDefinition getDefinition( @NotNull Tree parent, @NotNull Tree targetNode) throws RepositoryException { checkNotNull(parent); checkNotNull(targetNode); String name = dropIndexFromName(targetNode.getName()); EffectiveNodeType eff = getEffectiveNodeType(parent); return eff.getNodeDefinition(name, getEffectiveNodeType(targetNode)); }
@Nonnull @Override public NodeDefinition getDefinition( @Nonnull Tree parent, @Nonnull Tree targetNode) throws RepositoryException { checkNotNull(parent); checkNotNull(targetNode); String name = dropIndexFromName(targetNode.getName()); EffectiveNodeType eff = getEffectiveNodeType(parent); return eff.getNodeDefinition(name, getEffectiveNodeType(targetNode)); }
@NotNull @Override public NodeDefinition getDefinition( @NotNull Tree parent, @NotNull Tree targetNode) throws RepositoryException { checkNotNull(parent); checkNotNull(targetNode); String name = dropIndexFromName(targetNode.getName()); EffectiveNodeType eff = getEffectiveNodeType(parent); return eff.getNodeDefinition(name, getEffectiveNodeType(targetNode)); }
@NotNull @Override public PropertyDefinition getDefinition( Tree parent, PropertyState property, boolean exactTypeMatch) throws RepositoryException { Type<?> type = property.getType(); EffectiveNodeType effective = getEffectiveNodeType(parent); return effective.getPropertyDefinition( property.getName(), type.isArray(), type.tag(), exactTypeMatch); }
@NotNull @Override public PropertyDefinition getDefinition( Tree parent, PropertyState property, boolean exactTypeMatch) throws RepositoryException { Type<?> type = property.getType(); EffectiveNodeType effective = getEffectiveNodeType(parent); return effective.getPropertyDefinition( property.getName(), type.isArray(), type.tag(), exactTypeMatch); }
@Nonnull @Override public PropertyDefinition getDefinition( Tree parent, PropertyState property, boolean exactTypeMatch) throws RepositoryException { Type<?> type = property.getType(); EffectiveNodeType effective = getEffectiveNodeType(parent); return effective.getPropertyDefinition( property.getName(), type.isArray(), type.tag(), exactTypeMatch); }
@NotNull @Override public AccessControlPolicyIterator getApplicablePolicies(@Nullable String absPath) throws RepositoryException { String oakPath = getOakPath(absPath); Tree tree = getTree(oakPath, Permissions.READ_ACCESS_CONTROL, true); AccessControlPolicy policy = null; Tree aclTree = getAclTree(oakPath, tree); if (aclTree == null) { if (tree.hasChild(Util.getAclName(oakPath))) { // policy child node without tree being access controlled log.warn("Colliding policy child without node being access controllable ({}).", absPath); } else { // create an empty acl unless the node is protected or cannot have // mixin set (e.g. due to a lock) String mixinName = Util.getMixinName(oakPath); if (ntMgr.isNodeType(tree, mixinName) || ntMgr.getEffectiveNodeType(tree).supportsMixin(mixinName)) { policy = new NodeACL(oakPath); } else { log.warn("Node {} cannot be made access controllable.", absPath); } } } // else: acl already present -> getPolicies must be used. if (policy == null) { return AccessControlPolicyIteratorAdapter.EMPTY; } else { return new AccessControlPolicyIteratorAdapter(Collections.singleton(policy)); } }
@NotNull @Override public AccessControlPolicyIterator getApplicablePolicies(@Nullable String absPath) throws RepositoryException { String oakPath = getOakPath(absPath); Tree tree = getTree(oakPath, Permissions.READ_ACCESS_CONTROL, true); AccessControlPolicy policy = null; Tree aclTree = getAclTree(oakPath, tree); if (aclTree == null) { if (tree.hasChild(Util.getAclName(oakPath))) { // policy child node without tree being access controlled log.warn("Colliding policy child without node being access controllable ({}).", absPath); } else { // create an empty acl unless the node is protected or cannot have // mixin set (e.g. due to a lock) String mixinName = Util.getMixinName(oakPath); if (ntMgr.isNodeType(tree, mixinName) || ntMgr.getEffectiveNodeType(tree).supportsMixin(mixinName)) { policy = new NodeACL(oakPath); } else { log.warn("Node {} cannot be made access controllable.", absPath); } } } // else: acl already present -> getPolicies must be used. if (policy == null) { return AccessControlPolicyIteratorAdapter.EMPTY; } else { return new AccessControlPolicyIteratorAdapter(Collections.singleton(policy)); } }
@Nonnull @Override public AccessControlPolicyIterator getApplicablePolicies(@Nullable String absPath) throws RepositoryException { String oakPath = getOakPath(absPath); Tree tree = getTree(oakPath, Permissions.READ_ACCESS_CONTROL, true); AccessControlPolicy policy = null; Tree aclTree = getAclTree(oakPath, tree); if (aclTree == null) { if (tree.hasChild(Util.getAclName(oakPath))) { // policy child node without tree being access controlled log.warn("Colliding policy child without node being access controllable ({}).", absPath); } else { // create an empty acl unless the node is protected or cannot have // mixin set (e.g. due to a lock) String mixinName = Util.getMixinName(oakPath); if (ntMgr.isNodeType(tree, mixinName) || ntMgr.getEffectiveNodeType(tree).supportsMixin(mixinName)) { policy = new NodeACL(oakPath); } else { log.warn("Node {} cannot be made access controllable.", absPath); } } } // else: acl already present -> getPolicies must be used. if (policy == null) { return AccessControlPolicyIteratorAdapter.EMPTY; } else { return new AccessControlPolicyIteratorAdapter(Collections.singleton(policy)); } }