Class NodeTypeImpl

    • Method Detail

      • isNodeType

        public boolean isNodeType​(Name nodeTypeName)
        Test if this nodetype equals or is directly or indirectly derived from the node type with the specified nodeTypeName, without checking of a node type of that name really exists.
        Specified by:
        isNodeType in class AbstractNodeType
        Parameters:
        nodeTypeName - A node type name.
        Returns:
        true if this node type represents the type with the given nodeTypeName or if it is directly or indirectly derived from it; otherwise false. If no node type exists with the specified name this method will also return false.
      • isDerivedFrom

        public boolean isDerivedFrom​(Name nodeTypeName)
        Checks if this node type is directly or indirectly derived from the specified node type.
        Parameters:
        nodeTypeName - the name of a node type.
        Returns:
        true if this node type is directly or indirectly derived from the specified node type, otherwise false.
      • getAutoCreatedNodeDefinitions

        public NodeDefinition[] getAutoCreatedNodeDefinitions()
        Returns an array containing only those child node definitions of this node type (including the child node definitions inherited from supertypes of this node type) where ItemDefinition.isAutoCreated() returns true.
        Returns:
        an array of child node definitions.
        See Also:
        ItemDefinition.isAutoCreated()
      • getAutoCreatedPropertyDefinitions

        public PropertyDefinition[] getAutoCreatedPropertyDefinitions()
        Returns an array containing only those property definitions of this node type (including the property definitions inherited from supertypes of this node type) where ItemDefinition.isAutoCreated() returns true.
        Returns:
        an array of property definitions.
        See Also:
        ItemDefinition.isAutoCreated()
      • getMandatoryPropertyDefinitions

        public PropertyDefinition[] getMandatoryPropertyDefinitions()
        Returns an array containing only those property definitions of this node type (including the property definitions inherited from supertypes of this node type) where ItemDefinition.isMandatory() returns true.
        Returns:
        an array of property definitions.
        See Also:
        ItemDefinition.isMandatory()
      • getMandatoryNodeDefinitions

        public NodeDefinition[] getMandatoryNodeDefinitions()
        Returns an array containing only those child node definitions of this node type (including the child node definitions inherited from supertypes of this node type) where ItemDefinition.isMandatory() returns true.
        Returns:
        an array of child node definitions.
        See Also:
        ItemDefinition.isMandatory()
      • getQName

        public Name getQName()
        Returns the Name of this node type.
        Returns:
        the name
      • canRemoveNode

        public boolean canRemoveNode​(String nodeName)
        Returns true if removing the child node called nodeName is allowed by this node type. Returns false otherwise.
        Specified by:
        canRemoveNode in interface NodeType
        Parameters:
        nodeName - The name of the child node
        Returns:
        a boolean
        Since:
        JCR 2.0
      • canRemoveProperty

        public boolean canRemoveProperty​(String propertyName)
        Returns true if removing the property called propertyName is allowed by this node type. Returns false otherwise.
        Specified by:
        canRemoveProperty in interface NodeType
        Parameters:
        propertyName - The name of the property
        Returns:
        a boolean
        Since:
        JCR 2.0