Interface ContributionContentRendererProvider
-
- All Known Implementing Classes:
DefaultContributionContentRendererProvider
public interface ContributionContentRendererProvider
In charge of providingContributionContentRenderer
as implementations of renderer are existing at most of time into UI modules but not at the API level.- Author:
- silveryocha
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ContributionContentRendererProvider
get()
Gets the instance of the implementation of the interface.AbstractContributionRenderer
ofContent(ContributionContent content)
Gets theContributionContentRenderer
instance according to givenContributionContent
.
-
-
-
Method Detail
-
get
static ContributionContentRendererProvider get()
Gets the instance of the implementation of the interface.- Returns:
- an implementation of
ContributionContentRendererProvider
.
-
ofContent
AbstractContributionRenderer ofContent(ContributionContent content)
Gets theContributionContentRenderer
instance according to givenContributionContent
.This method offers to provide an instance by observing following convention of renderer naming:
[simple class name of ContributionContent, with first letter turn into lower case]Renderer
wysiwygContentRenderer
for example, wherewysiwygContent
is computed fromContributionContent
simple class name and 'Renderer' is the suffix.To be provided by this way, an implementation must use
Named
annotation and fillNamed.value()
in case where the implementation class name does not correspond to the above naming convention.- Parameters:
content
- the content to render.- Returns:
- the
ContributionContentRenderer
instance.
-
-