private void addObjectPermissions ( Map < String , Set < ObjectPermission . Type > > permissions , ObjectPermissionSet permSet ) throws GuacamoleException { // Add all provided object permissions for ( ObjectPermission permission : permSet . getPermissions ( ) ) { // Get associated set of permissions String identifier = permission . getObjectIdentifier ( ) ; Set < ObjectPermission . Type > objectPermissions = permissions . get ( identifier ) ; // Create new set if none yet exists if ( objectPermissions == null ) permissions . put ( identifier , EnumSet . of ( permission . getType ( ) ) ) ; // Otherwise add to existing set else objectPermissions . add ( permission . getType ( ) ) ; } }
Adds the object permissions from the given ObjectPermissionSet to the Map of object permissions provided .