com.atlassian.confluence.plugins.emailgateway.api
Interface LinkConverter<B,T>

Type Parameters:
B - the link body type
T - the target conversion type
All Known Implementing Classes:
BaseLinkConverter, ConfluenceLinkConverter, WidgetLinkConverter, YouTubeLinkConverter

@PublicSpi
public interface LinkConverter<B,T>

Takes an XHTML API Link object and converts it to another object based on the URL ResourceIdentifier of the Link.

Since:
5.3

Method Summary
 T convert(java.net.URL linkUrl, LinkBody<B> linkBody)
           
 java.lang.Class<T> getConversionClass()
          Returns the class of the Object after conversion.
 boolean isFinal()
           
 

Method Detail

isFinal

boolean isFinal()
Returns:
true if no converters should run after this one handles a link.

convert

T convert(java.net.URL linkUrl,
          LinkBody<B> linkBody)
Parameters:
linkUrl - the URL that the link points to
linkBody - the text or other content that the link displays
Returns:
the passed link, converted to the correct Object type

getConversionClass

java.lang.Class<T> getConversionClass()
Returns the class of the Object after conversion. This is required for lookup against the MarshallingRegistry, as the key Class in the registry may be a superclass or interface of the actual Object returned by the conversion.

Returns:
the class of the Object after conversion.


Copyright © 2003-2014 Atlassian. All Rights Reserved.