"System.Anonymous", "Global.LogEvent",
"Global.Diagnostics", "Folder.Create"} );
System.out.println("The new role ID: " + roleId);
Permission perm = new Permission();
perm.setGroup(false); // false for user, true for group
perm.setPrincipal("vimaster"); // the vimaster must exist
perm.setPropagate(true); // propagate down the hierarchy
perm.setRoleId(roleId);
am.setEntityPermissions( si.getRootFolder(),
new Permission[] {perm} );
Permission[] ps = am.retrieveEntityPermissions(