Package org.xwiki.rendering.wikimodel
Class ReferenceHandler
- java.lang.Object
-
- org.xwiki.rendering.wikimodel.ReferenceHandler
-
public abstract class ReferenceHandler extends Object
This utility class splits references to individual parts (hyper-link and label) and delegates to separate methods handling of images, normal references and downloads.- Since:
- 4.0M1
- Version:
- $Id: 679b712d2f634e9fd86542883e0214add1fba68d $
-
-
Field Summary
Fields Modifier and Type Field Description static StringPREFIX_DOWNLOADstatic intPREFIX_DOWNLOAD_LENstatic StringPREFIX_IMAGEstatic intPREFIX_IMAGE_LEN
-
Constructor Summary
Constructors Modifier Constructor Description protectedReferenceHandler(boolean supportImage, boolean supportDownload)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidhandle(WikiReference ref)protected voidhandleDownload(String ref, String label, WikiParameters params)protected abstract voidhandleImage(String ref, String label, WikiParameters params)protected abstract voidhandleReference(String ref, String label, WikiParameters params)
-
-
-
Field Detail
-
PREFIX_DOWNLOAD
public static final String PREFIX_DOWNLOAD
- See Also:
- Constant Field Values
-
PREFIX_DOWNLOAD_LEN
public static final int PREFIX_DOWNLOAD_LEN
-
PREFIX_IMAGE
public static final String PREFIX_IMAGE
- See Also:
- Constant Field Values
-
PREFIX_IMAGE_LEN
public static final int PREFIX_IMAGE_LEN
-
-
Method Detail
-
handle
public void handle(WikiReference ref)
-
handleDownload
protected void handleDownload(String ref, String label, WikiParameters params)
-
handleImage
protected abstract void handleImage(String ref, String label, WikiParameters params)
-
handleReference
protected abstract void handleReference(String ref, String label, WikiParameters params)
-
-