def update_repository(self, repository_form=None):
if repository_form is None:<EOL><INDENT>raise NullArgument()<EOL><DEDENT>if not isinstance(repository_form, abc_repository_objects.RepositoryForm):<EOL><INDENT>raise InvalidArgument('<STR_LIT>')<EOL><DEDENT>if not repository_form.is_for_update():<EOL><INDENT>raise InvalidArgument('<STR_LIT>')<EOL><DEDENT>if repository_form._my_map['<STR_LIT>'] != '<STR_LIT>':<EOL><INDENT>raise PermissionDenied('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>if self._forms[repository_form.get_id().get_identifier()] == UPDATED:<EOL><INDENT>raise IllegalState('<STR_LIT>')<EOL><DEDENT><DEDENT>except KeyError:<EOL><INDENT>raise Unsupported('<STR_LIT>')<EOL><DEDENT>if not repository_form.is_valid():<EOL><INDENT>raise InvalidArgument('<STR_LIT>')<EOL><DEDENT>url_path = construct_url('<STR_LIT>')<EOL>try:<EOL><INDENT>result = self._put_request(url_path, repository_form._my_map)<EOL><DEDENT>except Exception:<EOL><INDENT>raise  <EOL><DEDENT>self._forms[repository_form.get_id().get_identifier()] = UPDATED<EOL>return objects.Repository(result)<EOL>
Updates an existing repository.

        :param repository_form: the form containing the elements to be updated
        :type repository_form: ``osid.repository.RepositoryForm``
        :raise: ``IllegalState`` -- ``repository_form`` already used in an update transaction
        :raise: ``InvalidArgument`` -- the form contains an invalid value
        :raise: ``NullArgument`` -- ``repository_form`` is ``null``
        :raise: ``OperationFailed`` -- unable to complete request
        :raise: ``PermissionDenied`` -- authorization failure
        :raise: ``Unsupported`` -- ``repository_form`` did not originate from ``get_repository_form_for_update()``

        *compliance: mandatory -- This method must be implemented.*