public interface RepresentationGeneratorServiceThis is the OSGi service interface of a registry of
RepresentationGeneratorinstances. Clients can register their own
RepresentationGeneratorby 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
Tis defined as follows:
Tis mapped to a set of generators then return an arbitrary generator from that set.
- For all interfaces
Iis mapped to a set of generators then return an arbitrary generator from that set.
Sbe the super type of
T. Start from (1) with
On startup, the service registers a number of default representation generators for the following types:
- All legacy elements
ContentRepresentation represent(Object contentItem) throws ContentRepresentationExceptionRepresents the given content item. It finds appropriate
RepresentationGeneratorinstances 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
RepresentationGeneratorservice has registered then an exception is thrown.