Class HeadingNameNamingCriterion
- java.lang.Object
-
- org.xwiki.refactoring.splitter.criterion.naming.AbstractNamingCriterion
-
- org.xwiki.refactoring.splitter.criterion.naming.HeadingNameNamingCriterion
-
- All Implemented Interfaces:
NamingCriterion
@Component @Named("headingNames") @InstantiationStrategy(PER_LOOKUP) public class HeadingNameNamingCriterion extends AbstractNamingCriterion
ANamingCriterion
based on the opening heading (if present) of the document.- Since:
- 1.9M1
- Version:
- $Id: 974edda101a81e6a52980fc646f89120d6a1faf2 $
-
-
Field Summary
Fields Modifier and Type Field Description static String
PARAM_PREPEND_BASE_PAGE_NAME
-
Fields inherited from class org.xwiki.refactoring.splitter.criterion.naming.AbstractNamingCriterion
docBridge, logger
-
Fields inherited from interface org.xwiki.refactoring.splitter.criterion.naming.NamingCriterion
INDEX_SEPERATOR
-
-
Constructor Summary
Constructors Constructor Description HeadingNameNamingCriterion()
Implicit constructor.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 throughAbstractNamingCriterion.getParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xwiki.model.reference.DocumentReference
getDocumentReference(org.xwiki.rendering.block.XDOM xdom)
Generates a suitable reference for the new document represented by 'newDoc' which is a result of the splitting operation.-
Methods inherited from class org.xwiki.refactoring.splitter.criterion.naming.AbstractNamingCriterion
exists, getBasePageName, getPageName, getParameters, newDocumentReference
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xwiki.refactoring.splitter.criterion.naming.NamingCriterion
getDocumentName
-
-
-
-
Field Detail
-
PARAM_PREPEND_BASE_PAGE_NAME
public static final String PARAM_PREPEND_BASE_PAGE_NAME
- See Also:
- Constant Field Values
-
-
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 throughAbstractNamingCriterion.getParameters()
Constructs a newHeadingNameNamingCriterion
.- Parameters:
baseDocumentName
- name of the document that is being split.docBridge
-DocumentAccessBridge
used to lookup for documents.plainTextRenderer
- the renderer to convert to plain textprependBasePageName
- 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
- theXDOM
representing the newly split document- Returns:
- the reference generated for the new document
-
-