#NEWLINE# def add_filter( self , name , filter ) : #NEWLINE# #INDENT# 'Adds a filter with the given name.\n\n        ``filter`` must be the **class** object rather than\n        an instance. The class *must* be a subclass of\n        :class:`dossier.web.Filter`, which should provide a means\n        of creating a predicate function.\n\n        The ``filter`` must be a class so that its dependencies can be\n        injected when the corresponding route is executed by the user.\n\n        If ``filter`` is ``None``, then it removes a possibly existing\n        filter named ``name``.\n\n        :param str name: The name of the filter. This is how the search engine\n                         is invoked via REST.\n        :param engine: A filter *class*.\n        :type engine: `type`\n        :rtype: :class:`WebBuilder`\n        ' #NEWLINE# if ( filter is None ) : #NEWLINE# #INDENT# self . filters . pop ( name , None ) #NEWLINE# #UNINDENT# self . filters [ name ] = filter #NEWLINE# return self