コード例 #1
0
 private String getUniqueLabel(String publicCode, String label) {
   FieldDeskKeys keys = getFieldDeskModel().getAllKeys();
   for (int i = 0; i < keys.size(); ++i) {
     FieldDeskKey key = keys.get(i);
     try {
       if (key.getPublicCode().equals(publicCode)) continue;
     } catch (InvalidBase64Exception e) {
     }
     String configuredLabel = key.getLabel();
     if (configuredLabel.length() > 0 && label.equals(configuredLabel)) {
       mainWindow.notifyDlg("FieldDeskLabelDuplicate");
       return null;
     }
   }
   return label;
 }
コード例 #2
0
 @Override
 void addExistingKeysToTable() throws Exception {
   String fieldDeskKeysXml = mainWindow.getApp().getConfigInfo().getFieldDeskKeysXml();
   FieldDeskKeys local = new FieldDeskKeys(fieldDeskKeysXml);
   for (int i = 0; i < local.size(); ++i) addKeyToTable(local.get(i));
 }