code: 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());
  
          }
  
      }
docs: Adds the object permissions from the given ObjectPermissionSet to the
  Map of object permissions provided.
  
  @param permissions
  The Map to add object permissions to.
  
  @param permSet
  The ObjectPermissionSet containing the object permissions to add.
  
  @throws GuacamoleException
  If an error occurs while retrieving object permissions from the
  ObjectPermissionSet.