import { PickerController } from '../picker/pickercontroller' ; import { ServerWrapper } from '../server/serverwrapper' ; import { TreeModel } from '../tree/treemodel' ; export class CurrentRepertoireUpdater { private server_ : ServerWrapper ; private pickerController_ : PickerController ; private treeModel_ : TreeModel ; constructor ( server , pickerController , treeModel ) { this . server_ = server ; this . pickerController_ = pickerController ; this . treeModel_ = treeModel ; } updateCurrentRepertoire ( ) { const repertoireId = this . pickerController_ . getSelectedMetadataId ( ) ; const repertoire = this . treeModel_ . serializeAsRepertoire ( ) ; return this . server_ . updateRepertoire ( repertoireId , repertoire ) ; } }