/** * Determine if the child node definitions of the supplied primary type and mixin types of a parent node allow all of the * children with the supplied name to be removed. * * @param primaryTypeNameOfParent the name of the primary type for the parent node; may not be null * @param mixinTypeNamesOfParent the names of the mixin types for the parent node; may be null or empty if there are no mixins * to include in the search * @param childName the name of the child to be added to the parent; may not be null * @param skipProtected true if this operation is being done from within the public JCR node and property API, or false if * this operation is being done from within internal implementations * @return true if at least one child node definition does not require children with the supplied name to exist, or false * otherwise */ final boolean canRemoveAllChildren( Name primaryTypeNameOfParent, Collection<Name> mixinTypeNamesOfParent, Name childName, boolean skipProtected ) { return nodeTypes().canRemoveAllChildren(primaryTypeNameOfParent, mixinTypeNamesOfParent, childName, skipProtected); }
/** * Determine if the child node definitions of the supplied primary type and mixin types of a parent node allow all of the * children with the supplied name to be removed. * * @param primaryTypeNameOfParent the name of the primary type for the parent node; may not be null * @param mixinTypeNamesOfParent the names of the mixin types for the parent node; may be null or empty if there are no mixins * to include in the search * @param childName the name of the child to be added to the parent; may not be null * @param skipProtected true if this operation is being done from within the public JCR node and property API, or false if * this operation is being done from within internal implementations * @return true if at least one child node definition does not require children with the supplied name to exist, or false * otherwise */ final boolean canRemoveAllChildren( Name primaryTypeNameOfParent, Collection<Name> mixinTypeNamesOfParent, Name childName, boolean skipProtected ) { return nodeTypes().canRemoveAllChildren(primaryTypeNameOfParent, mixinTypeNamesOfParent, childName, skipProtected); }
@Override public boolean canRemoveNode( String itemName ) { CheckArg.isNotNull(itemName, "itemName"); Name childName = context.getValueFactories().getNameFactory().create(itemName); return nodeTypes().canRemoveAllChildren(this.name, null, childName, true); }
@Override public boolean canRemoveNode( String itemName ) { CheckArg.isNotNull(itemName, "itemName"); Name childName = context.getValueFactories().getNameFactory().create(itemName); return nodeTypes().canRemoveAllChildren(this.name, null, childName, true); }
if (!childName.equals(JcrNodeType.RESIDUAL_NAME)) return canRemoveAllChildren(primaryTypeNameOfParent, mixinTypeNamesOfParent, JcrNodeType.RESIDUAL_NAME, skipProtected);
if (!childName.equals(JcrNodeType.RESIDUAL_NAME)) return canRemoveAllChildren(primaryTypeNameOfParent, mixinTypeNamesOfParent, JcrNodeType.RESIDUAL_NAME, skipProtected);