// shows off components that are contributed by extensions
manager.add(createComponent()
.setInterface(UIExtensionFactory.class.getName(), new Properties() {{ put(UIExtensionFactory.EXTENSION_POINT_KEY, UIExtensionFactory.EXTENSION_POINT_VALUE_TARGET); }})
.setImplementation(new UIExtensionFactory() {
public Component create(Map<String, Object> context) {
final NamedObject object = (NamedObject) context.get("object");
VerticalLayout vl = new VerticalLayout();
vl.setCaption("Info");
final NamedObject namedObject = (NamedObject) context.get("object");
final StatefulGatewayObject target = (StatefulGatewayObject) namedObject.getObject();
Label info = new Label("Target ID: " + namedObject.getName() + "<br />" +
"Installed version: " + target.getLastInstallVersion() + "<br />" +
"Available version: " + target.getCurrentVersion() + "<br />" +
"Provisioning state: " + target.getProvisioningState() + "<br />" +
"Registration state: " + target.getRegistrationState());
info.setContentMode(Label.CONTENT_XHTML);