Interface ContributionContent<T>
-
- Type Parameters:
T
- the type the content's data.
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
ContributionContentTranslation<T>
- All Known Implementing Classes:
WysiwygContent
public interface ContributionContent<T> extends Serializable
The content of a contribution in Silverpeas. It is the more generic representation of a content embedded into a user contribution. The language of the content is the language in which the contribution is authored. All conceptual representation of a content supported in Silverpeas should implement this interface.- Author:
- mmoquillon
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description LocalizedContribution
getContribution()
Gets the localized contribution to which the content is related.T
getData()
Gets the data of a content.default ContributionContentRenderer
getRenderer()
Gets the renderer of the content.default boolean
isEmpty()
Does the content is empty?
-
-
-
Method Detail
-
getContribution
LocalizedContribution getContribution()
Gets the localized contribution to which the content is related. The language in which the contribution was authored is taken as the content language.- Returns:
- the contribution that owns this content.
-
getData
T getData()
Gets the data of a content. A data can be a text, a structure, a binary stream, and so on. The type of the data should be represented by a Java type.- Returns:
- the data of the content.
-
isEmpty
default boolean isEmpty()
Does the content is empty?- Returns:
- true if this content doesn't contain any data, false otherwise.
-
getRenderer
default ContributionContentRenderer getRenderer()
Gets the renderer of the content.- Returns:
- the
ContributionContentRenderer
instance.
-
-