Search in sources :

Example 1 with InvalidNoteSpecification

use of net.sourceforge.processdash.hier.HierarchyNote.InvalidNoteSpecification in project processdash by dtuma.

the class HierarchyNoteManager method getNotesForPath.

public static Map<String, HierarchyNote> getNotesForPath(DataContext data, String path, boolean ignoreBlank) {
    String dataName = DataRepository.createDataName(path, TEAM_NOTE_DATA_NAME);
    SimpleData val = data.getSimpleValue(dataName);
    if (val == null)
        return null;
    Map<String, HierarchyNote> result;
    result = new LinkedHashMap<String, HierarchyNote>();
    try {
        result.put(NOTE_KEY, new HierarchyNote(val));
        dataName = DataRepository.createDataName(path, TEAM_NOTE_CONFLICT_DATA_NAME);
        val = data.getSimpleValue(dataName);
        if (val != null)
            result.put(NOTE_CONFLICT_KEY, new HierarchyNote(val));
        dataName = DataRepository.createDataName(path, TEAM_NOTE_LAST_SYNC_DATA_NAME);
        val = data.getSimpleValue(dataName);
        if (val != null)
            result.put(NOTE_BASE_KEY, new HierarchyNote(val));
        if (ignoreBlank && isOnlyIgnorableBlankNote(result))
            return null;
        return result;
    } catch (InvalidNoteSpecification e) {
        e.printStackTrace();
        return null;
    }
}
Also used : SimpleData(net.sourceforge.processdash.data.SimpleData) InvalidNoteSpecification(net.sourceforge.processdash.hier.HierarchyNote.InvalidNoteSpecification)

Aggregations

SimpleData (net.sourceforge.processdash.data.SimpleData)1 InvalidNoteSpecification (net.sourceforge.processdash.hier.HierarchyNote.InvalidNoteSpecification)1