Class DefaultContributionContentRendererProvider
- java.lang.Object
-
- org.silverpeas.core.contribution.content.renderer.DefaultContributionContentRendererProvider
-
- All Implemented Interfaces:
ContributionContentRendererProvider
@Provider public class DefaultContributionContentRendererProvider extends Object implements ContributionContentRendererProvider
Default implementation ofContributionContentRendererProvider
.- Author:
- silveryocha
-
-
Constructor Summary
Constructors Constructor Description DefaultContributionContentRendererProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractContributionRenderer
ofContent(ContributionContent content)
Gets theContributionContentRenderer
instance according to givenContributionContent
.
-
-
-
Method Detail
-
ofContent
public AbstractContributionRenderer ofContent(ContributionContent content)
Description copied from interface:ContributionContentRendererProvider
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.- Specified by:
ofContent
in interfaceContributionContentRendererProvider
- Parameters:
content
- the content to render.- Returns:
- the
ContributionContentRenderer
instance.
-
-