class ServerTemplatePresenter {

    public void onServerInstanceSelect( @Observes final ServerInstanceSelected serverInstanceSelected ) {
        if ( serverInstanceSelected != null &&
                serverInstanceSelected.getServerInstanceKey() != null &&
                serverInstanceSelected.getServerInstanceKey().getServerTemplateId() != null &&
                serverInstanceSelected.getServerInstanceKey().getServerInstanceId() != null ) {
            view.selectServerInstance( serverInstanceSelected.getServerInstanceKey().getServerTemplateId(),
                                       serverInstanceSelected.getServerInstanceKey().getServerInstanceId() );
        } 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 );

}