private < PermissionType extends Permission > void updatePermissionSet ( APIPatch . Operation operation , PermissionSetPatch < PermissionType > permissionSetPatch , PermissionType permission ) throws GuacamoleException { // Add or remove permission based on operation switch ( operation ) { // Add permission case add : permissionSetPatch . addPermission ( permission ) ; break ; // Remove permission case remove : permissionSetPatch . removePermission ( permission ) ; break ; // Unsupported patch operation default : throw new GuacamoleClientException ( "Unsupported patch operation: \"" + operation + "\"" ) ; } }
Updates the given permission set patch by queuing an add or remove operation for the given permission based on the given patch operation .