use of teamdash.team.TeamMemberList in project processdash by dtuma.
the class WBSSynchronizer method addMissingTeamMembers.
private void addMissingTeamMembers(Map<String, File> unclaimedExportFiles, Map<String, String> datasetIDMap) {
Date timestamp = getLastTeamListReverseSyncDate();
TeamMemberList team = new TeamMemberList(teamProject.getTeamMemberList());
boolean madeChange = false;
for (File file : unclaimedExportFiles.values()) if (addMissingTeamMember(timestamp, team, file, datasetIDMap))
madeChange = true;
if (madeChange) {
team.assignMissingUniqueIDs(null);
teamProject.getTeamMemberList().copyFrom(team);
}
//
teamProject.getWBS().getRoot().setAttribute(//
TEAM_LIST_SYNC_TIMESTAMP, Long.toString(System.currentTimeMillis()));
}
use of teamdash.team.TeamMemberList in project processdash by dtuma.
the class CsvNodeDataImporter method getNodesFromCsvFile.
public List getNodesFromCsvFile(File f, TeamMemberList teamList) throws IOException, ParseException {
in = new BufferedReader(new FileReader(f));
team = teamList;
parseHeaderLine();
List result = parseData();
in.close();
in = null;
team = null;
return result;
}
use of teamdash.team.TeamMemberList in project processdash by dtuma.
the class CsvNodeDataImporterUI method run.
public void run(WBSJTable table, DataTableModel data, TeamMemberList team) {
File f = selectFile(table);
if (f == null)
return;
List newNodes = null;
try {
CsvNodeDataImporter importer = new CsvNodeDataImporter();
newNodes = importer.getNodesFromCsvFile(f, team);
} catch (IOException e) {
showError("Could not open and read from the file '" + f + "'");
} catch (ParseException e) {
showError(e.getMessage());
}
if (newNodes == null)
return;
WBSModel model = (WBSModel) table.getModel();
newNodes = WBSNode.cloneNodeList(newNodes, model);
int[] newRows = model.insertNodes(newNodes, model.getRowCount());
if (newRows == null || newRows.length == 0)
return;
storeExtraNodeAttributes(model, data, newRows);
table.selectRows(newRows);
table.scrollRectToVisible(table.getCellRect(newRows[0], 0, true));
UndoList.madeChange(table, "Import from CSV File");
}
Aggregations