@Test public void testBeginLinkWhenExternalLink() throws Exception { DefaultWikiPrinter printer = new DefaultWikiPrinter(); this.renderer.setPrinter(printer); ResourceReference reference = new ResourceReference("http: this.renderer.beginLink(reference, false, Collections.<String, String>emptyMap()); this.renderer.endLink(reference, false, Collections.<String, String>emptyMap()); Assert.assertEquals("http: }
@Override public void endLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters) { if (getEmptyBlockState().isCurrentContainerBlockEmpty()) { ResourceType resourceType = reference.getType(); if ((ResourceType.DOCUMENT.equals(resourceType) || ResourceType.SPACE.equals(resourceType) || ResourceType.PAGE.equals(resourceType)) && this.linkLabelGenerator != null) { getPrinter().print(this.linkLabelGenerator.generate(reference)); } else { getPrinter().print(reference.getReference()); } } }
PlainTextChainingRenderer extends AbstractChainingPrintRenderer { @Override public void endLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters) { if (getEmptyBlockState().isCurrentContainerBlockEmpty()) { ResourceType resourceType = reference.getType(); if ((ResourceType.DOCUMENT.equals(resourceType) || ResourceType.SPACE.equals(resourceType) || ResourceType.PAGE.equals(resourceType)) && this.linkLabelGenerator != null) { getPrinter().print(this.linkLabelGenerator.generate(reference)); } else { getPrinter().print(reference.getReference()); } } } }
PlainTextChainingRenderer extends AbstractChainingPrintRenderer { @Override public void endLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters) { if (getEmptyBlockState().isCurrentContainerBlockEmpty()) { ResourceType resourceType = reference.getType(); if ((ResourceType.DOCUMENT.equals(resourceType) || ResourceType.SPACE.equals(resourceType) || ResourceType.PAGE.equals(resourceType)) && this.linkLabelGenerator != null) { getPrinter().print(this.linkLabelGenerator.generate(reference)); } else { getPrinter().print(reference.getReference()); } } } PlainTextChainingRenderer(ListenerChain listenerChain);  PlainTextChainingRenderer(LinkLabelGenerator linkLabelGenerator, ListenerChain listenerChain); }
PlainTextChainingRenderer extends AbstractChainingPrintRenderer { @Override public void endLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters) { if (getEmptyBlockState().isCurrentContainerBlockEmpty()) { ResourceType resourceType = reference.getType(); if ((ResourceType.DOCUMENT.equals(resourceType) || ResourceType.SPACE.equals(resourceType) || ResourceType.PAGE.equals(resourceType)) && this.linkLabelGenerator != null) { getPrinter().print(this.linkLabelGenerator.generate(reference)); } else { getPrinter().print(reference.getReference()); } } } PlainTextChainingRenderer(ListenerChain listenerChain);  PlainTextChainingRenderer(LinkLabelGenerator linkLabelGenerator, ListenerChain listenerChain); @Override void beginParagraph(Map<String, String> parameters); @Override void onNewLine(); @Override void endLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters); @Override void beginHeader(HeaderLevel level, String id, Map<String, String> parameters); @Override void onWord(String word); @Override void beginList(ListType type, Map<String, String> parameters); @Override void beginListItem(); @Override void beginListItem(Map<String, String> parameters); @Override void onSpace(); @Override void onSpecialSymbol(char symbol); @Override void onHorizontalLine(Map<String, String> parameters); @Override void onEmptyLines(int count); @Override void onVerbatim(String content, boolean inline, Map<String, String> parameters); @Override void beginDefinitionList(Map<String, String> parameters); @Override void beginDefinitionTerm(); @Override void beginDefinitionDescription(); @Override void beginQuotationLine(); @Override void beginTable(Map<String, String> parameters); @Override void beginTableCell(Map<String, String> parameters); @Override void beginTableHeadCell(Map<String, String> parameters); @Override void beginTableRow(Map<String, String> parameters); @Override void onImage(ResourceReference reference, boolean freestanding, Map<String, String> parameters); @Override void onRawText(String text, Syntax syntax); }
PlainTextChainingRenderer extends AbstractChainingPrintRenderer { @Override public void endLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters) { if (getEmptyBlockState().isCurrentContainerBlockEmpty()) { ResourceType resourceType = reference.getType(); if ((ResourceType.DOCUMENT.equals(resourceType) || ResourceType.SPACE.equals(resourceType) || ResourceType.PAGE.equals(resourceType)) && this.linkLabelGenerator != null) { getPrinter().print(this.linkLabelGenerator.generate(reference)); } else { getPrinter().print(reference.getReference()); } } } PlainTextChainingRenderer(ListenerChain listenerChain);  PlainTextChainingRenderer(LinkLabelGenerator linkLabelGenerator, ListenerChain listenerChain); @Override void beginParagraph(Map<String, String> parameters); @Override void onNewLine(); @Override void endLink(ResourceReference reference, boolean freestanding, Map<String, String> parameters); @Override void beginHeader(HeaderLevel level, String id, Map<String, String> parameters); @Override void onWord(String word); @Override void beginList(ListType type, Map<String, String> parameters); @Override void beginListItem(); @Override void beginListItem(Map<String, String> parameters); @Override void onSpace(); @Override void onSpecialSymbol(char symbol); @Override void onHorizontalLine(Map<String, String> parameters); @Override void onEmptyLines(int count); @Override void onVerbatim(String content, boolean inline, Map<String, String> parameters); @Override void beginDefinitionList(Map<String, String> parameters); @Override void beginDefinitionTerm(); @Override void beginDefinitionDescription(); @Override void beginQuotationLine(); @Override void beginTable(Map<String, String> parameters); @Override void beginTableCell(Map<String, String> parameters); @Override void beginTableHeadCell(Map<String, String> parameters); @Override void beginTableRow(Map<String, String> parameters); @Override void onImage(ResourceReference reference, boolean freestanding, Map<String, String> parameters); @Override void onRawText(String text, Syntax syntax);  }