Interface ContentTypeItem

    • Method Detail

      • getName

        String getName()
        Returns:
        The qualified item name, never "*" (residual)
        See Also:
        ItemDefinition.getName()
      • getDefiningType

        String getDefiningType()
        Returns:
        The ContentType name which defines this item, which not necessarily is the same as the containing ContentType.
        See Also:
        ItemDefinition.getDeclaringNodeType()
      • isProperty

        boolean isProperty()
        Returns:
        True if this item denotes a NodeType Property, false if denotes a NodeType Child
        See Also:
        getEffectiveNodeTypeItem()
      • isDerivedItem

        boolean isDerivedItem()
        Returns:
        True if there is no explicit ContentTypeItem definition backing this item but it only is derived from the underlying EffectiveNodeType Child or Property
      • getItemType

        String getItemType()
        Returns the type of this item, which may be a qualified name of a ContentType (Child) or an (enhanced variant) of a NodeType property type name.

        For a isDerivedItem() the value from getEffectiveType() will be returned.

        Returns:
        The type of this item, which may be a qualified Child ContentType or an (enhanced variant) of a NodeType property
      • getEffectiveNodeTypeItem

        EffectiveNodeTypeItem getEffectiveNodeTypeItem()
        Returns:
        The underlying EffectiveNodeTypeItem (Child or Property) for this item; in case of a isMultiTyped() returning only the first item definition
      • isMultiTyped

        boolean isMultiTyped()
        Returns:
        true if multiple EffectiveNodeTypeItem definition are allowed for this isDerivedItem()
        See Also:
        getMultiTypes()
      • isPrimaryItem

        boolean isPrimaryItem()
        Primary items are for instance used in imagesets to define the cms preview resource. Since an imageset contains multiple images, one of them needs to be marked as the 'preview' variant.
        Returns:
        True if this item denotes the primary item
      • isMultiple

        boolean isMultiple()
        Returns:
        True for a multi-valued Property or same-name-sibling allowing Child definition
        See Also:
        PropertyDefinition.isMultiple(), NodeDefinition.allowsSameNameSiblings()
      • isMandatory

        boolean isMandatory()
        Returns:
        True if this item is required
        See Also:
        ItemDefinition.isMandatory()
      • isAutoCreated

        boolean isAutoCreated()
        Returns:
        True if this item is autoCreated
        See Also:
        ItemDefinition.isAutoCreated()
      • isProtected

        boolean isProtected()
        Returns:
        True if this item is protected
        See Also:
        ItemDefinition.isProtected()
      • isOrdered

        boolean isOrdered()
        Returns:
        True if this item isMultiple() and supports ordering of its Property values or its same-name-sibling Child items.
        Note: while multi-value properties are (JCR) ordered by definition, this method provides editor support for ordering prototype values or child items (if any), and only for this specific child item while the JCR hasOrderableChildren definition on NodeType level concerns all its children.
      • getValidators

        List<String> getValidators()
        Returns:
        The list of validators for this item, may be empty but never null.
      • getItemProperties

        Map<String,​List<String>> getItemProperties()
        Returns:
        The immutable map of item type specific properties, keyed on property name. The property values may be empty, single or multi-valued but never null. The returned map itself may be empty but never null.