コード例 #1
0
  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);
      }
    }
  }
コード例 #2
0
  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);
  }
コード例 #3
0
 public void addResultToReplaceTable(MaliciousAttachmentConfig config) {
   replaceTableModel.addResult(config);
 }
コード例 #4
0
 public void addResultToGenerateTable(MaliciousAttachmentConfig config) {
   generateTableModel.addResult(config);
 }