@Override public void beginLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters) { // Ensure the link renderer is using the latest printer since the original printer used could have been // superseded by another one in the printer stack. this.linkRenderer.setXHTMLWikiPrinter(getXHTMLWikiPrinter()); // If the ResourceReference doesn't have a base reference specified, then look for one in previously sent // events (it's sent in begin/endMetaData events). List<String> baseReferences = reference.getBaseReferences(); if (baseReferences.isEmpty()) { reference.addBaseReferences(getMetaDataState().<String>getAllMetaData(MetaData.BASE)); } this.linkRenderer.beginLink(reference, freestanding, parameters); }
/** * {@inheritDoc} * * @since 2.5RC1 */ @Override public void onImage(ResourceReference reference, boolean freestanding, Map<String, String> parameters) { // Ensure the image renderer is using the latest printer since the original printer used could have been // superseded by another one in the printer stack. this.imageRenderer.setXHTMLWikiPrinter(getXHTMLWikiPrinter()); // If the ResourceReference doesn't have a base reference specified, then look for one in previously sent // events (it's sent in begin/endMetaData events). List<String> baseReferences = reference.getBaseReferences(); if (baseReferences.isEmpty()) { reference.addBaseReferences(getMetaDataState().<String>getAllMetaData(MetaData.BASE)); } this.imageRenderer.onImage(reference, freestanding, parameters); }