@Override protected String getImageSrcAttributeValue(ResourceReference reference, Map<String, String> parameters) { return reference.getReference(); } }
/** * @param reference see {@link #getReference()} */ public InterWikiResourceReference(String reference) { super(reference, ResourceType.INTERWIKI); setTyped(true); }
/** * {@inheritDoc} * * @since 2.5RC1 */ @Override public String getLinkURL(ResourceReference linkReference) { String queryString = linkReference.getParameter(AttachmentResourceReference.QUERY_STRING); return "attachmenturl" + (queryString != null ? QM + queryString : ""); }
@Override protected String getImageSrcAttributeValue(ResourceReference reference, Map<String, String> parameters) { return String.format("%s:%s", reference.getType().getScheme(), reference.getReference()); } }
/** * @param reference see {@link #getReference()} * @param type see {@link #getType()} */ public ResourceReference(String reference, ResourceType type) { setReference(reference); setType(type); }
/** * @return the query string for specifying parameters that will be used in the rendered URL or null if no query * string has been specified. Example: "mydata1=5&mydata2=Hello" */ public String getQueryString() { return getParameter(QUERY_STRING); }
/** * @param interWikiAlias see {@link #getInterWikiAlias()} */ public void setInterWikiAlias(String interWikiAlias) { setParameter(INTERWIKI_ALIAS, interWikiAlias); }
/** * @return the query string for specifying parameters that will be used in the rendered URL or null if no query * string has been specified. Example: "mydata1=5&mydata2=Hello" */ public String getQueryString() { return getParameter(QUERY_STRING); }
/** * @return the <a href="http://en.wikipedia.org/wiki/InterWiki">Inter Wiki</a> alias to which the resource is * pointing to or null if not defined. Mappings between Inter Wiki aliases and actual locations are defined * in the Inter Wiki Map. Example: "wikipedia" */ public String getInterWikiAlias() { return getParameter(INTERWIKI_ALIAS); } }
@Override protected void beginLinkExtraAttributes(ResourceReference reference, Map<String, String> spanAttributes, Map<String, String> anchorAttributes) { anchorAttributes.put(XHTMLLinkRenderer.HREF, reference.getType().getScheme() + ':' + reference.getReference()); } }
public XWikiWikiReference(ResourceReference reference, String label, WikiParameters linkParameters, boolean freeStanding) { super(reference.getReference(), label, linkParameters); this.reference = reference; this.freeStanding = freeStanding; }
/** * {@inheritDoc} * * @see WikiModel#getImageURL(org.xwiki.rendering.listener.reference.ResourceReference , java.util.Map) */ public String getImageURL(ResourceReference imageReference, Map<String, String> parameters) { String queryString = imageReference.getParameter(AttachmentResourceReference.QUERY_STRING); return "imageurl" + (queryString != null ? "?" + queryString : ""); }
/** * {@inheritDoc} * @see org.xwiki.rendering.renderer.reference.link.URILabelGenerator#generateLabel( *org.xwiki.rendering.listener.reference.ResourceReference) */ public String generateLabel(ResourceReference reference) { return reference.getReference(); } }
/** * {@inheritDoc} * * @see WikiModel#getLinkURL(org.xwiki.rendering.listener.reference.ResourceReference) * @since 2.5RC1 */ public String getLinkURL(ResourceReference linkReference) { String queryString = linkReference.getParameter(AttachmentResourceReference.QUERY_STRING); return "attachmenturl" + (queryString != null ? "?" + queryString : ""); }
/** * {@inheritDoc} * @see org.xwiki.rendering.renderer.reference.link.LinkLabelGenerator#generate( * org.xwiki.rendering.listener.reference.ResourceReference) * @since 2.5RC1 */ public String generate(ResourceReference reference) { return reference.getReference(); } }
/** * {@inheritDoc} * * @see WikiModel#getDocumentViewURL(org.xwiki.rendering.listener.reference.ResourceReference) */ public String getDocumentViewURL(ResourceReference documentReference) { String queryString = documentReference.getParameter(DocumentResourceReference.QUERY_STRING); String anchor = documentReference.getParameter(DocumentResourceReference.ANCHOR); return "viewurl" + (queryString != null ? "?" + queryString : "") + (anchor != null ? "#" + anchor : ""); }
public XWikiWikiReference(ResourceReference reference, String label, WikiParameters linkParameters, boolean isFreeStanding) { super(reference.getReference(), label, linkParameters); this.reference = reference; this.isFreeStanding = isFreeStanding; }
@Override public String getDocumentViewURL(ResourceReference documentReference) { String queryString = documentReference.getParameter(DocumentResourceReference.QUERY_STRING); String anchor = documentReference.getParameter(DocumentResourceReference.ANCHOR); return "viewurl" + (queryString != null ? QM + queryString : "") + (anchor != null ? "#" + anchor : ""); }