diff options
Diffstat (limited to 'dozentenmodul/src/main/java/gui/lecture/PermissionEditLecture_GUI.java')
| -rw-r--r-- | dozentenmodul/src/main/java/gui/lecture/PermissionEditLecture_GUI.java | 75 |
1 files changed, 36 insertions, 39 deletions
diff --git a/dozentenmodul/src/main/java/gui/lecture/PermissionEditLecture_GUI.java b/dozentenmodul/src/main/java/gui/lecture/PermissionEditLecture_GUI.java index e8dd5608..5857942c 100644 --- a/dozentenmodul/src/main/java/gui/lecture/PermissionEditLecture_GUI.java +++ b/dozentenmodul/src/main/java/gui/lecture/PermissionEditLecture_GUI.java @@ -116,7 +116,7 @@ public class PermissionEditLecture_GUI extends JFrame { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { - // TODO Auto-generated catch block + e.printStackTrace(); } setTitle("bwLehrpool Suite - Berechtigungen"); @@ -220,7 +220,7 @@ public class PermissionEditLecture_GUI extends JFrame { // if new session, get values for table from database if (RightsManagement.rightsManagement.getPermittedUserList().size() <= 0) { - System.out.println("Loading data from db"); + //System.out.println("Loading data from db"); try { map = client.getPermissionForUserAndLecture( @@ -250,16 +250,13 @@ public class PermissionEditLecture_GUI extends JFrame { } } catch (TException e1) { - // TODO Auto-generated catch block + e1.printStackTrace(); } } else // read from model { - System.out.println("reading from model"); - System.out - .println("RightsManagement.rightsManagement.getPermittedUserList().size() = " - + RightsManagement.rightsManagement - .getPermittedUserList().size()); + //System.out.println("reading from model"); + //System.out.println("RightsManagement.rightsManagement.getPermittedUserList().size() = "+ RightsManagement.rightsManagement.getPermittedUserList().size()); List<person> listt = RightsManagement.rightsManagement .getPermittedUserList(); @@ -277,10 +274,10 @@ public class PermissionEditLecture_GUI extends JFrame { temp.isLecture_admin(), // Admin temp.getUserID() // userID }; - System.out.println("Processing: " + temp.getName() + ", " - + temp.getVorname() + ", " + temp.isLecture_read() - + ", " + temp.isLecture_write() + ", " - + temp.isLecture_admin() + ", " + temp.getUserID()); + //System.out.println("Processing: " + temp.getName() + ", " + // + temp.getVorname() + ", " + temp.isLecture_read() + // + ", " + temp.isLecture_write() + ", " + // + temp.isLecture_admin() + ", " + temp.getUserID()); // Fuege diese Objekte der Tabelle hinzu model.addRow(obj); x++; @@ -337,13 +334,13 @@ public class PermissionEditLecture_GUI extends JFrame { // This pointer counts the already // deleted rows and correct the // offset of i - LOGGER.info("deletabelRows.length=" + deletableRows.length); + //LOGGER.info("deletabelRows.length=" + deletableRows.length); for (int i = 0; i < deletableRows.length; i++) { - LOGGER.info("Deleting rowCount[" + i - + "], tableRow number " - + deletableRows[i - pointerCorrection]); + //LOGGER.info("Deleting rowCount[" + i + // + "], tableRow number " + // + deletableRows[i - pointerCorrection]); model.removeRow(deletableRows[i - pointerCorrection]); pointerCorrection++; } @@ -449,7 +446,7 @@ public class PermissionEditLecture_GUI extends JFrame { for (int i = 0; i < table.getRowCount(); i++) { checkIntegrity(i); // check integrity of each line // again - System.out.println("in auto-correct"); + //System.out.println("in auto-correct"); } saveTableToList(); @@ -510,7 +507,7 @@ public class PermissionEditLecture_GUI extends JFrame { open.openWebpage(windows); } catch (URISyntaxException e) { - // TODO Auto-generated catch block + e.printStackTrace(); } } @@ -531,7 +528,7 @@ public class PermissionEditLecture_GUI extends JFrame { open.openWebpage(windows); } catch (URISyntaxException e) { - // TODO Auto-generated catch block + e.printStackTrace(); } @@ -590,7 +587,7 @@ public class PermissionEditLecture_GUI extends JFrame { // save the entered rights into the model and prepare them to be written to // the database private void saveTableToList() { - System.out.println("Saving Table to List"); + //System.out.println("Saving Table to List"); List<person> list = new ArrayList<person>(); @@ -605,22 +602,22 @@ public class PermissionEditLecture_GUI extends JFrame { seperatorIndex = table.getModel().getValueAt(i, 0).toString() .indexOf(","); - LOGGER.info(table.getModel().getValueAt(i, 4).toString() - + " (userID)\t" - + Boolean.parseBoolean(table.getModel().getValueAt(i, 3) - .toString()) - + "(admin)\t" - + Boolean.parseBoolean(table.getModel().getValueAt(i, 2) - .toString()) - + "(write)\t" - + Boolean.parseBoolean(table.getModel().getValueAt(i, 1) - .toString()) - + "(read)\t" - + table.getModel().getValueAt(i, 0).toString() - .substring(0, seperatorIndex) - + "(Nachname)\t" - + table.getModel().getValueAt(i, 0).toString() - .substring(seperatorIndex + 2) + "(Vorname)"); + //LOGGER.info(table.getModel().getValueAt(i, 4).toString() + // + " (userID)\t" + // + Boolean.parseBoolean(table.getModel().getValueAt(i, 3) + // .toString()) + // + "(admin)\t" + // + Boolean.parseBoolean(table.getModel().getValueAt(i, 2) + // .toString()) + // + "(write)\t" + // + Boolean.parseBoolean(table.getModel().getValueAt(i, 1) + // .toString()) + // + "(read)\t" + // + table.getModel().getValueAt(i, 0).toString() + // .substring(0, seperatorIndex) + // + "(Nachname)\t" + // + table.getModel().getValueAt(i, 0).toString() + // .substring(seperatorIndex + 2) + "(Vorname)"); temp.setUserID(table.getModel().getValueAt(i, 4).toString()); // get // userID @@ -648,9 +645,9 @@ public class PermissionEditLecture_GUI extends JFrame { } } - for (int y = 0; y < list.size(); y++) { - System.out.println("" + list.get(y).getName()); - } + //for (int y = 0; y < list.size(); y++) { + // System.out.println("" + list.get(y).getName()); + //} RightsManagement.rightsManagement.setPermittedUserList(list); }// end saveTableToList() |
