nl.gx.webmanager.services.contentrepresentation
Interface RepresentationGenerator<T>

Type Parameters:
T - The type for which this representation generator works.

public interface RepresentationGenerator<T>

This type contains functionality to create abstract representations of content items of a given type. Clients can implement this interface for custom content items (e.g., WCB elements) and make it available via the OSGi service registry. Any RepresentationGeneratorService then registers it and uses it for generating representations of the custom content items. Note that the ContentRepresentations class contains a number of factory methods for the ContentRepresentation and related types.

Implementations must be prepared that the methods of this type can be called in parallel from multiple threads.


Method Summary
 java.lang.Class<T> getSupportedType()
          Returns the supported type at runtime.
 ContentRepresentation represent(T contentItem)
          Generates a representation of the given content item.
 

Method Detail

getSupportedType

java.lang.Class<T> getSupportedType()
Returns the supported type at runtime.

Returns:
the supported type

represent

ContentRepresentation represent(T contentItem)
                                throws ContentRepresentationException
Generates a representation of the given content item.

Parameters:
contentItem - the item of which to generate a representation
Returns:
an appropriate ContentRepresentation
Throws:
ContentRepresentationException - on error


Copyright © 2007-2011 GX Software BV. All Rights Reserved.