class ServerTemplatePresenter {

    public void onServerInstanceUpdated( @Observes final ServerInstanceUpdated serverInstanceUpdated ) {
        if ( serverInstanceUpdated != null &&
                serverInstanceUpdated.getServerInstance() != null ) {
            final ServerInstance updatedServerInstance = serverInstanceUpdated.getServerInstance();
            if ( serverTemplate != null &&
                    updatedServerInstance.getServerTemplateId().equals( serverTemplate.getId() ) &&
                    !serverInstances.contains( updatedServerInstance.getServerInstanceId() ) ) {
                addServerInstance( updatedServerInstance );
            }
        } else {
            logger.warn( "Illegal event argument." );
        }
    }

    @Inject public  ServerTemplatePresenter( final Logger logger,
                                    final View view,
                                    final CopyPopupPresenter copyPresenter,
                                    final Caller<SpecManagementService> specManagementService,
                                    final Event<NotificationEvent> notification,
                                    final Event<AddNewContainer> addNewContainerEvent,
                                    final Event<ContainerSpecSelected> containerSpecSelectedEvent,
                                    final Event<ServerInstanceSelected> serverInstanceSelectedEvent,
                                    final Event<ServerTemplateListRefresh> serverTemplateListRefreshEvent );

}