rendered paste body catch (RightsViolationException rights) {
System.out.println(rights.getMessage());
users.setCurrentUser(users.getUser("misterWong"));
try {
Date timestamp = new Date();
AddProductGroup addPG = new AddProductGroup(stock.get_group_map(), "Nahrungsmittel", 20, null,
users.getCurrentUser(), actions.getNextID(), timestamp.toString());
actions.addAction(addPG);
AddProductGroup addPG1 = new AddProductGroup(stock.get_group_map(), "Freizeit", 20, null,
users.getCurrentUser(), actions.getNextID(), timestamp.toString());
actions.addAction(addPG1);
System.out.println("ProductGroups added");
AddProduct addP = new AddProduct(stock.get_product_map(), "Kartoffel", "leckere Kartoffeln", stock.getGroup("Nahrungsmittel"),
200, 200, users.getCurrentUser(), actions.getNextID(), timestamp.toString());
actions.addAction(addP);
AddProduct addP1 = new AddProduct(stock.get_product_map(), "Apfel", "frisch saftig steirisch", stock.getGroup("Nahrungsmittel"),
20, 100, users.getCurrentUser(), actions.getNextID(), timestamp.toString());
actions.addAction(addP1);
AddProduct addP2 = new AddProduct(stock.get_product_map(), "Badetuch", "Frotte!!", stock.getGroup("Freizeit"),
500, 50, users.getCurrentUser(), actions.getNextID(), timestamp.toString());
actions.addAction(addP2);
AddProduct addP3 = new AddProduct(stock.get_product_map(), "Quietscheentchen", "echt gelb", stock.getGroup("Freizeit"),
20, 10, users.getCurrentUser(), actions.getNextID(), timestamp.toString());
actions.addAction(addP3);
}
catch (RightsViolationException rE) {
}
catch (IDException idE2) {
}
System.out.println("Products added");
}