'Add tag to an item.'

@web.expose
@web.require_login('add    tag    to    an    item')
def add_tag_async(self, trans, item_id=None, item_class=None, new_tag=None, context=None):

    item = self._get_item(trans, item_class, trans.security.decode_id(item_id))
    user = trans.user
    self.get_tag_handler(trans).apply_item_tags(user, item, new_tag.encode('utf-8'))
    trans.sa_session.flush()
    params = dict(item_id=item.id, item_class=item_class, tag=new_tag)
    trans.log_action(user, text_type('tag'), context, params)
