copyButton.disableProperty().bind(tableView.getSelectionModel().selectedItemProperty().isNull().or(multipleItemsSelected).or(new SimpleBooleanProperty(!isUserEditable))); copyButton.setOnAction(event -> { T copy = tableView.getSelectionModel().getSelectedItem().utility().semanticCopy(); referenceListAttribute.add(copy); tableView.getSelectionModel().clearSelection();
/**public utility api * @return the api */ public DataUtility utility(){ return new DataUtility(this); }
/** * @return creates a new factory update which is ready for editing mainly assign the right ids * */ public DataAndNewMetadata<R> prepareNewFactory() { return dataStorage.prepareNewFactory(dataStorage.getCurrentFactoryStorageId(),factoryManager.getCurrentFactory().utility().copy()); }
public MergeDiffInfo<R> getDiffToPreviousVersion(StoredDataMetadata storedDataMetadata) { R historyFactory = getHistoryFactory(storedDataMetadata.id); R historyFactoryPrevious = getPreviousHistoryFactory(storedDataMetadata.id); return new DataMerger<>(historyFactoryPrevious,historyFactoryPrevious.utility().copy(),historyFactory).createMergeResult((permission)->true).executeMerge(); }
/** * prepare a new factory which could be used to update data. mainly give it the correct baseVersionId * @return new possible factory update with prepared ids/metadata * */ default DataAndNewMetadata<R> prepareNewFactory(){ return prepareNewFactory(getCurrentFactoryStorageId(),getCurrentFactory().root.utility().copy()); }