|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RepresentationGeneratorService
This is the OSGi service interface of a registry of RepresentationGenerator instances. Clients can
register their own RepresentationGenerator by making it available through the OSGi service
registry. The single implementation of this module does not implement service ranking. I.e., if there are
two services registered for a given type, then it is not specified which of the two services is used to
represent the content item.
The search order for a given type T is defined as follows:
T is mapped to a set of generators then return an arbitrary generator from that set.I of T do: If I is mapped to a set of
generators then return an arbitrary generator from that set.S be the super type of T. Start from (1) with S.
On startup, the service registers a number of default representation generators for the following types:
ObjectPagePageMetaDataRedirectRelatedLinkWorkflowModelInstanceWorkflowActivityInstancePageVersionElementMediaItemArticleVersion
| Method Summary | |
|---|---|
ContentRepresentation |
represent(java.lang.Object contentItem)
Represents the given content item. |
| Method Detail |
|---|
ContentRepresentation represent(java.lang.Object contentItem)
throws ContentRepresentationException
RepresentationGenerator instances in
its registry and uses them to generate the representation. The look-up is done using the run-time class
of the given content item instance and the RepresentationGenerator.getSupportedType() method.
If no suitable RepresentationGenerator service has registered then an exception is thrown.
contentItem - the content item to represent
ContentRepresentation for the given content item instance
ContentRepresentationException - on error (such as a cycle in the content item object structure)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||