private void load(AttachmentElement item) { List<MaliciousAttachmentConfig> generateList = generateMap.get(item.getId()); List<MaliciousAttachmentConfig> replaceList = replaceMap.get(item.getId()); Boolean remove = removeMap.get(item.getId()); // tablesDialog.setValue( MutationTables.LABEL, // item.getAttachment().getName() ); generateTableModel.clear(); replaceTableModel.clear(); tablesDialog.setBooleanValue(MutationTables.REMOVE_FILE, new Boolean(false)); if (remove != null) { tablesDialog.setBooleanValue(MutationTables.REMOVE_FILE, remove); } if (generateList != null) { for (MaliciousAttachmentConfig element : generateList) { generateTableModel.addResult(element); } } if (replaceList != null) { for (MaliciousAttachmentConfig element : replaceList) { replaceTableModel.addResult(element); } } }
private void save(AttachmentElement item) { List<MaliciousAttachmentConfig> generateList = new ArrayList<MaliciousAttachmentConfig>(); List<MaliciousAttachmentConfig> replaceList = new ArrayList<MaliciousAttachmentConfig>(); for (int i = 0; i < generateTableModel.getRowCount(); i++) { generateList.add(generateTableModel.getRowValue(i)); } for (int i = 0; i < replaceTableModel.getRowCount(); i++) { replaceList.add(replaceTableModel.getRowValue(i)); } Boolean remove = tablesDialog.getBooleanValue(MutationTables.REMOVE_FILE); generateMap.put(item.getId(), generateList); replaceMap.put(item.getId(), replaceList); removeMap.put(item.getId(), remove); }
public void addResultToReplaceTable(MaliciousAttachmentConfig config) { replaceTableModel.addResult(config); }
public void addResultToGenerateTable(MaliciousAttachmentConfig config) { generateTableModel.addResult(config); }