'Main entry point for REST interface.
@param r: the S3Request instance
@param attr: controller parameters'

def apply_method(self, r, **attr):

    permitted = self._permitted('update')
    if (not permitted):
        r.unauthorised()
    if (r.representation in ('html', 'iframe')):
        if (r.http in ('GET', 'POST')):
            output = self.bulk_update_status(r, **attr)
        else:
            r.error(405, current.ERROR.BAD_METHOD)
    else:
        r.error(415, current.ERROR.BAD_FORMAT)
    return output
