Class HeadingNameNamingCriterion

  • All Implemented Interfaces:
    NamingCriterion

    @Component
    @Named("headingNames")
    @InstantiationStrategy(PER_LOOKUP)
    public class HeadingNameNamingCriterion
    extends AbstractNamingCriterion
    A NamingCriterion based on the opening heading (if present) of the document.
    Since:
    1.9M1
    Version:
    $Id: 974edda101a81e6a52980fc646f89120d6a1faf2 $
    • Constructor Detail

      • HeadingNameNamingCriterion

        @Deprecated
        public HeadingNameNamingCriterion​(String baseDocumentName,
                                          DocumentAccessBridge docBridge,
                                          org.xwiki.rendering.renderer.BlockRenderer plainTextRenderer,
                                          boolean prependBasePageName)
        Deprecated.
        since 14.10.2, 15.0RC1 inject this as a component instead and set the base reference through AbstractNamingCriterion.getParameters()
        Constructs a new HeadingNameNamingCriterion.
        Parameters:
        baseDocumentName - name of the document that is being split.
        docBridge - DocumentAccessBridge used to lookup for documents.
        plainTextRenderer - the renderer to convert to plain text
        prependBasePageName - a flag indicating if each generated page name should be prepended with base page name.
      • HeadingNameNamingCriterion

        @Unstable
        public HeadingNameNamingCriterion()
        Implicit constructor. Don't use it directly. Use the component manager instead (e.g. through injection).
        Since:
        14.10.2, 15.0RC1
    • Method Detail

      • getDocumentReference

        public org.xwiki.model.reference.DocumentReference getDocumentReference​(org.xwiki.rendering.block.XDOM xdom)
        Description copied from interface: NamingCriterion
        Generates a suitable reference for the new document represented by 'newDoc' which is a result of the splitting operation.
        Parameters:
        xdom - the XDOM representing the newly split document
        Returns:
        the reference generated for the new document