public void createRights() {
try {
// this will add rights with same priority
RightsGroup grp1 = permissionRights.addRights("Add-Edit-Delete", "Add", "Edit", "Delete");
RightsGroup grp3 = permissionRights.addRights("Add-Edit-Delete2", "Add", "Edit", "Delete");
// this shows how to add rights with different priority
Map<String, Integer> rights = new LinkedHashMap<String, Integer>();
rights.put("Can add 5 files", 1);
rights.put("Can add 10 files", 2);
rights.put("Can add 20 files", 3);
RightsGroup grp2 = permissionRights.addRights("File count permissions", rights);
} catch (DuplicateNameException a_excp) {
a_excp.printStackTrace();
}
}