Package org.xwiki.rendering.macro.toc
Class TocMacroParameters
- java.lang.Object
-
- org.xwiki.rendering.macro.toc.TocMacroParameters
-
public class TocMacroParameters extends Object
Parameters for theTocMacroMacro.- Since:
- 1.6M1
- Version:
- $Id: 60dfb30841c93ef3a1c2268aa62eca2c08b71923 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTocMacroParameters.Scope
-
Constructor Summary
Constructors Constructor Description TocMacroParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDepth()StringgetReference()TocMacroParameters.ScopegetScope()intgetStart()booleanisCustomStart()booleanisNumbered()voidsetDepth(int depth)voidsetNumbered(boolean numbered)voidsetReference(String reference)voidsetScope(TocMacroParameters.Scope scope)voidsetStart(int start)
-
-
-
Method Detail
-
setStart
public void setStart(int start)
- Parameters:
start- the minimum section level. For example if 2 then level 1 sections will not be listed.
-
getStart
public int getStart()
- Returns:
- the minimum section level. For example if 2 then level 1 sections will not be listed.
-
isCustomStart
public boolean isCustomStart()
- Returns:
- indicate if the start has been set or if it has the default value.
-
setDepth
public void setDepth(int depth)
- Parameters:
depth- the maximum section level. For example if 3 then all section levels from 4 will not be listed.
-
getDepth
public int getDepth()
- Returns:
- the maximum section level. For example if 3 then all section levels from 4 will not be listed.
-
setScope
public void setScope(TocMacroParameters.Scope scope)
- Parameters:
scope- If local only section in the current scope will be listed. For example if the macro is written in a section, only subsections of this section will be listed.
-
getScope
public TocMacroParameters.Scope getScope()
- Returns:
- if
TocMacroParameters.Scope.LOCALonly section in the current scope will be listed. For example if the macro is written in a section, only subsections of this section will be listed.
-
setNumbered
public void setNumbered(boolean numbered)
- Parameters:
numbered- if true the section title number is printed.
-
isNumbered
public boolean isNumbered()
- Returns:
- if true the section title number is printed.
-
setReference
public void setReference(String reference)
- Parameters:
reference- the reference to the document for which to generate the table of content. If not defined, then the current document is used
-
getReference
public String getReference()
- Returns:
- the reference to the document for which to generate the table of content
-
-